• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 9 pages
Exam (elaborations)

C++ Quiz 3

Document preview thumbnail
Preview 2 out of 9 pages

Exam of 9 pages for the course Cef at Cef (C++ Quiz 3)

Content preview

C++ Quiz 3 Grade A question with answer

________ reads a line of input, including leading and embedded spaces, and stores it in
a string object.

Select one:

a. cin.get

b. getline

c. cin.getline

d. get
e. None of these - (correct answer)b.(getline)



When this operator is used with string operands it concatenates them, or joins them
together.

Select one:

a. &

b. *

c. %

d. +

e. None of these - (correct answer)d. (+)



The ________ causes a program to wait until information is typed at the keyboard and
the Enter key is pressed.

Select one:

a. Output stream
b. cin object

c. cout object

d. Preprocessor

e. None of these - (correct answer)b. (cin object)

, This function tells the cin object to skip one or more characters in the keyboard buffer.

Select one:

a. cin.ignore

b. cin.jump

c. cin.hop

d. cin.skip;

e. None of these - (correct answer)a. (cin.ignore)


The function, pow(x, 5.0), requires this header file.

Select one:

a. cstdlib

b. iostream

c. cstring

d. cmath

e. iomanip - (correct answer)d.(cmath)



You want the user to enter the length, width, and height from the keyboard. Which cin
statement is correctly written?

Select one:

a. cin >> length, width, height;
b. cin << length, width, height;

c. cin << length; width; height;

d. cin.get(length, width, height);
e. cin >> length >> width >> height; - (correct answer)e. (cin >> length >> width >>
height;)



You can use these to override the rules of operator precedence in a mathematical
expression.

Document information

Uploaded on
October 26, 2024
Number of pages
9
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
douglasmugwe82
5.0
(1)
Sold
2
Followers
0
Items
4215
Last sold
1 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions