DONT ANSWER, NED KAMA. WILL FLAGG. THANKLS QUESTION: 1) You are given the follow
ID: 3623425 • Letter: D
Question
DONT ANSWER, NED KAMA. WILL FLAGG. THANKLS QUESTION:1) You are given the following variable declarations:
int x, y;
char ch;
What value (if any) is assigned to x, y, and ch after each of the following executes, given the input shown below?
5 28 36
a. cin >> x >> y >> ch;
b. cin >> ch >> x >> y;
c. cin >> x >> ch >> y;
d. cin >> x >> y;
cin.get (ch);
2) You are given the following variable declarations:
int x, y;
char ch;
What value (if any) is assigned to x, y, and ch after each of the following executes, given the input shown below?
13 28 D
14 E 98
A B 56
a. cin >> x >> y;
cin.ignore (50, ‘ ’);
cin >> ch;
b. cin >> x;
cin.ignore (50, ‘ ’);
cin >> y;
cin.ignore (50, ‘ ’);
cin.get (ch);
c. cin >> y;
cin.ignore (50, ‘ ’);
cin >> x >> ch;
d. cin.get (ch);
cin.ignore (50, ‘ ’);
cin >> x;
cin.ignore (50, ‘E’);
cin >> y;
3) You are given the following variable declarations:
int age;
char ch;
string name;
and the following input statements:
cin >> age;
cin.get (ch);
getline (cin, name);
What value (if any) is assigned to age, ch, and name when the input statements are executed, given the following input?
a. 35 Mickey Mantle
b. 35
Mickey Mantle
ANSWER:-
1) a) x=5,y=28,ch=3
b) x=28,y=36,ch=5
c) x=5,y=8,ch=2
d) x=5,y=28,and ch is assigned a value associated with blank space i.e., ‘ ’
2) a) x=13,y=28,ch=1
b) x=13,y=14,ch=A
c) x=14,y=13,ch=E
d) x=14,y=98,ch=1
3) a) age =35, name = Mickey Balto
b) age =35, name = Mickey Balto
DONT ANSWER, NED KAMA. WILL FLAGG. THANKLS QUESTION:
1) You are given the following variable declarations:
int x, y;
char ch;
What value (if any) is assigned to x, y, and ch after each of the following executes, given the input shown below?
5 28 36
a. cin >> x >> y >> ch;
b. cin >> ch >> x >> y;
c. cin >> x >> ch >> y;
d. cin >> x >> y;
cin.get (ch);
2) You are given the following variable declarations:
int x, y;
char ch;
What value (if any) is assigned to x, y, and ch after each of the following executes, given the input shown below?
13 28 D
14 E 98
A B 56
a. cin >> x >> y;
cin.ignore (50, ‘ ’);
cin >> ch;
b. cin >> x;
cin.ignore (50, ‘ ’);
cin >> y;
cin.ignore (50, ‘ ’);
cin.get (ch);
c. cin >> y;
cin.ignore (50, ‘ ’);
cin >> x >> ch;
d. cin.get (ch);
cin.ignore (50, ‘ ’);
cin >> x;
cin.ignore (50, ‘E’);
cin >> y;
3) You are given the following variable declarations:
int age;
char ch;
string name;
and the following input statements:
cin >> age;
cin.get (ch);
getline (cin, name);
What value (if any) is assigned to age, ch, and name when the input statements are executed, given the following input?
a. 35 Mickey Mantle
b. 35
Mickey Mantle
ANSWER:-
1) a) x=5,y=28,ch=3
b) x=28,y=36,ch=5
c) x=5,y=8,ch=2
d) x=5,y=28,and ch is assigned a value associated with blank space i.e., ‘ ’
2) a) x=13,y=28,ch=1
b) x=13,y=14,ch=A
c) x=14,y=13,ch=E
d) x=14,y=98,ch=1
3) a) age =35, name = Mickey Balto
b) age =35, name = Mickey Balto
Explanation / Answer
Dear user, 1) a) 5,28,36 b) 36,5,28 c) 5,36,28 d) 5,28,_ //blanck space 2) a)13,28,1 b)13,14,A c)14,13,E d)14,98,1 3) a) 35,Mickey Mantle b) 35,Mickey Mantle
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.