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

With respect to tm4c123 arm cortex m4 processorhow many

With respect to TM4C123 ARM Cortex M4 Processor How many machine cycles are required to process first line of ISR after an interrupt occurs? What are the other benefits of NVIC to process interrupt more efficiently?

Discuss how today the internet has brought millions of

Discuss how today, the internet has brought millions of unsecured computer networks into communication with each other.

Suppose the cost function of making jackets is cx x2 -

Suppose the cost function of making jackets is C(x)= x^2 - 50x+1500. How many jackets should you make to minimize the cost of the jackets? How much would be the minimum cost?

Why is formative evaluation importantprovide at least three

Why is formative evaluation important? Provide at least three reasons for using it. What is the difference between formative and summative evaluation? Provide any two types formative evaluation and two types of summative ...

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

You often read in the newspapers that the fed has just

You often read in the newspapers that the Fed has just lowered the discount rate. Does this signal that the Fed is moving toward a more expansionary monetary policy? Why or why not?

Recall that the op-code and operand are represented in

Recall that the op-code and operand are represented in memory by HEX numbers (e.g., LDAA $3000 will show in memory as $B6, $30, and $00). Write a short program to use the commands LDAA and STAA to load and store a value ...

Discussion a network-based intrusionimagine you live by

Discussion : A Network-Based Intrusion Imagine you live by yourself on a quiet street. Each day, you leave your house in the morning and drive to work. One day while you are at work, someone breaks into your house by kic ...

Directionspick one topic for word and one topic

Directions Pick one topic for Word and one topic for PowerPoint to discuss. Word Watermark: What is the purpose of watermark for a document? What do you consider when you work on a watermark in Word? Newsletter: What are ...

Question you are responsible for managing multiple exchange

Question : You are responsible for managing multiple Exchange organizations, and you need to apply identical configurations to servers in all organizations. Since you are just starting out with Exchange Server 2013, and ...

  • 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