What happens if characters ‘w’, ‘o’, ‘r’, ‘l’ and ‘d’ are entered as input?

What happens if characters ‘w’, ‘o’, ‘r’, ‘l’ and ‘d’ are entered as input?
#include #include using namespace std;
int main()
{
string s1 = “Hello”; string s2; getline( cin, s2 ); cout << s1 + s2; return( 0 ); } A. It prints: Helloworld
B. It prints: Hello
C. It prints: world
D. Compilation error

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.