Monday, February 8, 2016

My First C Program

My First C Program

Try following C program which prints message "Hello Students".


// My first C Program

#include<stdio.h>
void main()
{
    printf("Hello Students");
}

Output of the Program:

Hello Students


You can also write your main ( ) function as shown below:


// My first C Program

int main()
{
    printf("Hello Students");
    return 0;
}

Output of the Program:

Hello Students 


Both the above programs will print same output.


2 comments: