2 2 votes Programming in C programming-in-c array array-of-pointers + – AnilGoudar 4.2k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply Bad_Doctor commented Jan 4, 2018 reply Follow flag "cd" 0 0 replyShare nag.swarna commented Aug 18, 2018 reply Follow flag Can u Please explain 0 0 replyShare Shaik Masthan commented Aug 18, 2018 reply Follow flag check this once https://gateoverflow.in/226520/assignment-gate-dsa-2014 note that the above question solved by taking int size=4B if int size=2B, then o/p is cd 0 0 replyShare Please log in or register to add a comment.
3 3 votes Note: p will be updated as p=(p+sizeof(int)) Bhagyashree Mukherje answered Aug 18, 2018 • edited Aug 18, 2018 by Bhagyashree Mukherje Bhagyashree Mukherje comment Share Follow See all 35 Comments 35 35 Comments reply Show 32 previous comments srestha commented Aug 18, 2018 reply Follow flag @Shaik but sizeof integer pointer is 8 right? 0 0 replyShare srestha commented Aug 18, 2018 reply Follow flag @Shaik then according to u then formulais p+k = p+(size of integer* size of pointer) but k shouldnot be constant?? 0 0 replyShare Shaik Masthan commented Aug 19, 2018 reply Follow flag @srestha, mam sizeof integer pointer is 8 size of ( integer pointer ) = size of ( character pointer ) = size of ( float pointer ) = ... due to anything represent in the same memory, 64 KB ===> 216 B ===> 16 bits required to identify each Byte ===> pointer size is 2 B but always we can't have 64 KB, but by default we take it only. then according to u then formulais p+k = p+(size of integer* size of pointer) in this question k=sizeof(int), in some other question k=sizeof(float) or k=100 ( some constant ) 0 0 replyShare Please log in or register to add a comment.