Basic structure and definitions

            Structure and definitions 



Important library functions :
#include <stdio.h>
This is a preprocessor command that comes as the first statement in our codes. All preprocessor command start with #symbols. The #include statement tells the compilar to includ the standard input, output library or header file in the program. This file has become in built function.

Preprocessor
Language processing system translates the high level language to machine level language or absolute machine code.

Compilar

A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses.

Int main()

Every c program contains a main function which the starting point of the program. Int is the return type of main function. Int means return the value. 

Printf 

It is a function which is used to display the message. Printf stands for print formated. 

clrscr () 

It is already define in header file <conio.h>.This function is use to clear the screen. It clears the previous output from the screen and display the output of current program from the first line of the screen. 

exit() 

It is already defined in header file <process. h>This function terminates the program. 
Example:
exit() ;

Header file 

In every C program the first Statement is preprocessor directive. It includes the header files are use for supporting the various library function. It contains declaration for certain related library function. All extensions of header file is .h  Header files are enclosed with in the angle brackets or may imposed double quotes. 

 SYNTEX:

#include <header file.h>
#include "header file. h" 

Example :

#include <stdio.h >
#include "stdio.h" 

Notes:

1 stdio stands for standard input, output. 
2.conio stands for consoal input, output.
3 stdio.h and conio.h is a library file. 
4.int is a data type which occupies the two bytes of space into the memory. 
5.a,b,c are variable. 
6.clrscr is a function which is used to clear the screen. 
7.printf is formatted function which is used to display the message. 
8.scanf is a function which is used to input the data through the keyboard.
9.%d is format specifier for integer type of value.
10./n is an escape sequences which is used for new line.
11.getch is a function which is used to stop the screen. 

Important notes :

Alt+f9 is used for compile the program. 
Ctrl+f9 is used for run the program. 

Flow of c program :
Preprocessor - - compilations - - assembly--linking - - loading

Example :

Hello World
#include <stdio.h>
int main()
{
printf ("Hello World \n");
return 0 ;
}

#include <stdio.h >
//tells the compilar to include standard input output header file.

int main()
{
printf ("Hello World \n") ;
//printf Hello World on user screen.

return 0 ;
//return the value zero to the operating system.
}






            👉   " Believing in yourself 

               is the first to success".👈
         
                        Thank you

Comments

Popular posts from this blog

Introduction of C Language

Constant in C

Computer generation