#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
#include <stdio.h>
: This line includes the standard input/output library in the C program. It is necessary for using functions like printf
and scanf
.
int main() {
: This line marks the beginning of the main
function, which is the entry point of every C program. The program execution starts from the main
function.
printf("Hello, World!\n");
: This line prints the string "Hello, World!" to the standard output (usually the console). The \n
represents a newline character, which moves the cursor to the next line.
return 0;
: This line indicates the end of the main
function and returns an exit status of 0 to the operating system. It signifies a successful execution of the program.