![]() Related Questions Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ... The following code results in class eg { void ml( ) {int i = 6; for {int i=5: i< 10;i ++ } { if{i==6} continue; system.out.println {i} ; } } ; } 1. syntax / compilation error 2. 5 6 7 8 9 3. 6 7 8 9 4. 5 7 8 9 class ABC { public: ABC(int i = 0) { val = i;} int GetVal() {return val;} void SetVal(int i) {val = i;} private: int val;}void DoubleABC(ABC& Latest Answer : The class has a missing semi-colon ';' following the closing brace. So the answer should be: E: None of the above ... class ABC { public: ABC(int i = 0) { val = i;} int GetVal() {return val;} void SetVal(int i) {val = i;} private: int val;};void DoubleABC(ABC& Latest Answer : There is no problem ... 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 : E. new (pmem, SomeClass); ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||