Difference between a copy constructor and an assignment operator.
No Answer is Posted For this Question
Be the First to Post Answer
What is a flag in c++?
In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest.
Explain the difference between new() and malloc() in c++?
Which function cannot be overloaded c++?
What is do..while loops structure?
What is object oriented programming (oop)?
Write a program to swap 2 chars without using a third varable? char *s = "A"; char *p = "B";
write a c++ program that gives output 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 using looping statement
class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list
Explain public, protected, private in c++?
List out function which we can call without using object
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop