First C Program

 To write the first c program, open the C console and write the following code:

  
#include <stdio.h>
int main()
{
 printf("Hello C Language");  //single line comment
 return 0;
/*
    multi
    line
    comments
*/
}

Output

 Hello C Language

 

How to compile and run the c program

There are 2 ways to compile and run the c program, by menu and by shortcut.

  • By menu

Now click on the compile menu then compile sub menu to compile the c program.

Then click on the run menu then run sub menu to run the c program.

  • By shortcut

Or, press ctrl+f9 keys compile and run the program directly.

 

You will see the following output on user screen. 


 
 
 
 

 



No comments:

Post a Comment