Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) write a c++ statement to accomplish each of the following: a) Writes a C-string stored in char* cStr to ostringstream iss. b) Safely reads

1) write a c++ statement to accomplish each of the following:

a) Writes a C-string stored in char* cStr to ostringstream iss.

b) Safely reads a line of text from cin into char cStr[128] until a 'Q' is encountered and discarded.

c) Writes all numeric values to the file fout using exactly 8 decimal places of precision.

d) Which of the following statement restores the default fill character?

i) cout.defaultFill();

ii)cout.fill(0);

iii)cout.fill(' ');

e) If unexpected data is processed in an I/O operation:

i) An excecption will be thrown.

ii) An error message will automatically be displayed.

iii) Various errors are set.

f) One difference between the three-argument version of the get function and the getline funciton is that:

i) Only get has delimeter.

ii) The getline function removes the delimiter from the stream.

iii) Only get adds the delimiter to the array.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

Define the following: a. Operating leverage b. Financial leverage

Answered: 1 week ago