Very First C program


Very First C program

#include <stdio.h>
#include <conio.h>

void main()
{
clrscr();

printf("Welcome to C"); // to print the message

getch();

}

Output:

Welcome to C

Description:

--First are the header files as we discussed in header files tutorial.

--void main() :

Next is the main method. Every program execution starts from this main method.
void is the return type. We will discuss about it in the functions tutorials.

Next we have used clrscr(), printf(), getch() functions, we already studied about these in our in-built functions section.




























     Prev                                                   NEXT

0 comments:

Post a Comment