Write a program for generating a spiral structure of N number.For example: If N= 4 then the structure will be as follow-1 24 3 If N=5, then the structure will be as follow- 1 25 4 3 If N=9, then the
Write a program for all the four arithmetic operations in float data type using operator overloading concept.
Latest Answer: Addition Operator:-----------------------------------------------------Complex operator +( const Complex &temp){ Complex ctemp; ctemp.m_real = m_real+ temp.m_real; ctemp.m_imag = m_imag+temp.m_imag; cout
Write a program for four atrithmetic operations in matrix using operator overloading.
Do Nested Clases exists? If so, where are they used?
To invoke the virtual toString() function defined in GeometricObject from a Circle object c, use :A. ((GeometricObject*)c)->toString();B. c.super.toString()C. (GeometricObject*)c->toString();D. c->GeometricObject::toString()
Latest Answer: If we take the following class definitions:class CGeometricObject{public:virtual void toString(){ printf("I am in base");}};class Circle : public GeometricObject{public:void toString(){ printf("I am in derived");}};then ...
How can a C++ developer use the placement new syntax to make new allocate an object of class SomeClass at a particular memory address stored in a pointer type variable named pmem?A. new SomeClass(pmem);B.
Latest Answer: It is B. new(pmem) SomeClass;pmem points to the memory which shall be used. ...
Which of the following statements accurately describe unary postfix operator++ overloading in C++?A. It can be overloaded with no parameters when the operator function is a class member.B. It can only
Latest Answer: In the previous,Increment(*this); // whatever you want it to mean... was meant to be pseudocode. Taken literally, it will pass this object by value and therefore do nothing to it.I should have written simply Increment(); ...
Which one of the following statements regarding C++ class inheritance is FALSE?
a. Inheritance promotes generic design and code reuse.b. Struct cannot be inherited in C++.
c. C++ supports multiple
Latest Answer: b. Struct cannot be inherited in C++. ...
Which one of the statements concerning data encapsulation is FALSE? A. Data encapsulation lets the programmer create an object and then provide an interface that other objects can use to invoke the methods
Latest Answer: E is wrong. Everything else looks right. ...
Why p++ is faster than p+1?
Latest Answer: I think P++ and ++P are the sameNo, not the same.For P++ you have to save value in a temp, increment *this, then return the saved value.For ++P, you just increment and return -- less work. ...
View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Go Top