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

Write a function that swaps the values of two integers, using int* as the argument type?

0 Answers  


What is an object in c++?

0 Answers  


how to connect with oracle 9i with server in socket program in c/c++

0 Answers   3i Infotech,


What is operators in c++?

0 Answers  


What does the ios::ate argument do?

0 Answers  






Write a C++ Program to Generate Random Numbers between 0 and 100

1 Answers  


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

0 Answers  


Why do we use using namespace std in c++?

0 Answers  


what is the C++

1 Answers   Wipro,


Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

0 Answers  


Why the usage of pointers in C++ is not recommended ?

0 Answers   TCS,


What is the function to call to turn an ascii string into a long?

0 Answers  


Categories