Discussion :: Strings
-
What will be the output of the program ?
#include
Answer : Option D
Explanation :
The statement str = "Kanpur"; generates the LVALUE required error. We have to use strcpy function to copy a string.
To remove error we have to change this statement str = "Kanpur"; to strcpy(str, "Kanpur");
The program prints the string "anpur"
Be The First To Comment