First Step
My First C Program
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1fUQilnW-roIGHU6_AldRjaiMKnJgvKMqfIPzM0z2-rViirNQaqX2g1lyygiGdiik6tOfnbadYBhXeMxMGIXDKG0aj1t1utdgTu3ay3NTldrdbZoML94M-rs3DY9bm_n0m2K6rDTA-BjR/s400/button_my-first-c-program.png)
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:
You can also write your main ( ) function as under:
{ printf("Hello Students"); return 0; } |
This program will print same output as shown in previous program:
Hello Students
Comments
Post a Comment