Detail explanation of C programming structure

Detail explanation of C programming structure

 Program to print the Sum of two number


Output


(1) Header files
In c header files are used to function definition. which is using #include

#include<stdio.h>: It is a standard input output header file. It contains the function definition of input-output functions such as scanf(), printf() etc.
#include<conio.h>: It is a header file, which is included in the program this is used to use, clrscr(), getch(), etc. We do not need to include this file in the C program. 
#include<math.h>: This header file is used for mathematical functions such as pow(), sqrt(), sin(), tan(), cos() etc.
#include<string.h>: It is string header file.It use for string manipulation. It contains the function definition of string processing functions such as strlen(), strcat(), strcpy() etc. 

(2) void main():- Every C program should begin with main(). Thus void main() is a starting point of the program.

(3) It is part of a data declaration. In this program, the nature of a, b and c are integers so use int.
For other data types keyword 
Enter here

(4) printf():- It is used to display the conversation characters along with some unchanged character.

(5) scanf(): This function used to take input from the user through a keyboard.

(6) In this part add the two-digit and stores the sum of two numbers in the s variable.

(7) Here \n is used to display in a new line. And to display integer we have to write =%d, the integer variable

For practice and more basic examples of c program
For detail concept of c programming

Post a Comment

0 Comments