Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


problem with static...

anandprmanandprm Member Posts: 2
problem with static... Posted by anandprm on 15 Jul 2009 at 2:05 AM
I have a code written as follows.

int main()
static int i;
printf("%d", &i);
I compile the code and run the ./a.out in background(&)
and I run the same ./a.out again. The value of the address
of i is same. can any one explain me why. I think two are different processes and they should have their separate data segment.
Thanks In advance.

Sign In or Register to comment.