Question: Suppose that age is an int variable, ch is a char variable, and name is a string variable. What are the values of age and
- Suppose that age is an int variable, ch is a char variable, and name is a string variable. What are the values of age and name after the following input statements execute:
cin>>age;
cin.get(ch);
getline(cin, name);
if the input is:
age name
- 23 Lance Grant; _______ _______
- 23
Lance Grant _______ _______
- True or False
- To use the manipulators setprecision, setw, and setfill, the program must include the header file iostream.
- The manipulator setw formats the output of an expression in a specific number of columns; the default output is right-justified.
- cout is correct on c++ programming syntax.
- The function clear is used to skip certain input in a line.
- What will be displayed on the screen from the following statements?
#include
#include
using namespace std;
int main()
{
int x = 15; //Line 1
int y = 7634; //Line 2
cout
cout
cout
return 0;
}
Display:
- Consider the declaration:
char ch1, ch2;
and the input:
Hello there. My name is Micky.
- Consider the following statements, after executing them, the result for ch1 is_______, for ch2 is _______
cin>>ch1;
cin.ignore(100, .);
cin>>ch2;
- Consider the following statements, after executing them, the result for ch1 is_______, for ch2 is _______
cin>>ch1;
cin.ignore(10, *);
cin>>ch2;
here a=1, b=2 and c=0.5. Input a, b, and - 5+1b2 - 4ac 5. Write a CH+ program that calculatex c; output a, b, c, and x, set precision as two decimals. ..20 For example C:\Users\zwu\Desktop oot\Release oot.exe Please input your a:1 Please input your b:2 Please input your c: 0.5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts

