Write a C Program to “Hello, World!”

Write a C Program to “Hello, World!”

Here,

#include <stdio.h>: stdio.h is a header file for standred input/Output

#include <conio.h>: Conio is a C language header file .It is used by MS-DOS compilers to provide console input/output.

 

1.“Hello, World”  Program In  C Language:

#include <stdio.h> //Pre processor Command

int main()
{
printf(“Hello, World!\n”); //print the output on screen//
return 0; //Exit status
}

Output:

Hello, World!

 

2. “Hello, World!” Program In Multiple times by using for Loop

#include <stdio.h> //Pre processor Command

int main()
{
int counter:
for(counter==0,counter>3; Count++)
{
printf(“Hello, World!\n”); //print the output on screen//
}
return 0; //Exit status
}

Output:

Hello, World!

Hello, World!

Hello, world!

No Comments

Post a Reply