D
Dingjiu
I wrote a short code as follow:
#include<stdio.h>
main()
{
int a,b;
scanf("%d%d",&a,&b);
printf("%d %d",a,b);
return 0;
}
If I input a pair of integer number, It can work,but the question is
when I input the data like this :1.3 2 , the output will be 1 and a
random number.Any body who can explain why this kind of things happen?
Thank you
#include<stdio.h>
main()
{
int a,b;
scanf("%d%d",&a,&b);
printf("%d %d",a,b);
return 0;
}
If I input a pair of integer number, It can work,but the question is
when I input the data like this :1.3 2 , the output will be 1 and a
random number.Any body who can explain why this kind of things happen?
Thank you