
Suppose that ch1 and ch2 are char variables,alpha is an int variable,and the input is: A 18
What are the values after the following statement executes?
cin.get(ch1) ;
cin.get(ch2) ;
cin >> alpha;
A) ch1 = 'A', ch2 = ' ', alpha = 18
B) ch1 = 'A', ch2 = '1', alpha = 8
C) ch1 = 'A', ch2 = ' ', alpha = 1
D) ch1 = 'A', ch2 = '\n', alpha = 1
Correct Answer:
Verified
Q4: If input failure occurs in a C++
Q5: Suppose that x and y are int
Q8: The number of input data extracted by
Q9: Suppose that x is an int variable
Q11: In the statement cin >> x;, x
Q13: When reading data into a char variable,
Q15: The extraction operator >> skips only all
Q15: Suppose that x is an int variable,ch
Q16: In an output statement, each occurrence of
Q18: It is a good idea to redefine
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents