Computer Science - Object Oriented Programming Using C++ - Discussion

Discussion Forum : Object Oriented Programming Using C++ - Section 1 (Q.No. 4)
4.
Format flags may be combined using
the bitwise OR operator (|)
the logical OR operator (||)
the bitwise AND operator (&)
the logical AND operator (&&)
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
21 comments Page 1 of 3.

Vinay said:   1 decade ago
Can anybody tell me what is format flag ?
(1)

Anshuman said:   1 decade ago
Actually bitwise OR operator is denoted by pipe symbol (|) which is use to combine.

Anshuman kansal said:   1 decade ago
The class ios contains data members to store all the formatting information pertaining to a stream. Some of this data has a range of values and is stored in variables: the floating-point precision, the output field width, and the character used to pad the output (normally a space). The rest of the formatting is determined by flags, which are usually combined to save space and are referred to collectively as the format flags.

Sharanya said:   1 decade ago
Actually what are format flags?

Kiran said:   1 decade ago
The <iostream> library defines a rich set of format flags. These flags enable you to control the width, alignment, precision, and so on for the displayed data.

Shiva said:   1 decade ago
Actually what are format flags?

Sundar said:   1 decade ago
Let me explain in clear.

// Assume two 16-bit flags contains values as given below
intFlag1 = (00000000 10101010) In Binary.
intFlag2 = (00000010 01010101) In Binary.

// Now combine it with Bitwise-OR operator
intResult = intFlag1 | intFlag2 ;

// The combined result will be.
intResult = (00000010 11111111) In Binary.

Hope this will help you. Have a nice day!
(2)

Rewg said:   10 years ago
But I don't get clear idea about format flags.

Muhammad Usman said:   10 years ago
Can any one explain that what are format flags?

Soia said:   10 years ago
What is member function?


Post your comments here:

Your comments will be displayed after verification.