Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   help on c (http://www.go4expert.com/forums/help-on-c-t23845/)

debabrata 11Nov2010 16:22

help on c
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)
*j=*j * *j;

xpi0t0s 12Nov2010 22:19

Re: help on c
What happens if you try it?
Personally I don't think you'll get ANY output, I think the compiler will throw errors.

All times are GMT +5.5. The time now is 20:37.