Explain differences between alloc() and free()?
No Answer is Posted For this Question
Be the First to Post Answer
What is the prototype of printf function?
advantages and disadvantages of using Borland C++ / version 5.
Is c++ a low level language?
Differentiate between a copy constructor and an overloaded assignment operator.
What is the this pointer?
Explain what you mean by a pointer.
Which function cannot be overloaded c++?
this is to swap to strings....but in output the whole strings are swapped leaving first as it is...why it is so #include<iostream.h> int main() { char a[]="ajeet"; char b[]="singh"; long x=*a; long y=*b; cout<<x<<":"<<y; x=x+y; y=x-y; x=x-y; *a=x; *b=y; cout<<x<<":"<<y; cout<<&a<<endl; cout<<&b<<endl; }
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 is object oriented programming (oop)?
What is the best ide for c++?
When can I use a forward declaration?