Calling sequence

1999-04-27 Thread Amol Mohite
In gcc, if i = 2; then j = i++ + ++i; what is the value of j. what is the calling sequence in this case ? ++i first or i++ first ? why does fork have to return a value of zero to the child process ? why not -5 or -6 ?

Allocation

1999-04-27 Thread Amol Mohite
in main function if i have int i, j; can i be sure that i and j are contiguous ?

Re: poniter problem

1999-03-27 Thread Amol Mohite
Hi! So when gcc pads it to 8 bytes, can we say for sure that next allocation might be at 8byte boundary ?

Re: poniter problem

1999-03-27 Thread Amol Mohite
Thanks I meant something like : *i = ((int *)c++); I guess this will work like doing (int *)++c. Sorry i meesd the brackets. will be more clear next time. Thank anyway.

poniter problem

1999-03-26 Thread Amol Mohite
Hi! say I have a char *c pointing to an array of 10 bytes. When i do (int *)c++ (increment before typecast -- forget the brackets for nw), and equate it t an int *i then *i will return 2nd to fifth bytes as integer. Is this correct ? And supose the typecase is beore the incerenent like so :