Difference between struct and class in terms of access modifier.
No Answer is Posted For this Question
Be the First to Post Answer
How many types of casting are there in C++? When is a dynamic cast,static_cast,reinterpret cast used?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
What about Virtual Destructor?
Differentiate between realloc() and free().
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
Write a String class which has: 1) default constructor 2) copy constructor 3) destructor 4) equality operator similar to strcmp 5) constructor which takes a character array parameter 6) stream << operator
2 Answers HCL, Lehman Brothers, Zoomerang,
what are prototypes
What is math h in c++?
Can user-defined object be declared as static data member of another class?
Describe the syntax of single inheritance in C++?
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
What are single and multiple inheritances in c++?