29 Jul (WRITE A C++ STATEMENT) FOR EACH OF THE FOLLOWING
(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.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
