274 views
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

1 Answer

0 votes
0 votes
Answer will be B because we are passing reference so the address will be updated

No related questions found