The Scanf() Function
The scanf() function is used to get input from user through keyboard during execution of program. The values is input into variable in a specified format. This function can be used to get input into numeric, character and string type variables. This function is defined in the "stdio.h" header file.The general syntax of scanf() function is as follows;
scanf ( format_string, variables ) ;
Example
#include < stdio.h >
#include < conio.h >
void main ( )
{
char ch ;
printf ( " Enter a Character \n " ) ;
scanf ( " %c " , &ch ) ;
printf ( " Enter character is : %c " , ch ) ;
}
No comments:
Post a Comment
Thanks For Visiting Here...!! I will Reply you as soon as possible.