C++ Institute CPA-21-02 Question Answer
What is the output of the program?
#include
#include
using namespace std;
int main()
{
string s1[]= {"H" , "t" };
string s;
for (int i=0; i<2; i++) {
s = s1[i];
s.insert(1,"ow");
cout << s;
}
return( 0 );
}
C++ Institute CPA-21-02 Question Answer
What is the output of the program?
#include
#include
using namespace std;
int main()
{
string s1[]= {"H" , "t" };
string s;
for (int i=0; i<2; i++) {
s = s1[i];
s.insert(1,"ow");
cout << s;
}
return( 0 );
}