When we use Abstract Class and when we use Interface?where we
will implement in real time?
Which one is a preferred language C or C++? Why?
What are the data types in c++?
How many pointers are required to reverse a link list?
How do I use turbo c++?
What is abstract keyword in c++?
"How will you merge these two arrays? Write the program Array: A 1 18 22 43 Array: B 3 4 6 20 34 46 55 Output Array: C 1 3 4 6 18 20 22 34 43 46 55"
9 Answers College School Exams Tests, HCL,
Describe the role of the c++ in the tradeoff of safety vs. Usability?
What is the standard template library (stl)?
Describe private, protected and public – the differences and give examples.
Explain one-definition rule (odr).
Does a derived class inherit or doesn't inherit?
Find out the bug in this code,because of that this code will not compile....... #include <iostream> #include <new> #include <cstring> using namespace std; class balance { double cur_bal; char name[80]; public: balance(double n, char *s) { cur_bal = n; strcpy(name, s); } ~balance() { cout << "Destructing "; cout << name << "\n"; } void set(double n, char *s) { cur_bal = n; strcpy(name, s); } void get_bal(double &n, char *s) { n = cur_bal; strcpy(s, name); } }; int main() { balance *p; char s[80]; double n; int i; try { p = new balance [3]; // allocate entire array } catch (bad_alloc xa) { cout << "Allocation Failure\n"; return 1; }