Learn Basics Of C Language In 10 minutes

Amsgh
2 min readNov 19, 2021

--

What is the C language :

It is a high-level language. Used for creating software, OS(operating system). It is one of the most widely used programming languages. C was developed at Bell Labs by Dennis Ritchie for the Unix Operating System in the early 1970s.

Syntax :

Syntax is the main part of programming language. Which start with header files (#include<stdio.h>) and end with return type (return 0).

#include<stdio.h>

int main() // main function with integer return type

{

printf(“Welcome!\n”); // print statement to display output on the screen

return 0; // Indicates that the main function returns null value

}

1 #include<stdio.h> :

This code is including header file “ <stdio.h> “ (Standard Input / Output ).

Header file :

A header file is a file containing C declarations and macro definitions (see Macros) to be shared between several source files. This means that all functions are pre-defined in it and ready to use.

All header files have extensin (.h).

2 int main (){

// code

}

From here you start coding inside the brackets. ‘int main’ means that our function needs to return some integer at the end of the execution and we do so by returning 0 at the end of the program.

3 printf :

This function is used to print output on the screen. To use the function add header file (#include<stdio.h>).

4 return 0; :

The main function returns some value. In the above program, it returns 0 which is an integer.

If you are interested in buying programming laptops click on the link.

--

--