To get into the tree house you say the password pumpkin. Write is_secret_word(word): return true if word is exactly "pumpkin" (same case), otherwise false. In C you can't compare two strings with ==.
is_secret_word("pumpkin")→Trueis_secret_word("potato")→Falsebool is_secret_word(const char *word)#include <stdbool.h>
#include <string.h>
bool is_secret_word(const char *word) {
bool ok = false;
// your code here: compare with strcmp; 0 means the same
return ok;
}
Run tries the examples. When they look right, Submit.