The below code is a simple C program that prints the string "Hello World" to the console. Here is an explanation of each line of the code:
#include <stdio.h> is a preprocessor directive that includes the contents of the file "stdio.h" in the program. "stdio.h" is a header file that contains functions for input and output operations, such as the printf() function used in this program.
int main() is the main function of the program. All C programs start executing at the main function.
printf("\nHello World"); is a function call to the printf() function, which prints the string "Hello World" to the console. The \n at the start of the string is an escape sequence that represents a new line.
return 0; The return 0; statement is used to indicate that the main function has completed successfully. The value 0 is returned as the exit status of the program, which indicates a successful execution. When you run this code, it will print "Hello World" in the console.
#include <stdio.h> int main() { printf("\nHello World"); return 0; }To download raw file Click Here
Hello World
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions