Hello World Programming in C
#include<stdio.h> int main() { // Printf() shows the string enclosed in quotation marks. printf(" Hello, World!"); printf(" \n"); return 0; }
OUTPUT:
Hello, World!
Knowing the code for #include “stdio.h”: This line instructs the compiler to include the standard input-output library (stdio.h) via a preprocessor directive. This library offers functionality for tasks like printf and scanf that include input and output.
Int main(): This line declares the program’s main function and specifies that it will return an integer value with a return type of int.
“Hello, World!” printf; Displaying output on the screen is done using the printf function. The string “Hello, World!” contained in double quotations is printed in this instance.
The character “n” is an escape sequence that stands in for a newline character. Here, it is used to add a new line following the appearance of “Hello, World!”
return 0;: To retrieve a value from the return statement.