The difference between printf and scanf
● These are two functions with completely different functions. printf writes to the standard output device (usually the monitor) To output data, scanf inputs data from the standard input device (usually the keyboard).
● printf is the output function and scanf is the input function.
Extended content:
printf() function:
is a formatted output function, generally used to output information in a specified format to a standard output device .
The calling format of the printf() function is: printf("
scanf:
scanf is the input function used to get data from the keyboard.
The calling format of the scanf() function is: scanf("%d/%c/%s", ¶meter, ¶meter, ¶meter).
The above is the detailed content of The difference between printf and scanf. For more information, please follow other related articles on the PHP Chinese website!