S
Shivanand Kadwadkar
I was reading a forum there i found following program.
main()
{
int i, j;
scanf("%d %d"+scanf("%d %d", &i, &j));
printf("%d %d", i, j);
}
the above program is working fine.
Input:
4
5
6
output
6 5
this meas i=6 and j=5.
any idea why i=6 and j=5 ( i was thinking i should be i=5 and j=6)and
what the "+" is doing in scanf?
Thanks for sharing comments.
main()
{
int i, j;
scanf("%d %d"+scanf("%d %d", &i, &j));
printf("%d %d", i, j);
}
the above program is working fine.
Input:
4
5
6
output
6 5
this meas i=6 and j=5.
any idea why i=6 and j=5 ( i was thinking i should be i=5 and j=6)and
what the "+" is doing in scanf?
Thanks for sharing comments.