Define stacks. Provide an example where they are useful.


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

Post New Answer

More C++ General Interview Questions

What is static function and static class?

4 Answers   HCL,


What is function declaration in c++ with example?

0 Answers  


How new/delete differs from malloc()/free?

0 Answers  


What is compilation?

1 Answers   Datamatics, TCS,


How many keywords are used in c++?

0 Answers  






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 number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number

0 Answers  


what is scupper?

0 Answers  


Write a Program for find and replace a character in a string.

0 Answers  


What are the uses of pointers?

0 Answers  


To what does “event-driven” refer?

0 Answers  


What is else syntax in c++?

0 Answers  


Categories