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

  1. 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

  1. 23 Lance Grant; _______ _______
  2. 23

Lance Grant _______ _______

  1. True or False
  1. To use the manipulators setprecision, setw, and setfill, the program must include the header file iostream.
  2. The manipulator setw formats the output of an expression in a specific number of columns; the default output is right-justified.
  3. cout is correct on c++ programming syntax.
  4. The function clear is used to skip certain input in a line.

  1. 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:

  1. Consider the declaration:

char ch1, ch2;

and the input:

Hello there. My name is Micky.

  1. Consider the following statements, after executing them, the result for ch1 is_______, for ch2 is _______

cin>>ch1;

cin.ignore(100, .);

cin>>ch2;

  1. Consider the following statements, after executing them, the result for ch1 is_______, for ch2 is _______

cin>>ch1;

cin.ignore(10, *);

cin>>ch2;

  1.  Suppose that age is an int variable, ch is a char

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!