Can comments be nested?
No Answer is Posted For this Question
Be the First to Post Answer
What is the difference between new() and malloc()?
State the difference between pre and post increment/decrement operations.
Explain the differences between private, public and protected and give examples.
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
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; }
Explain the auto storage classes in c++.
Write about all the implicit member functions of a class?
what is the size of this class class size { public: char data1; double d; int data2; char data3; double data4; short data5; }; please explain the padding for these double variables.
Comment on assignment operator in c++.
Write a C++ program to sort digits of all the 4 digit number and display the sorted 4 digit number
When is a template better solution than a base class??
Write a program to find the Factorial of a number