Monday 10 June 2013

155) Array of Pointer


1 comment:

  1. You Said Generally integer occupies 4 bytes and since array size is 3 it occupies 4*3=12 bytes.This is not correct.If you had taken char,double,float,etc instead of int the size of memory block allocated for the pointers would have been the same 12 bytes. Bcoz it is the pointer which takes up memory and every pointer occupies 4 bytes in any compiler....So it 4(size of each pointer irrespective of its pointee)*3=12....

    ReplyDelete