T
temper3243
Hi,
I work on a little endian machine.
i have an array int a[]={2,3,4};
i have a pointer int *p;
p=a;
now when i printf(" %x",p);
i got 0xff43n (where n is some value)
now p++
i get 0xff43n+4 (where n+4 is the 4 bytes).
I work on 32 bit machine.
Now my question is that if i do p++ , will it be 0xff43n+4 on little
endian and 0xff43n -4 on big endian.
I think no. It should be the same on the both i mean it increments the
base address by size of work. Am i correct or wrong.
Regards
Nik
I work on a little endian machine.
i have an array int a[]={2,3,4};
i have a pointer int *p;
p=a;
now when i printf(" %x",p);
i got 0xff43n (where n is some value)
now p++
i get 0xff43n+4 (where n+4 is the 4 bytes).
I work on 32 bit machine.
Now my question is that if i do p++ , will it be 0xff43n+4 on little
endian and 0xff43n -4 on big endian.
I think no. It should be the same on the both i mean it increments the
base address by size of work. Am i correct or wrong.
Regards
Nik