What is data structure in c++?
No Answer is Posted For this Question
Be the First to Post Answer
What it is and how it might be called (2 methods).
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; }
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
0 Answers College School Exams Tests, CS,
Where can I run c++ program?
What does return 0 do in c++?
What methods can be overridden in java?
How is new() different from malloc()?
Tell me difference between constant pointer and pointer to a constant.
wrong statement about c++ a)code removably b)encapsulation of data and code c)program easy maintenance d)program runs faster
Do you need a main function in c++?
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;