simple functions

 

Important functions for sample C program

 
1. printf() 
------------- 
This function is used to display the messages,variables etc on the output screen or console. 
Syntax 
------- 
printf("messages in double quotes",var1,var2,var3,..............); 

2. scanf() 
------------ 
This function is used to read the variables explicitly at run time. 
Syntax 
------- 
scanf("format specifiers",&var1,&var2,........); 

3. clrscr() 
------------ 
This function is used to clear the output screen. 
Syntax 
------- 
clrscr(); 

4. getch() 
------------ 
This function is used to read a single character. This is mainly used to display the output without termination. 
Syntax 
------- 
getch();