How to implement flags?

Answers were Sorted based on User's Feedback



How to implement flags?..

Answer / subeetha

C++ defines some format flags for standard input and
output, which can be manipulated with the flags(), setf(),
and unsetf() functions. For example,

cout.setf(ios::left);

Is This Answer Correct ?    1 Yes 0 No

How to implement flags?..

Answer / sachin

enum Flag {Yes, No};

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C++ General Interview Questions

What are the different types of comments allowed in c++?

0 Answers  


What does the linker do?

0 Answers  


What is the difference between std::vector and std::list

1 Answers  


What is scope resolution operator in c++ with example?

0 Answers  


List the special characteristics of constructor.

0 Answers  


Which one between if-else and switch is more efficient?

0 Answers  


What is the stack?

5 Answers   IBM, ICICI,


Write a function which takes a character array as input and reverses it in place.

2 Answers   Lehman Brothers, Vision Infotech,


Is sorted c++?

0 Answers  


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

0 Answers  


differance between copy & clon

1 Answers   Microsoft,


What is size of null class?

6 Answers   HP,


Categories