+ 1
Fill in the blank? In C program
The integer element of an array address start from 3000. If size of each element is 4 bytes then what would be the address stored in vPtr after the following operation? Int v[4]={32,64,87,65}; Int *vPtr; vPtr = &v[0]; vPtr+=4;
2 ответов
+ 1
1.) int v[4]={32,64,87,65};
2.) int *vPtr;
3.) vPtr = &v[0];
4.) vPtr+=4;
At 2nd step , vPtr value will be 3000 according to you
At 4th step,the vPtr value will 3000+(4*4) = 3016
Address value
----------------
3000 32
3004 64
3008 87
3012 65
3016 garbage value
+ 2
Yeah your right!! Nikhil Maroju