This is the first code
#include <stdio.h>
#include <stdlib.h>
int main()
{
short int a;
unsigned short int l;
scanf("%d%u",&a,&l);
printf("%d %u",a,l);
return 0;
}
If I give the input(may be any other input)
5
9
The output is
0 9
The second code is
#include <stdio.h>
#include <stdlib.h>
int main()
{
short int a;
unsigned short int l;
scanf("%u%d",&l,&a);
printf("%d %u",a,l);
return 0;
}
If I give the output (may be any other input)
9
5
The output is
5 9
Why scanf("%d%u",&a,&l);
do not work and scanf("%u%d",&l,&a);
works?