Question: 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

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!