C Library

c library

C Library

#include<stdio.h> :

#include<stdio.h> is a reference to a special file called stdio.h which contains information that must be included in the program when it is compiled. The inclusion of this required information will be handled automatically by the compiler. You will find it(c library) at the beginning of almost every C program.

Basically, all the statements starting with # in C program are called preprocessor directives.

This statement allows you  you to use some predefined function such as, printf().

Standard Input/Output functions.

#include<math.h> :

Mathematics functions.

#include<string.h> :

String handling functions.

#include<wchar.h> :

Wide string handling functions.

#include<conio.h> :

Console Input Output Header File which manages input/output on console based application.

main() :

main(), declare the start of the function , while the two curly brackets { } shows the start and finish of the function.

printf() :

printf(), print the words on the screen The text to be printed is enclosed in double quotes. The \n at the end of the text tells the program to print a newline as part of the output. That means now  if we give a second printf statement, it will be the next line.

clrscr() :

This is used to clear the previous output in the output window.

scanf() :

Reads character, string, numeric data from keyboard.

getch() :

This function is used to hold the output window, otherwise when you run your code it will display the output window for just a fraction of second. So, it is necessary to use it, if we want to hold our output screen.

For details of C Language…