C Programming Cheat Sheet
What is C Program?
Aheader fileis afilewith extension .h which containsCfunction declarations and macro definitions to be shared between several sourcefiles.
There are two types ofheader files: thefilesthat the programmer writes and thefilesthat comes with your compiler.
4.Operators in C.
Relational Operators.
I.Arithmetic Operators
II.Relational Operators
III.Logical Operators
IV.
Bit-wise Operators
V.Assignment Operators
VI.Misc Operators
5.Decision Making
6.Loops.
Afunctionis a group of statements that together perform a task.
you’re able to divide up your code into separatefunctions.
Anarrayis a collection of data items, all of the same key in, accessed using a common name.
This is done at the time of variable declaration.
A pointer that is assigned NULL is called anullpointer.
Copies string s2 into string s1.
Concatenates string s2 onto the end of string s1.
Returns the length of string s1.
Returns a pointer to the first occurrence of character ch in string s1.
Returns a pointer to the first occurrence of string s2 in string s1.
Syntax:
Array of Structure
We can also declare an array ofstructure.
Each element of the array representing astructurevariable.
When we sayInput, it means to feed some data into a program.
An input can be given in the form of a file or from the command line.
When we sayOutput, it means to display some data on screen, printer, or in any file.
This function reads only single character at a time.
Theint putchar(int c)function puts the passed character on the screen and returns the same character.
This function puts only single character at a time.
Recursion is the process of repeating items in a self-similar way.
source: www.techworm.net