0 votes 0 votes void fun(char **str-ref) { str-ref++; } main() { char *str=(void *)malloc(100*sizeof(char)); strcpy(str,"Ravindran"); fun(&str); puts(str); free(str); } a)ravindras b)avindras c)garbage d)compiler error A_i_$_h asked Jun 14, 2017 A_i_$_h 274 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer will be B because we are passing reference so the address will be updated Niharika 1 answered Jun 14, 2017 Niharika 1 comment Share Follow See all 2 Comments See all 2 2 Comments reply A_i_$_h commented Jun 14, 2017 reply Follow Share The answer is A..but I have no idea how 0 votes 0 votes saipriyab commented Nov 29, 2017 reply Follow Share Becuase we are postincrementing it will return initial address and then will update 1 votes 1 votes Please log in or register to add a comment.