Click here to Skip to main content
15,891,529 members
Everything / Programming Languages / C

C

C

Great Reads

by Martin Mitáš
How to support scrolling within your controls.
by Espen Harlinn
Choosing the right synchronization mechanisms when working with threads, thread-pools, and I/O Completion ports to create high performance asynchronous servers in C++
by Andy Allinger
Add features to k-means for missing data, mixed data, and choosing the number of clusters
by Jeffrey Walton
Perform authenticated encryption with Crypto++.

Latest Articles

by Chris Boss
BASIC: A powerful language often underestimated and undervalued
by ColleagueRiley
A multi-platform single-header very simple-to-use framework library for creating GUI Libraries or simple GUI programs.
by FPGANinja
A walkthrough and source code for designing a stream interface in Vitis HLS
by Alexey Shtykov
The thing that could generate pseudo random numbers faster than standard library does

All Articles

Sort by Updated

C 

28 Feb 2014 by _Ravikant Tiwari_
This program will demonstrate the process of injecting code into already running processes. Here we have choosen to inject into Explorer
7 Mar 2014 by _Ravikant Tiwari_
Code Injection - A Generic Approach for 32bit and 64bit Versions
27 Nov 2014 by Abdallah Al-Dalleh
How to handle post data coming inside an HTTP POST request
9 Jun 2023 by AbdulRahman A. Badry
Alter your display gamma-ramp to correct & calibrate it
5 Jun 2012 by Abed AlSayed
AlSayed ColorBar is a TrackBar best for professional color picker, like the one used in Adobe Photoshop.
15 Oct 2015 by Abhishek Nandy
Smartwatch Development with pebble
17 Apr 2016 by Adamanteus
Preserving overheating processor in multitasking environment
3 Oct 2011 by Adrabi Abderrahim
Simple C genetic algorithm example
6 Mar 2013 by Ahmed Elkafrawy
An easy way to simulate keyboard press & release keys to another application
28 Apr 2017 by Ahmed Elkafrawy
Implementation of an easy, fast, and optimized (CByte, CShort, CInt) with bits access using bit field and union
28 Mar 2014 by Alex Culea
Shows how to create a window that behaves like a context menu
28 Oct 2015 by Alexander Iskhakov
Creating a HTTP proxy using Play framework and WS API
19 Feb 2024 by Alexey Shtykov
The thing that could generate pseudo random numbers faster than standard library does
30 Jan 2015 by Amir Mohammad Nasrollahi
In this article, i consider the problem of identifying motifs in the biological sequence data sets. To solve this task, i present a new algorithm for finding patterns that just use library in C compiler and a new way to avoid using arrays search.
6 May 2014 by Amogh Natu
This tip shows how you can add scrolling to a view in iOS to allow multiple elements on the screen that won't fit in one screen.
13 Jul 2014 by Amogh Natu
This tip shows how to parse JSON response received from a web service into an NSDictionary object.
12 Jan 2013 by Andreas Gieriet
Short tip to show a convenient use of the lesser known xor operator
29 Aug 2014 by Andres Cassagnes
A simple serial communication library, with a serial ports enumerator
9 Jun 2010 by Anshul R
Tests For a Prime Number
11 Feb 2012 by Anshul R
Prime Number Testing
2 Mar 2016 by Antonio Miras
Programatically set a static IP, subnet mask and gateway to an ethernet network adapter on your local machine
15 Mar 2016 by araud
Did you ever want to know where most of the memory is consumed? Whether it leaks or just gets allocated too much. This home brew memory tracker is yet another bicycle that you will be able to tune for your needs.
15 Oct 2014 by Arthur Caputo
Tutorial on setting a false transparency onto your button's edges.
1 May 2017 by Arthur V. Ratz
This tip/trick introduces the basic ideas on how to avoid memory mismatched allocation/deallocation issues detected by Intel® Inspector XE for Visual Studio 2015
17 Jan 2017 by Arun Maiya
How to setup GCC cross compiler in Windows to generate Linux binaries
16 Aug 2012 by AshakiranBhatter
ScreensSaver through fullscreen mode using Win32 APIs in C.
22 Feb 2018 by Asif Bahrainwala
OpenGL Compute Shader
13 May 2020 by Askar Azhibaev
Calculating the pi number faster using a simple formula
15 Jan 2010 by avinash064
It is very simple :laugh: and fun ..just divide the line before and after * , likeconst int * pconst int (before *) represent [constant integer]and *p represent a pointer add both u get a pointer pointing to a constant integer , it means u can't change value but pointer can...
24 Jul 2015 by BEmbedded
This article discusses 'C' code used to control a Newhaven OLED in 4-bit mode. It is a MBLABX project.
28 Feb 2016 by Bipin Paul
Implementation of Contact Us Page using ASP.NET MVC pattern
30 Nov 2009 by BUR456
/*1st TARGET:Program that prints multiple bmp images*//*2nd TARGET:prints the pixel value of colors used in image*/#include#include#include#includeint main(void){ clrscr(); unsigned char color; long int Doffset, w, h; int...
14 Mar 2021 by cassert24
C syntax/extensions that I somehow stumbled upon
13 Dec 2013 by CathalMF
Describes with an example of how you can call C#.NET methods from unmanaged C++ code.
11 Mar 2010 by chevu
I don't know whether these type of tips are allowed or not. But after having experience of core algorithm-base technical interview I thought I should share question I was asked in my interview.They asked me to show all methods I know to swap values of two variables.I Tried my level best...
5 Sep 2012 by Clifford Nelson
The IValueConverter can be used to select a View.
23 Jul 2011 by Cloud Hsu
Stack implementation for Objective-C.
12 Dec 2013 by Cloud Hsu
How to implement Queue in Objective-C
12 Dec 2013 by Cloud Hsu
How to remind review in iPhone App
12 Dec 2013 by Cloud Hsu
Implement Objective-C Singleton Pattern
25 Feb 2024 by ColleagueRiley
A multi-platform single-header very simple-to-use framework library for creating GUI Libraries or simple GUI programs.
26 Jan 2010 by CPallini
The question: "How can I extract 5 random cards from a deck?" (or similar), appears every now and then at the C/C++ forum.I use the following method:const int CARDS = 52;int card[CARDS]; // the 'card' array represents all of the cardsint i, deck_cards;// initializationfor (i=0;...
6 Feb 2014 by CPallini
A simple algorithm for counting occurrences of symbols in files
3 Mar 2014 by CPallini
Simple approach to heap data structure and heapsort, using C and Lua
28 Dec 2020 by CPallini
Fast integer square root computation in 8051 assembly
15 Mar 2016 by cruppstahl
Describes algorithms for integer compression, introduces a few libraries and shows how to use them
12 May 2020 by D4rkTrick
Big picture of GAction, GActionGroup, GActionMap, GActionEntry, GSimpleAction and GSimpleActionGroup
9 Feb 2010 by dan146
swprintf_s() and sprintf_s() are additions to VC++8, and were supposedly written to tolerate formatting errors and to avoid buffer overruns. They differ from their corresponding non-safe cousins swprintf() and sprintf() by taking an extra argument (the 2nd parameter), which is the size of the...
26 Jul 2011 by Dave Cross
I just use OutputDebugString() and Sysinternals' DebugView.exe.
28 Jun 2015 by David A. Gray
While you can often get away with ignoring compiler warnings, failing to at least scan them can bite hard!
17 Jul 2016 by David A. Gray
Sparsely documented cause of compiler error C2143
11 Oct 2013 by David C Shepherd
A peek into the inspiration behind two cutting edge Visual Studio extensions.
27 Sep 2012 by david pretham
Windows Native API application
28 May 2010 by DecodedSolutions.co.uk
This is a simple article describing how to create an add an outlook appointment to your MS Outlook Calender.
14 Feb 2015 by Dennis E White
How to create delegates in Objective-C
21 Jun 2016 by Dharmateja Challa
Tip on how to simulate external interrupts using Atmel Studio 7 for AVR Atmega MCUs
5 Mar 2018 by Dharmateja Challa
This article is about generating random data using Trusted Platform Module in Windows 10 and testing its randomness using dieharder test suite.
6 Jun 2012 by dudley52
A C program to walk a drive or folder all the way to the bottom, listing each full file name and length, saving the longest one.
19 Jun 2015 by ergohack
System.Data.SQLite is great, but was missing some BLOB support. Switching to the native source project was easier than expected and provided significant functionality benefits.
2 Oct 2016 by Eric Z (Jing)
This tip introduces struct hack and compares it with several implementation alternatives.
9 Feb 2010 by Eugen Podsypalnikov
Hello :)Your own description of the second parameteris different to the "original"...http://msdn.microsoft.com/en-us/library/ce3zzk1k(VS.80).aspx[^]
16 Mar 2012 by Florin Gherghel
How to create a BOTTOMMOST window (Win32 and .NET).
2 Jul 2013 by Ghosuwa Wogomon
How to use lambda functions in C
11 Aug 2013 by Ghosuwa Wogomon
An in-depth explanation of correct bracket placement and why...
22 Oct 2013 by Ghosuwa Wogomon
Detecting character encoding in just 4 lines of code
18 Feb 2012 by GregEllis
You can do it with some XORs:int a = 25, b = 7;a = a ^ b;b = b ^ a;a = a ^ b;Or the same thing with some shorthand to make the code even harder to read:a ^= b;b ^= a;a ^= b;
14 Dec 2015 by Gregory Morse
Implementing a complete WRL native C++ XAML blank project template
17 Feb 2021 by Gábor Angyal
Binding C structs and functions to Kotlin is easier than you have thought!
26 Apr 2015 by Haftmann, Henrik
12 years too late but now it works: A replacement driver for giveio and dlportio for 64-bit Windows
14 Oct 2012 by harold@talerian.com
C is still the best language for native-code development.
9 Oct 2015 by imagiro
A small class for using COM DLL modules without registering them
9 Oct 2014 by Issam Lahlali
Some feedback to avoid common mistakes when porting a .NET application to Mac OSX
2 May 2012 by Itai Basel
A macro that gets current function's return type on visual C++
26 Apr 2016 by itsdkg
This tip explains the usage of arrays for creating Fast binary search trees.
17 Jul 2012 by Jacob F. W.
Here I present an improved version of the Circular Shift Operations
20 Jan 2010 by jafarmlp
Introduction...
26 Jul 2011 by Jaime Olivares
Plain old console output is still a valuable debugging tool, even when used in a GUI application.There are many tools here in CP that can be combined with console output like:CConsole - a simple console for debug output[^]Creating a console for your MFC app's debug output[^]You can use...
30 Jul 2010 by jasper.mandos
/// /// Stuct for the ISO 8601 week date/// /// /// See:/// See:/// Algorithm:
14 Feb 2016 by Jigar_Patel
Amazon S3 lib for uploading file in C++ using VS2010
16 Dec 2015 by JinWenQiang
Just a brief introduction of a simulator to build wireless environment
5 May 2012 by Jonathan Lima
A simple key value-pair hashtable written in C
23 Aug 2011 by Jose David Pujo
I always use a home-made macro to zero my struct's and class's:#define ZEROMEMORY ZeroMemory (this, sizeof (*this))Sample1:struct S1 { double x; long i; char s[255+1]; S1 () { ZEROMEMORY; } };Sample2:class foo { private: double x[16]; char a,b,c; foo () {...
17 Feb 2012 by josh.rendon
That conclusion is definitely wrong. Your equation expanded equals: b = (a+b) - (a-b) = a+b - a + b = 2*bFor your example a=20, b=10b = (20+10) - (20-10) = (30) - (10) = 20b = 20 + 10 - 20 + 10 = 20A counter example to disprove this: a=75, b=88b = (75+88) - (75-88) =...
15 Apr 2010 by Joshua Tully
So I’m playing around with DX10 and decide to do some input work.  After much research apparently no one can decide what the best way to handle keyboard input so I’m just going to use WM_KEYDOWN/UP and store the state in a bool[] and check that in the rendering code.  Also, instead of using...
3 Jan 2016 by José Cintra
An example of how to interact with the user through the keypad, LCD and Buzzer
8 Apr 2016 by jurhas
Solving graph on linear time
31 Dec 2020 by Kai Schtrom
Display smart messages on the Windows Desktop as XBOX360 achievements
18 Dec 2021 by Kai Schtrom
Win32_NetworkAdapterConfiguration WMI class in plain C and C++
9 Feb 2011 by Karl Phillip
If you are looking for a true transparent window to render your 3D objects, check this thread:http://stackoverflow.com/q/4052940/176769
5 Oct 2014 by KarstenK
Some toughts whether to prefer Objective-C or Swift.
11 May 2011 by Kerem Kat
Compile and run CUDA 3.2 projects from VS2010 in 9 easy steps
12 Jan 2010 by KingsGambit
When we look at pointer declarations, reading from right-to-left gives a better idea about what the pointer actually points to. Consider const int * p; if we read right to left: p -> * -> int -> const. i.e. 'p is a pointer to an integer constant' rather than 'constant integer pointer' (if we...
3 Jan 2012 by kooyou
The second form is wrong. A two dimensional pointer does not equal to a two dimensional array. But you can use an one dimensional pointer to reference the two dimensional array.int arr[1][20];int *pTwoDem=(int*)arr;Now you can use *(pTwoDem+10) to replace arr[0][10].
29 Nov 2015 by Ksh_Sr
This tip helps you implement the nLog in conjunction with Microsoft.Extension.Logging framework in ASP.NET vNext.
11 Sep 2014 by kspviswa
This article explains how to map source code & assembly for easy debugging in Solaris OS.
13 Jan 2015 by Lai Taiyu
How to do simple image binarization?
28 Jan 2015 by Lai Taiyu
How to make a clear gray image (Histogram Equalization)?
28 Jan 2015 by Lai Taiyu
How to make a clear color image (Histogram Equalization)?
15 Dec 2010 by Lars P.Wadefalk
I have sometimes wondered if the 'with' statement would work in C/C++, just like in pascal. Meaning that it would in it's nearest scope automatically recognize class/struct members for the ones mentioned with a . or maybe -> operator.Maybe something like:TestClass* tc;float...