2 votes 2 votes Programming in C programming-in-c array array-of-pointers + – AnilGoudar asked Jan 4, 2018 AnilGoudar 1.6k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Bad_Doctor commented Jan 4, 2018 reply Follow Share "cd" 0 votes 0 votes nag.swarna commented Aug 18, 2018 reply Follow Share Can u Please explain 0 votes 0 votes Shaik Masthan commented Aug 18, 2018 reply Follow Share 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 votes 0 votes Please log in or register to add a comment.
3 votes 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 See all 35 35 Comments reply Show 32 previous comments srestha commented Aug 18, 2018 reply Follow Share @Shaik but sizeof integer pointer is 8 right? 0 votes 0 votes srestha commented Aug 18, 2018 reply Follow Share @Shaik then according to u then formulais p+k = p+(size of integer* size of pointer) but k shouldnot be constant?? 0 votes 0 votes Shaik Masthan commented Aug 19, 2018 reply Follow Share @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 votes 0 votes Please log in or register to add a comment.