In C, using scanf() with the parameters, scanf("%d %*d", &a, &b) acts differently. It enters value for just one variable not two!
scanf()
scanf("%d %*d", &a, &b)
Please explain this!
scanf("%d %*d", &a, &b);
The * basically means the specifier is ignored (integer is read, but not assigned).
*
Quotation from man scanf:
* Suppresses assignment. The conversion that follows occurs as usual, but no pointer is used; the result of the conversion is simply discarded.
2.1m questions
2.1m answers
60 comments
57.0k users