Welcome to C Programming (First Program)

Program:


#include<stdio.h>

#include<conio.h>

void main()

{

    clrscr();

    printf("Welcome to C Programming");

    getch();

}


Output:


Welcome to C Programming


Explanation:


#include<stdio.h> :

                It is a preprocessor file which include the header file of stdio.h(standard input output ) header file. In these header file contains the functions of printf(), scanf(), etc.,

#include<conio.h>

                It is a preprocessor file which include the header file of conio.h(console input output ) header file. In these header file contains the functions like clrscr(), getch(), etc.,

void main(){}

                In these Main function we can write our entire program with statements.

                void => It tell is an Empty argument

clrscr()

                This function clears the console screen of any previous outputs so that the output of the program currently executed alone is visible on the console screen.

getch()

                 The function getch() basically stands for "get character". The getch() function is usually used to hold the output screen until the user presses on the keyboard, i.e. the case of pressing key to continue.




Next Topic        :  Escape Sequence Characters

Previous Topic :  Installation of Turbo C++

No comments:

Post a Comment