Hello World

After learning the structure of C program, let's code a program and make it print "Hello World!".
 #include <stdio.h>
 int main()
 {
    printf("Hello World!");
    return 0;
 }
Explaination Of the Program : First we need to declare the header file. (Header file will be covered in the upcoming post). After declaration of header file, we need to declare the main function. Compiler starts execution of any program from main function. Inside the main function contains the printf function whose main function is defined in stdio.h header file. After writing the whole program, we need to add return 0; to stop the execution of the program.
Previous
Next Post »
0 Comment