Program to print " Hello, World!" in C language
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
Output
______________________________________________
How "Hello, World!" program works?
- #include <stdio.h> includes standard input output library function.
- The stdio.h file contains functions such as scanf() and printf() to take input and display output respectively.
- If we use printf() without #include <stdio.h> program will not compile
- The main() function is the entry point of every C program, execution of program starts from main().
- The printf() function used to send the formatted output on screen.
- The " return 0 " statement is the 'exit status' of program.
Comments
Post a Comment