Question: Say you have a pointer char * p = &a , and that char a is at address 0 x 1 0 0 0 .

Say you have a pointer char* p = &a, and that char a is at address 0x1000. What's the value of p+2?
A: you shouldn't compute that -- that's asking for a segmentation fault
B: 0x1010, since pointers are 8 bytes on a 64-bit computer
C: Almost certainly 0x1002
D: depends on the size of a pointer on your system

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!