If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first

a) 1

b) 5

c) 3


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData

2 Answers   Quark,


What is meant by const_cast?

0 Answers  


Explain calling an object's member function(declared virtual)from its constructor?

1 Answers  


How do you decide which integer type to use?

0 Answers  


What is lvalue?

0 Answers  






What is difference between shallow copy and deep copy? Which is default?

1 Answers  


What are the characteristics of friend functions?

0 Answers  


What are the rules about using an underscore in a c++ identifier?

0 Answers  


Explain how a pointer to function can be declared in C++?

0 Answers  


What is object file? How can you access object file?

0 Answers  


What does override mean in c++?

0 Answers  


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

0 Answers  


Categories