Hello Friends!
I have created a main function in C for printing variable size. I have also declare and initialize a global variable i. But on running that function a linker error arise with the error message undefined symbol_i. I am not understanding the logic behind that error as i have define that variable. Please friends explain the reason of error. Here is the code of function.
main()
{
extern int i;
i=20;
printf("%d",sizeof(i));
}
Waiting for you guidance.
Thanks