Home » C++ Programming » Constructors and Destructors

Which of the following statement is correct about the program given below? #include class CuriousTab { int *p; public: CuriousTab(int xx, char ch) { p = new int(); *p = xx + int(ch); cout<< *p; } ~CuriousTab() { delete p; } }; int main() { CuriousTab objCuriousTab(10, 'B'); return 0; }

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!