Solved

What Is the Problem with This Bit of Code? on Most

Question 37

Essay

What is the problem with this bit of code? On most systems,you don't get a chance to enter the letter.Why?
cout << "Enter a number:\n";
int number;
cin > number;
cout << "Enter a letter;\n";
char symbol;
cin.get(symbol);
cout << number << " " << symbol << endl;
Dialog: (Computer output is bolded. )
Enter a number:
21
Now enter a letter:
21

Correct Answer:

verifed

Verified

On some systems,you won't get a chance t...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents