Question: Consider the following C++ code: string str1; string str2; char ch; int index; cin >> str1; cin >> str2; cin >> index; ch = str1[index];

Consider the following C++ code: string str1; string str2; char ch; int index; cin >> str1; cin >> str2; cin >> index; ch = str1[index]; str1[index] = str2[index]; str2 [index] = ch; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
