c scanf function usage in understanding

#include <stdio.h>
int main ()
{
Scanf ( "% D% D% D", A, B, C);
return 0;
}
Scanf () function is an input function; Format: scanf ( "% d D% D% ", A &, & D, & C);
Scanf () function is divided into two inner and outer portions quotation marks. Within quotation marks in the input type, such as:% d,% c,% f. Addressing operator marks plus outer variable represents the address & operator.
scanf% d is attached to the written as "% d% d% d" , when the input data, between the data can not be separated by a comma, can only be separated by whitespace (space or tab key or the Enter key) - - '2 (space) 3 (tab) 4 "or" 2 (tab) 3 (ENTER) 4 "and the like. If "% d,% d,% d", then the need to add the input data "," such as "2,3,4."
When there% c scanf types of input, the transport will occupy a space character input, causing the output error may use getchar ();

Guess you like

Origin blog.csdn.net/weixin_45380917/article/details/95321564