The First Program
#include<stdio.h>

int main()
{
	printf("Hello World!");
	return 0;
}
#include<stdio.h>
  • The prototypes of different library functions are grouped together into categories according to their functionalities and are stored into different header files.
    stdio.h: prototypes of standard input/output functions
    conio.h: prototypes of console input/output functions
    math.h: Prototypes of mathematics related functions
  • Anything starting with '#' will be handled by the preprocessor.
  • The 'include' directive causes the entire contents of the file to be inserted into the source code.
int main() {...}
  • Function definition:
    <return type> <function name> ( <list of arguments> )
    {
    	<function body>
    }

     

printf("Hello World!");
  • Prototype:
    int printf(const char *format,...);
  • Writes the C string to stdout.
  • On success, the total number of characters/bytes written is returned. On error, a negative number is returned.

Contributor's Info

Created:
0Comment