My First Program In C: Hello World!!

C Programming Language Fundamentals of C Language (Article) Fundamentals of C Language (Program)

70943

In this section we will learn that how to write first program in C programming language. hello world!!

Program:

#include"stdio.h"

int main() {
   /* my first program in C */
   printf("Hello, World! \n");
   
   return 0;
}

Output:

Hello, World!

Explanation:

This is our first program in c Programming Language

 #include"stdio.h"

"stdio.h" is basically a predefined standard input output library Which contain functions, marcos and variables.

#include"stdio.h" defines that it is including stdio.h library files with this program.

"printf" is a predefined function which is used to display something on the screen. In this program we want to display "Hello, World!" .

There are four types of functions in C :

1) function with arguments and return value

2) function with arguments and no return value

3) function with no argument and return value

4) function with no argument and no return value

'return value' means, the process or function after performing the certain operation gives you back a resultto the parent function from which it is being called. Actually, main is the parent function of all the functions in C. If we do not need any return value we use return type void but here we use return type int.

return 0 defines that, it will returns 0 .


This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.