0
Can we use %3d in place of %d %d%d in scanf??
Please answer my question
1 Respuesta
+ 9
Specifying the minimum width for %d format specifier has nothing to do with the number of inputs and for sure won't inform the compiler about "Hey! Make a detour by assuming the %3d means 3 integers!". Doing it the right way requires you to clearly indicate each and every of them by separate specifiers as
int a, b, c;
scanf("%d%d%d", &a, &b, &c);