I have two questions,
1
the output is 1 1Code:main(){ int i =257; int *iptr =&i; printf (“%d %d”,*((char*)iptr),* ((char *)iptr+1)); }
here, iptr at first should print the value stored in first 8 bits of variable i and in next it should print value of second 8 bit block.
would you please explain why the out put is so?
2--
why there is an linker error, how should we use the variable so that the error wont come?Code:main() { extern int iExtern; iExtern = 20; printf(“%d”,iExtern); }