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

How can a '::' operator be used as unary operator?

1 Answers  


What is vector string in c++?

0 Answers  


Is C++ case sensitive a) False b) Depends on implementation c) True

0 Answers  


What is general format for a prototype?

0 Answers  


What is a storage class? Mention the storage classes in c++.

0 Answers  






What is a memory leak c++?

0 Answers  


What is bubble sort c++?

0 Answers  


write a program that takes two numbers from user that prints the smallest number

2 Answers  


What are special characters c++?

0 Answers  


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

0 Answers  


Which is not a valid keyword a) public b) protected c) guarded

0 Answers  


What is iomanip c++?

0 Answers  


Categories