Home > Back-end >  The scanf () what meaning be??
The scanf () what meaning be??

Time:11-14

D the scanf (% 1) what meaning be??

CodePudding user response:

Specified column width of the input data, data column width to 1 1 d, such as when we input data is 234, assuming that your input is the scanf (" % 1 d ", & amp; 2 a), the system will automatically intercept is assigned to the variable a

CodePudding user response:

Read a single digits,
The scanf, use the pattern matching ,

Eg: enter a double-digit, reverse output,
Input: 89
Output: 98

 
int i,j;
The scanf (" % 1 d % 1 d ", I, j);
Printf (" % 1 d % 1 d ", j, I);


Scnaf essence is pattern matching function,
Details, see "c language program design, modern methods"
  • Related