0

Please explain this program.

#include <stdio.h> int main() { int x, y; char text[20]; scanf("%2d %d %*f %5s", &x, &y, text); /* input: 1234 5.7 elephant */ printf("%d %d %s", x, y, text); /* output: 12 34 eleph */ return 0; }

13th Oct 2019, 1:59 PM
Harshit Nema
Harshit Nema - avatar
4 Answers
0
Supriya what about 5.7 input ?
13th Oct 2019, 2:32 PM
Harshit Nema
Harshit Nema - avatar
0
Supriya so is it for float ,i thought that for two integers value there should be two integer input .
13th Oct 2019, 2:35 PM
Harshit Nema
Harshit Nema - avatar