FIRST PROGRAM IN C: C PROGRAM
#include<stdio.h>
#include<conio.h>
void main()
{
printf("Welcome to the world of Computer Science.\n");
printf("No Doubt It's field is very big.");
getch();
}
For Compile: Alt+f9
For Run : Ctrl+f9
Output :
Welcome to the world of Computer Science.
No Doubt It's field is very big.
Note:-
1. #include<stdio.h> and #include<conio.h> are preprocessors thay contains the definition of related function like printf() and getch() respectively.
2. Our program starts execution from main function and it must be within pair of curly braces { ie. body }.
3. main function is user defined function but exception is that it is called by c compiler by default.
4. All the statement of main function will be within pair of curly braces({}).
5. All the statement will be terminated by semi colon(;).
6. getch(): waits user untill press any key.