incrementing the address ofn initialised structure

Mar 23, 2006 1 Replies

hi, i am trying to increment the address of an initialised structure.but it is always showing/printing the same address even after incrementing the address.



code part: struct codestruct { init i; int j}; struct codestruct initstruct = {1,2}; struct ptrstruct = &initstruct; for(INT I+):I


Try:

struct codestruct { init i; int j}; struct codestruct initstruct = {1,2}; struct codestruct *ptrstruct = &initstruct; /* CHANGED */ for(I=0:I hi,

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required