ExamVeda
Login
Home
61
What happens if the following C++ statement is compiled and executed?
int *ptr = NULL;
delete ptr;
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
62
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
 
class A 
{
   int a;
   A() { a = 5;}
};
 
int main()
{
    A *obj = new A;
    cout << obj->a;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
63
Which of the following is not a type of Constructor?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
64
Which of the following cannot be a friend?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
65
How access specifiers in Class helps in Abstraction?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
66
Which of the following approach is used by C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
67
Which of the following provides a programmer with the facility of using object of a class inside other classes?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
68
Which concept means the addition of new components to a program as it runs?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
69
What does polymorphism in OOPs mean?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
70
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class A{
public:
	A(){
		cout<<"Constructor called\n";
	   }
	~A(){
		cout<<"Destructor called\n";
	    }
};
int main(int argc, char const *argv[])
{
	A *a = new A[5];
	delete a;
	return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board