How do you save a c++ program?
What is the difference between stack and heap memory?
Which one is a preferred language C or C++? Why?
Difference between a homogeneous and a heterogeneous container
How do you initialize a class member, class x { const int i; };
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; }
sizeof - is it a function or operator?
Why do we use classes in programming?
How would you find out if a linked-list is a cycle or not?
What are built-in functions? What is the syntax for the definition?
How can you differentiate between inheritance and implementation in c++?
How much do c++ programmers make?
What is a c++ vector?