What will be the output of the following C code?
#include <stdio.h>
int main()
{
short int i;
scanf("%*hd", &i);
printf("%hd", i);
return 0;
}
#include <stdio.h>
int main()
{
short int i;
scanf("%*hd", &i);
printf("%hd", i);
return 0;
}
A. Compilation error
B. Somegarbage value
C. Whatever user types
D. Depends on the standard
Answer: Option B
Join The Discussion