0
What is wrong with this code?
#include <stdio.h> int main() { char favoriteDairyProduct[30]; scanf("%s",favourteDairyProduct); if (strcmp(favoriteDairyProduct, "cheese") == 0) { printf("You like cheese too!"); } else { printf("I like cheese more."); } } return 0; }
2 Answers
+ 3
There is a typographical error in the array name on line 4.
There is an extra closing brace after the else clause.
+ 1
Ok tnx