Hello everyone, I need some details about various types of variables used in C(like local,global,static,const,extern,volatile) & also their behavior inside functions. For ex:- what will be the output of the program, with reason void main() { int i=2,j=4; func(i , &j); printf("i=%d j=%d",i,j); } void func(int a, int *b) { i=i*i; *j=*j * *j; }
What happens if you try it? Personally I don't think you'll get ANY output, I think the compiler will throw errors.