Page 1 of 1

CHALLENGE 11.4.3: Find C string in C string. ACTIVITY Assign the first instance of "The" in movie Title to movieResult.

Posted: Sun Jul 03, 2022 9:59 am
by answerhappygod
Challenge 11 4 3 Find C String In C String Activity Assign The First Instance Of The In Movie Title To Movieresult 1
Challenge 11 4 3 Find C String In C String Activity Assign The First Instance Of The In Movie Title To Movieresult 1 (54.31 KiB) Viewed 27 times
#include <iostream>#include <cstring>using namespace std;
int main() { char movieTitle[100]; char* movieResult = nullptr;
cin.getline(movieTitle, 100);
/* Your solution goes here */
cout << "Movie title contains The? "; if (movieResult != nullptr) { cout << "Yes." << endl; } else { cout << "No." << endl; }
return 0;}
CHALLENGE 11.4.3: Find C string in C string. ACTIVITY Assign the first instance of "The" in movie Title to movieResult. 397756.2392630.qx3zqy7 1 #include <iostream> 2 #include <cstring> 3 using namespace std; 456780 5 int main() { 9 10 11 12 13 char movieTitle [100]; char* movieResult = nullptr; 780 cin.getline (movieTitle, 100); /* Your solution goes here */ cout << "Movie title contains The? "; if (movieResult != nullptr) { cout << "Yes." << endl; 14 15 16 } 17 else { 18 cout << "No." << endl; Doll passed passed