CI
C++ Certified Associate Programmer
219 Questions
Question No. 1
What happens when you attempt to compile and run the following code?
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s1[]= {"How" , "to" };
s1[0].swap(s1[1]);
for (int i=0; i<2; i++) {
cout << s1[i];
}
return( 0 );
}
Choose the correct option from the given list.
01 / 219