the programprintf function is used that sends results to terminal like printf and scanfthere are different functions in that can carry out the input-output operations these functions are collectively known as standard input/output library program that uses standard input/output functions must contain the following statement at the beginning of the program#include scanf(the scanf()function is used to read formatted data from the keyboard the syntax of the scanf(function can be given asscanf ("control string"arg arg arg argn)the control string specifies the type and format of the data that has to be obtained from the keyboard and stored in the memory locations pointed by the argumentsarg arg ,argn the prototype of the control string can be given as%[*][width][modifier]type is an optional argument that suppresses assignment of the input field that isit indicates that data should be read from the stream but ignored (not stored in the memory locationwidth is an optional argument that specifies the maximum number of characters to be read howeverif the scanf function encounters white space or an unconvertible characterinput is terminated modifier is an optional argument (hlor lwhich modifies the type specifier modifier is used for short int or unsigned short intl is used for long intunsigned long intor double values finallyl is used for long double data values type specifies the type of data that has to be read it also indicates how this data is expected to be read from the user the type specifiers for scanf function are given in table table type specifiers type % % % % ,% ,% ,% ,% qualifying input for single characters for integer values for floating point numbers % for octal numbers % for sequence of (string ofcharacters % for unsigned integer values % ,% for hexadecimal values the scanf function ignores any blank spacestabsand newlines entered by the user the function simply returns the number of input fields successfully scanned and stored as we have not studied functions till nowunderstanding scanf function in depth will be bit difficult herebut for now just understand that the scanf function is used to store values in memory locations associated with variables for thisthe function should have the address of the variables the address of the variable is denoted by an sign followed by the name of the variable look at the following code that shows how we can input value in variable of int data typeint numscanf(% "&num)the scanf function reads first four digits into the address or the memory location pointed by num