Can we get the value of ios format flags?



Can we get the value of ios format flags?..

Answer / Rajesh Kumar Singh

Yes, you can get the value of ios format flags using the manipulator 'ios::fmtflags'. You can save the current format flags with 'std::ios_base::fmtflags saved = std::cout.flags();', and restore it later with 'std::cout.flags(saved);'.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Explain how an exception handler is defined and invoked in a Program.

1 Answers  


How the programmer of a class should decide whether to declare member function or a friend function?

1 Answers  


what do you mean by volatile variable?

1 Answers  


How do you show the declaration of a virtual constructor?

1 Answers  


What is the use of endl?

1 Answers  


Can a constructor return a value?

2 Answers  


What are destructors?

1 Answers  


When is the copy constructor called?

1 Answers  


What is late binding c++?

1 Answers  


How to change constant values?

6 Answers   Huawei, Symphony,


When we use Abstract Class and when we use Interface?where we will implement in real time?

1 Answers  


What is the purpose of template?

1 Answers  


Categories