1 votes 1 votes void main() { char*s[]={"iceland","Greenland","Ireland","Switzerland"}; char **ptr[]={s+3,s+2,s+1,s}; char ***p=ptr; printf(\%s ",**++p); printf(\%s ",*(*++p+3); printf(\%s ",*p[-2]+3); printf(\%s ",p[-1][-1]+1); } Programming in C programming-in-c output programming-in-c output explanation + – sushmita asked Sep 28, 2018 • edited Sep 28, 2018 by Shaik Masthan sushmita 449 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 0 votes 0 votes printf(\%s ",**++p); O/P is: Ireland printf(\%s ",*{*++p+3); O/P is : enland printf(\%s ",*p[-2]+3); O/P is : tzerland pradeepchaudhary answered Sep 28, 2018 • selected Sep 28, 2018 by sushmita pradeepchaudhary comment Share Follow See all 3 Comments See all 3 3 Comments reply Shaik Masthan commented Sep 28, 2018 reply Follow Share @sushmita i am not getting that, without the explanations, how you select this answer as BEST ? @pradeepchaudhary May you know the process, how to solve it, But by directly giving the answers, some other persons can't get it. ( By running this program in online compilers, everyone gets the answers ) 0 votes 0 votes Magma commented Sep 28, 2018 reply Follow Share This is really nice question pradeepchaudhary can you please explain me step by step .??..It's very helpful for everyone 0 votes 0 votes Magma commented Sep 28, 2018 i edited by Magma Sep 28, 2018 reply Follow Share correct answer should be Ireland null tzerland reenland 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes I just did only 1 mistake here at address 403 in I missed "T" I write "Swizerland " instead of "Switzerland" Magma answered Sep 28, 2018 • edited Sep 28, 2018 by Magma Magma comment Share Follow See all 2 Comments See all 2 2 Comments reply Somoshree Datta 5 commented Oct 2, 2018 reply Follow Share @Magma why would it be Null for the second printf() statement? *(1016) can give any garbage value. So the result is undefined, isnt it? why would *(1016) print null? 0 votes 0 votes Magma commented Oct 2, 2018 reply Follow Share yeah correct it can give any garbage value Somoshree Datta 5 0 votes 0 votes Please log in or register to add a comment.