google.com, pub-8786015629279405, DIRECT, f08c47fec0942fa0 Write a Program to print Hello in C

Write a Program to print Hello in C

1






//Write a Program to print Hello in C

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("Hello, Welcome to the World of C Programming");
getch();
}

Output


Here,In the C Programming Language, the #include directive tells the pre-processor to insert the contents of another file into the source code at the point where the #include directive is found. Include directives are typically used to include the C header files for C functions that are held outsite of the current source file.

where stdio.h means standard input/output and h stands header file.

like as conio.h means console input/output and h stands header file.


void

void is a keyword in C language, void means nothing, whenever we use void as a function return type then that function nothing return. here main() function no return any value.


In place of void we can also use int return type of main() function, at that time main() return integer type value.

main() 

function is the entry point of any C program. It is the point at which execution of program is started. When a C program is executed, the execution control goes directly to the main() function. Every C program have a main() function.


(Carley Braces ) uses for start a block of code.


clrscr(); 

It is a predefined function in "conio.h" (console input output header file) used to clear the console screen. It is a predefined function, by using this function we can clear the data from console (Monitor). Using of clrscr() is always optional but it should be place after variable or function declaration only.

printf();

Printf is a predefined function in "stdio.h" header file, by using this function, we can print the data or user defined message on console or monitor. While working with printf(), it can take any number of arguments but first argument must be within the double cotes (" ") and every argument should separated with comma ( , ) Within the double cotes, whatever we pass, it prints same, if any format specifies are there, then that copy the type of value. The scientific name of the monitor is called console.

getch() is used to get a character from console but does not echo to the screen.

}

end of code block


Post a Comment

1 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Thank you for your interest 😊

We will back shortly after reviewing...

Thank you for your interest 😊

We will back shortly after reviewing...

Post a Comment

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top