First Step

My First C Program


You need software to write your C programs. DevC++ and Codeblocks are popular open-source software which you can use to write, compile and execute C programs. You have to save your program with .c extension. Write program code into your software and save it with file name :program1.c 

After saving your program, you have to compile your program and then you can run it. In DevC++, short cut for compiling and running your program is F11. Try following C program which prints message "Hello Students".



// My first C Program

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


This program will prints following output:

Hello Students 


You can also write your main ( ) function as under:





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



This program will print same output as shown in previous program:

Hello Stud
ents 


                                                                                                                 

Comments

Popular posts from this blog

Flowchart

History of Flowchart

Types of Flowchart