print hello world C
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
Explanation:
- #include <stdio.h>
: This line includes the standard input-output header file in the program, which allows the use of input and output functions.
- int main() {
and }
: These lines define the main function of the program, which is the entry point for execution. The curly braces {
and }
enclose the body of the main function.
- printf("Hello, World!");
: This line uses the printf function to display the "Hello, World!" message on the screen.
- return 0;
: This line signifies the end of the main function and returns a value of 0 to the operating system, indicating successful execution of the program.