+ 1

scanf() function

Why I have different result when I have use the " , " symbol between two formats specifier in the scanf() function ? scanf("%d %d", & a, &b) => return right result scanf("%d , %d", &a, &b) => return something delirium.

9th Mar 2019, 1:31 PM
Alexey Verhola
Alexey  Verhola - avatar
1 Respuesta
+ 3
If you put the comma there, you also have to put it into the input, together with space. I tried it and it worked In the question you have also one space before the comma -> it needs to be in what you input
9th Mar 2019, 5:13 PM
michal