Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Manipulator types - C++ basic concepts
Home
>>
Category
>>
C++ (MCQ) questions and answers
>>
C++ basic concepts
Q. Which of the followings is/are not a manipulator/s ?
1. flush
2. base
3. ends
4. oct
5. bin
6. skipws
- Published on 17 Jul 15
a.
Only 1, 6
b.
Only 1,4,6
c.
Only 1,3,6
d.
Only 2,5
ANSWER: Only 2,5
Related Content
Constructor and Destructor (
10
)
Operator Overloading (
11
)
Inheritance (
16
)
Polymorphism and Abstract Classes (
12
)
C++ basic concepts (
39
)
Exception Handling (
22
)
File Handling (
11
)
Functions (
20
)
Memory Management (
6
)
Pointers (
3
)
Discussion
Brijesh
-Posted on 12 Oct 15
Manipulator are special functions that are used to change certain characteristics of the input and output. They change the format flags and values for a stream.
Following are the standard manipulators:
endl
hex, dec, oct
setbase
setw
setfill
setprecision
ends
you can also create your own manipulators. The syntax for creating user defined manipulators is defined as follows:
ostream & manipulator_name(ostream & ostrObj)
{
set of statements;
return ostrObj;
}
In the above question base and bin are not the manipulators.
➨
Post your comment / Share knowledge
Required!
Required!
Invalid Email Id!
Required!
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
MCQs
English
Tutorials
Download
▲