Tuesday, June 1, 2010

Find the value of the modified string

This is my favorite question. Its so much fun to listen to all the different answers and their logical explanations :)

Question

If my C program contains only the following 2 statements ( inside main function ofcourse !! ), then what is the value of the string pointed by "x", after the execution of these 2 statements.


Answer


Please follow this link to post your answer. I shall update this post with the correct answer in about a week's time.

1 comment:

  1. Posting this on behalf of Kalpana.

    you would get a runtime error, since it is a constant string and if you try to modify you get a runtime error.

    --Kalpana

    ReplyDelete