My Report

Object Oriented Programming Practice Test 8


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. Which among the following is the correct syntax to access static data member without using member function?

2. Which among the following can’t be used to access the members in any way?

3. What is the type of object that should be specified in the argument list?

4. If catching of base class exception is done before derived class in C++ ________________

5. If object is passed by reference ____________________

6. Whenever any static data member is declared in a class ______________________

7. Pass by reference of an object to a function _______________

8. All the public member functions ___________________

9. The keyword static is used _______________

10. Predict the output of the program.

class A
{
	public int i;
};
void main()
{
	A x;
	A y=x;
	x.i=10;
	y.i=20;
	y.i++;
	y.i=20;
	cout&l;<tx.i;
}

 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.