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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 26 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply