scanf() function: Console input function in C

scanf() function is used to read data types and it automatically converts numbers in to proper internal formats. The operation of scanf() is just opposite to the function of printf().


int scanf(const char *control_string, …);

Here, the control_string contains format specifiers, white space characters and non white space characters.

For Example:

scanf(“%d”, &count);

Leave a Reply