![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() 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 : Answer is A.There is no problem with the code. ... 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 : answer A ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||