Electrical and Computer Engineering
31 of 37
UAH
CPE 112
The get Function versus
the Extraction Operator
•char ch1, ch2, ch3;
•Statements Contents Marker Position in
• After Input the Input Stream
• A B\n
• CD\n
•cin >> ch1; ch1 = ‘A’
•cin >> ch2; ch2 = ‘B’
•
• A B\n
• CD\n
•cin >> ch1; ch1 = ‘A’
•cin >> ch2; ch2 = ‘B’
•
•