#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
#include <stdio.h>
: This line includes the standard input-output library, which is necessary for using functions like printf
in the program.
int main() {
: This line marks the beginning of the main
function, which is the entry point of every C program.
printf("Hello, World!\n");
: This line uses the printf
function to print the string "Hello, World!" followed by a newline (\n
) character to the standard output (usually the console).
return 0;
: This line indicates the end of the main
function and returns an integer value (in this case, 0) to the operating system, indicating that the program executed successfully.
}
: This closing brace marks the end of the main
function and the end of the program.