Definition:
The Hello World program is the first program that beginners learn in C. It is used to display a simple message on the screen and helps understand the basic structure of a C program.
Explanation:
This program demonstrates the use of the printf() function to display output. Every C program starts execution from the main() function.
Explanation: This program displays the words Hello and World on the screen using two printf() statements.
#include<stdio.h> main() { printf("Hello, World!"); getch(); }
Output:
Explanation: This program uses the \n escape sequence to print text on separate lines.
#include <stdio.h> main() { printf("Hello\n"); printf("World"); getch(); }
Output:
Explanation: This program uses the \t escape sequence to insert a horizontal tab space between words.
#include <stdio.h> main() { printf("Hello\tWorld"); getch(); }
Output:
printf().printf() statement.#include <stdio.h> main() { printf("Rahul"); getch(); }
printf() function.#include <stdio.h> main() { printf("Aurangabad"); getch(); }
printf() statement.#include <stdio.h> main() { printf("Welcome to C Programming"); getch(); }