help on c

debabrata's Avatar, Join Date: Sep 2010
Light Poster
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;
}
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
What happens if you try it?
Personally I don't think you'll get ANY output, I think the compiler will throw errors.