Hello World

Table of Contents

1. Hello World
2. How to Write ?
3. Code

Today you will be learning many new things regarding C - Programming

Lets start with the basics.....

Hello World

C - Programming is one of the oldest languages thats been used everywhere in the world. You can say, thats its the grandfather of all programming langauges.

Starting with the basics, you should know what each code we write in a c-program means. So we will be using a example of Hello World, as thats the most basic c program code that anyone could write with very little knowledge.

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

Here, you are seeing the basic code of Hello World.
Lets see how can we write this code.



How to write ?

In every C-Program, we need to deploy some libraries or header files.
These "Libraries" have many functions build into it.

stdio.h is a header file that contains many of the important basic functions, that we will need to do the input and output in the program.


Note

printf and scanf are the basic functions of Input and Output.



So to use this library in a C program we need to use the following function called #include
We can use #include to insert any header file that we want.

                        
                            #include <stdio.h>
                        
                    

The next part would be the main section. Here we write our main program.

                        
                            int main()
                            {
                                
                            }
                        
                    

The main program is written inside this curly bracket {}


printf () is a command in which we can write anything in the brackets and it will print it for us.

For example: printf("Hello World!");

This will print a the string "Hello World" in the console


Code:

Try to compile the code below and execute it



Conclusion

Hence we learned how to write the basic code in C-Programming.