Thursday, March 13, 2014

Main function

Almost all C programs consist of multiple functions. main () that should be found in all C programs is the program's main function. The function will be executed firstly is main (). The statements (lines of code) will be executed in the program {-} are written in curly brackets. The structure of each of the statements of brackets is called code blocks. A block of code has variables that is used in the program and commands to perform operations to be performed.

An example
 

+/- Click and see the code that is about the article.
/* The first C program */
/* We will see "Hello World !" on the screen. */
/* source : freelearncprogramming.blogspot.com */

#include <stdio.h>

main ()

{
printf("Hello World !");

return 0;

}

No comments:

Post a Comment