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.
Compile and run the code below in your own C environment.
#include <stdio.h>
/* Don't forget to #include the string library here!
The header for the library is called string.h */
int main(void) {
/* You'll have to fill in the details here! */
return(0);
}
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.
Compile and run the code below in your own C environment.
#include <stdio.h>
/* Don't forget to #include the string library here!
The header for the library is called string.h */
int main(void) {
char food[30];
printf("What is your favorite food? ");
/* You'll have to fill in the details here! */
/* Make sure everything worked: */
printf("Your favorite food is %s.\n", food);
return(0);
}