Search

My First C program

My First C Program

You need software to write your C programs. DevC++ and Codeblocks are popular open-source software that you can use to write, compile, and execute C programs. 
  • You have to save your program with a .c extension. 
  • Write program code into your C software and save it as 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 the C program which prints the message "Hello World".

Program Code 

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


Output of Program

  Hello World