Table of Contents
1. Hello World2. How to Write ?
3. Code
Today you will be learning many new things regarding C - Programming
Lets start with the
basics.....
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.
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
Try to compile the code below and execute it
Hence we learned how to write the basic code in C-Programming.