answersLogoWhite

0

(don't forget to include) #include <iomanip>

cout << setfill('*') < <setw(35) << '*' <<endl;

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is a user defined manipulator in c plus plus?

A user-defined manipulator is a function which can be passed as an argument to the stream insertion or extraction operator overloads. For example, the output stream insertion operator has the following overload: std::ostream&amp; operator&lt;&lt; (std::ostream&amp; st, std::ostream&amp; (*func) (std::ostream&amp;)); The second argument is the function pointer, with the following signature: std::ostream&amp; (*func) (std::ostream&amp;) Any function that matches this signature can be used as a manipulator. For instance, the following user-defined manipulator does exactly the same job as the std::endl manipulator: std::ostream&amp; my_manipulator (std::ostream&amp; os) { return os &lt;&lt; '\n' &lt;&lt; std::flush; } Example usage: std::cout &lt;&lt; "Hello world!" &lt;&lt; my_manipulator; You can, of course, provide your own implementations to perform any type of manipulation. For example, suppose you want a manipulator that inserts an elipses into an output stream: std::ostream&amp; elipses (std::ostream&amp; os) { return os &lt;&lt; "..."; } Example usage: std::cout &lt;&lt; "Hello" &lt;&lt; elipses &lt;&lt; "world!" &lt;&lt; my_manipulator; Output: Hello...world!


Does printf() statement can generate only one line of output?

No, the printf() statement in C can generate multiple lines of output. You can include newline characters (\n) within the string to create line breaks, allowing for formatted output across multiple lines. Additionally, you can call printf() multiple times to print different lines.


What is the shortcut key for input statement in QBasic?

There is no shortcut key of input in qbasic


What are decision statements in java?

Decision statements are statements that are used for taking logical decisions. They contain a condition whose output is a boolean true or false. Ex: if (name.equals("Rock")) { System.out.println("Hi Rocky!!!"); } The output of the if condition will depend on the value that the variable name holds. This is a decision statement


When no semicolon is used after printf statement what will be the output?

A semi-colon denotes the end of a statement. If you omit the semi-colon, the statement will extend into the next expression and this will result in a compiler error because a semi-colon will have been expected at the end of the first expression.

Related Questions

What are manipulatives?

manipulatives.anyofvariousobjectsormaterialsthatstudentscantouchandmovearoundinordertohelpthemlearnmathematicalandotherconcepts:theuseofblocks,flashcards,andothermanipulativesintheclassroom.


What is a user defined manipulator in c plus plus?

A user-defined manipulator is a function which can be passed as an argument to the stream insertion or extraction operator overloads. For example, the output stream insertion operator has the following overload: std::ostream&amp; operator&lt;&lt; (std::ostream&amp; st, std::ostream&amp; (*func) (std::ostream&amp;)); The second argument is the function pointer, with the following signature: std::ostream&amp; (*func) (std::ostream&amp;) Any function that matches this signature can be used as a manipulator. For instance, the following user-defined manipulator does exactly the same job as the std::endl manipulator: std::ostream&amp; my_manipulator (std::ostream&amp; os) { return os &lt;&lt; '\n' &lt;&lt; std::flush; } Example usage: std::cout &lt;&lt; "Hello world!" &lt;&lt; my_manipulator; You can, of course, provide your own implementations to perform any type of manipulation. For example, suppose you want a manipulator that inserts an elipses into an output stream: std::ostream&amp; elipses (std::ostream&amp; os) { return os &lt;&lt; "..."; } Example usage: std::cout &lt;&lt; "Hello" &lt;&lt; elipses &lt;&lt; "world!" &lt;&lt; my_manipulator; Output: Hello...world!


Which statement is correct about cardiac output?

cardiac output is heart rate multiplied by stroke volume,


How do you initialize an output record in easytrieve?

In Easytrieve, you initialize an output record by defining the record structure in the DATA section and then using the WRITE statement to create a new record. You can set values for the fields of the record prior to the WRITE statement. For example, you might use the MOVE statement to assign values to specific fields before writing the output. Finally, the WRITE statement is executed to output the initialized record to the specified file or report.


How do you use irreducible in a sentence?

The output is a set of irreducible numerical semigroups containing it


What sentence has the word irreducible?

The output is a set of irreducible numerical semigroups containing it.


How do you create a program that will display output?

It must use a function with a "return" statement. Or you could output via console. (.NET CODE(C#)) Console.WriteLine("Output.");


Cga provided four type of digital output?

That is not a question. It is a statement.


In which direction does the printf statement works?

from main-memory to standard output.


What is the output if a cell containing a number 3245.45 is formatted to '?

what is the output if a cell containing number 3245.45 is formatted to '#,####'number format?


What are examples of figure of speech understatement?

A rhetorical statement is any statement that is intended to not have any feedback, output, or response to it.


In a multistage amplifier input impedance is high and output impedance is low justify the statement?

no. input impedance is low &amp; output impedance is high