This will overwrite memory cells that have not been reserved for name.
Correct
It should be
strcpy("name", TodayIsMonday);
Not quite. Try again!
It should be
strcpy(“TodayIsMonday”, name);
Not quite. Try again!
No, nothing wrong.
Not quite. Try again!
3.
Even more review: What is the result of the following:
strcmp("my_apple", "my_banana");
Feel free to use the window below to try out some code. Be sure to work the correct answer out "by hand" first before verifying your answer using the code window.
Final review question (I promise!): Suppose a string has been declared as follows:
char food[30];
You want the user to enter their favorite food and store the response in the string food. What is the correct command to do so?
Feel free to use the window below to try out some code. Be sure to work the correct answer out "by hand" first before verifying your answer using the code window.