Wednesday, September 9, 2015

My First C Program

Writing First C Program

Write a C program to print Hello World.

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

Output of the program

Hello Students


* * * * *

This program can also be written as shown below:

Format 1:

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

Output of the program

Hello Students
* * * * *

Format 2:

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

Output of the program

Hello Students



2 comments: