Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question: (Write a C++ Statement) For each of the following, write a single statement that performs the indicated task.

a) Output the string "Enter your name: ".

b) Use a stream manipulator that causes the exponent in scientific notation and the letters in hexadecimal values to print in capital letters.

c) Output the address of the variable my String of type char *.

d) Use a stream manipulator to ensure that floating-point values print in scientific notation.

e) Output the address in variable integerPtr of type int *.

f) Use a stream manipulator such that, when integer values are output, the integer base for octal and hexadecimal values is displayed.

g) Output the value pointed to by floatPtr of type float *.

h) Use a stream member function to set the fill character to '*' for printing in field widths larger than the values being output.

Repeat this statement with a stream manipulator.

i) Output the characters 'O' and 'K' in one statement with ostream function put.

j) Get the value of the next character to input without extracting it from the stream.

k) Input a single character into variable char Value of type char, using the istream member function get in two different ways.

l) Input and discard the next six characters in the input stream.

m) Use istream member function read to input 50 characters into char array line.

n) Read 10 characters into character array name. Stop reading characters if the '.' delimiter is encountered. Do not remove the delimiter from the input stream. Write another statement that performs this task and removes the delimiter from the input.

o) Use the istream member function gcount to determine the number of characters input into character array line by the last call to istream member function read, and output that number of characters, using ostream member function write.

p) Output 124, 18.376, 'Z', 1000000 and "String", separated by spaces.

q) Print the current precision setting, using a member function of object cout.

r) Input an integer value into int variable months and a floating-point value into float variable percentage Rate.

s) Print 1.92, 1.925 and 1.9258 separated by tabs and with 3 digits of precision, using a stream manipulator.

t) Print integer 100 in octal, hexadecimal and decimal, using stream manipulators and separated by tabs. u) Print integer 100 in decimal, octal and hexadecimal separated by tabs, using a stream manipulator to change the base.

v) Print 1234 right justified in a 10-digit field.

w) Read characters into character array line until the character z; is encountered, up to a limit of 20 characters (including a terminating null character). Do not extract the delimiter character from the stream.

x) Use integer variables x and y to specify the field width and precision used to display the double value 87.4573, and display the value.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92419031
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

At a certain temperature 0317 mol of ch4 and 0719 mol of

At a certain temperature, 0.317 mol of CH4 and 0.719 mol of H2O is placed in a 4.00 L container. CH4(g)+2H20(g) ---, CO2 (g) +4H2 (g) At equilibrium, 4.80 g of CO2 is present. Calculate Kc.

Here is a hypothesis when deprived of food invertebrates

Here is a hypothesis: when deprived of food, invertebrates will lose weight more quickly when humidity is 60%. Please indicate which is your dependent variable (Y) & which is your independent variable (X) by labeling the ...

Elmers utility function isnbspuxnbspy minxnbspy2 if the

Elmer's utility function is  U ( x ,  y ) = min{ x ,  y 2 }. If the price of  x  is $10 and the price of  y  is $15 and if Elmer chooses to consume 4 units of  y , what must his income be? a. $220 b. $100 c. $320 d. Ther ...

Question critical infrastructures -1discuss cybersecurity

Question: Critical Infrastructures - 1. Discuss cybersecurity policy issues affecting SCADA and ICS systems for Critical Infrastructure services for the public, and compare those issues to the policy issues that affect t ...

Chebyshevs theorem is used to approximate the proportion of

Chebyshev's theorem is used to approximate the proportion of observations for any data set, regardless of the shape of the distribution. Assume that a distribution has a mean of 255 and standard deviation of 20. Approxim ...

Question research the recording industry association of

Question : Research the Recording Industry Association of America (RIAA) and the Motion Picture Association of America (MPA), their influence on Federal regulations, and their evolving role in digital media distribution. ...

Inside the oncreate method fill in the code so that we set

Inside the onCreate method, fill in the code so that we set the layout and GUI defined in activity_main.xml? public void onCreate( Bundle savedInstanceState ){ super.onCreate(savedInstanceState); // Your code goes here }

Segmentationassume virtual memory hardware that uses

SEGMENTATION Assume virtual memory hardware that uses segmentation, and divides the address space in two by using the top bit of the virtual address. Each segment is thus relocated independently. What we'll be drawing in ...

The big bad wolf loves eating little pigs for breakfast

The big bad wolf loves eating little pigs for breakfast, lunch, dinner, supper, midnight snacks and he does know all about second breakfast. He tends to consume a lot of little pigs in a week. (He is probably not Jewish) ...

Shellys preferences for consumption and leisure can be

Shelly's preferences for consumption and leisure can be expressed as U(C, L) = (C - 100) (L - 40). This utility function implies that Shelly's marginal utility of leisure is C - 100 and her marginal utility of consumptio ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As