Comp122 Week 2 Homework

Week 2 Homework Complete the following problems. 1. Suppose you are given the following variable declarations: int x, y; char ch; What values (if any) are assigned to x, y, and ch after each of these statements execute? Assume that the input to each statement is the same:5 28 36 a. cin >> x >> y >> ch; b. cin >> ch >> x >> y; c. cin >> x >> ch >> y; d. cin >> x >> y; cin. get(ch); a) x=5, y=28,ch=3 b)) x = 28, y = 36, ch = 5 c) x = 5, y = 8, ch = 2 ) x = 5, y = 28 ch is assigned a value associated with blank space i. e. , ‘ ’ 2. Suppose you are given the following variable declarations: int x, y; char ch; What values (if any) are assigned to x, y, and ch after each of these statements execute?
Assume that the input to each set of statements is as follows: 13 28 D 14 E 98 A B 56 a. cin >> x >> y; cin. ignore(50, ‘
‘); cin >> ch; b. cin >> x; cin. ignore(50, ‘

‘); cin >> y; cin. ignore(50, ‘
‘); cin. get(ch); a) x = 13, y = 28, ch = 1 ) x = 13, y = 14, ch = A 3. Suppose you are given the following variable declarations: int x, y; double z; char ch; Assume you have the following input statement: cin >> x >> y >> ch >> z; What values (if any) are stored in x, y, z, and ch if the input is: a. 35 62. 78 b. 86 32A 92. 6 c. 12 . 45A 32 3) a) x = 35 y = 62 ch = . z = 78 b) x = 86 y = 32 ch = A z = 9206 C) x = 12 4. Write a C++ statement that uses the manipulator ‘setfill’ to output a line containing 35 asterisk characters. 4) cout

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our Guarantees

Money-back Guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism Guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision Policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy Policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation Guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more