3. Basic Syntax
#include <stdio.h>
The header file stdio.h stands for Standard Input Output.
int main()
Main functions from where the program starts executing
Followed by the body of the program
/* Comments */ -------------> comments in C
8. Functions in C
The general form of a function definition in C programming language
is as follows −
return_type function_name( parameter list ) {
body of the function
}
9. /* function returning the max between two numbers */
int max(int num1, int num2) {
/* local variable declaration */
int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}
10. For the above defined function max(), the function declaration is as follows −
int max(int num1, int num2);
Parameter names are not important in function declaration only their type is
required, so the following is also a valid declaration −
int max(int, int);
/* calling a function to get max value */
ret = max(a, b);
11. Arrays
Arrays a kind of data structure that can store a fixed-size sequential collection
of elements of the same type.
20. typedef
The typedef is a keyword used in C programming to provide some
meaningful names to the already existing variable in the C program.
Syntax of typedef
typedef <existing_name> <alias_name>