C “Hello World!“ Programming for beginners
In this example of C tutorial, you will take the first step to print “Hello World” on the screen/console.
Writer a C program to print “Hello World!”
Program:
================================
================================
Output:
================================
Hello World!
================================
Explanation of the program:
# : If any line start with #, it is a pre-process only that
line. Special symbol (#) to indicate the pre-processor directive.
stdio.h : This file contains functions such as printf() and
scanf() to print in the screen and taking input from the user.
main( ) : The C program execution starts from this line. The
main() function is called by the operating system (O/S).
return 0 : This statement is to
Exit the program. It tells the operating system (O/S) that the program has run
successfully, as 0 means success. In place of 0 we can use any number like 1,
2,… but the general convention is to write 0.
0 Comments