0 0 votes main() { char *c , ch[10]; int *i , j[10]; float *f , g[10]; int x; c = ch; i = j; f = g; for ( x=0 ; x<=10 ; x++ ) printf("%p %p %p\n" , c+x , i+x , f+x); } Programming in C programming-in-c output pointers + – shekhar chauhan 711 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote Here %p format specifier prints a pointer.It depend on how pointers are usually printed on your platform. Now everything is simple .Suppose pointer is printing in hexadecimal . 0028FEF6 0028FECC 0028FEE4 0028FEF7 0028FED0 0028FEE8 0028FEF8 0028FED4 0028FEAC ............. .............. .............. 0028FF00 0028FEF4 0028FECC ManojK answered Jun 5, 2016 ManojK comment Share Follow See all 3 Comments 3 3 Comments reply Sourabh Kumar commented Jun 10, 2016 reply Follow flag @manoj: it is not always true that int take 4 bytes float take 8 bytes. 0 0 replyShare Sourabh Kumar commented Jun 10, 2016 reply Follow flag @manoj: it is not always true that int take 4 bytes float take 8 bytes. rt? 0 0 replyShare ManojK commented Jun 10, 2016 reply Follow flag this is architecture depends 0 0 replyShare Please log in or register to add a comment.