Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help me with my Computer Science questions, pls. DATA FORMATTING. 1. How do you translate a string to a character? (Think of special cases:

Help me with my Computer Science questions, pls.

DATA FORMATTING.

1. How do you translate a string to a character? (Think of special cases: " apple", "\t \bsmile", etc.)

2.Once you can translate a string to a character, is translating to bool much harder? Explain...

3.When translating a string to a double, how do we re-use our ability to translate a string to an integer?

STREAM FORMATTING.

1.Show the code necessary to center the string "Hello World" on a typical line of the screen (80 characters).

2.Name at least four non-temporary format settings. (Hint: At least two of these must not be flags!) Explain (briefly) what each is responsible for.

3.Show stream-oriented code to draw a line of 60 tilde (~) characters.

4.How would you draw a box (* for border -- center blank) 50 character wide and 13 characters tall in a stream-oriented fashion? Show the code here:

STREAM PROCESSING

1.Code a function to remove all characters from a stream (specified in the argument list) until an end-of-line is encountered.

2.Explain how you can allow the user to place comments at the top of their data file. If you need to re-process the data from the file, what two things should you do to make things as effective as possible for your user.

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions