c++_anilcomputers

C ++ Language QUIZ 04

Total no of Question = 25

All Questionnaire compulsory to answered

Quiz created by :   Anilcomputersudaipur.com

Add: Anil Computers, 368, Prem Kutir, Univestiy Main Road Nr. Tulsi Garden, Udaipur- 094142 34600

C ++ Language Quiz 04

Please enter your email:

1. Which of the following is the most common way of implementing C++?

 
 
 
 

2. Which of the following operator cannot be overloaded?

 
 
 
 

3. If a member needs to have unique value for all the objects of that same class, declare the member as

 
 
 
 

4. The output of this program is
int a = 10;
void main()
{
int a = 20;
cout << a << ::a; }

 
 
 
 

5. Minimum number of temporary variable needed to swap the contents of 2 variables is:

 
 
 
 

6. Value of a in a = (b = 5, b + 5); is

 
 
 
 

7. There is nothing like a virtual constructor of a class.

 
 

8. Which of the following is not a valid conditional inclusions in preprocessor directives

 
 
 
 

9. Which of the following is not a valid conditional inclusions in preprocessor directives

 
 
 
 

10. Which of the following operators can be implemented as a nonmember operator?

 
 
 
 

11. Which header file should we include for using std::auto_ptr?

 
 
 
 

12. Which of the following operators below allow to define the member functions of a class outside the class?

 
 
 
 

13. In a C language ?3? represents

 
 
 
 

14. Which of the following is not a standard exception built in C++.

 
 
 
 

15. Under which of the following circumstances, synchronization takes place?

 
 
 
 

16. What is the implicit pointer that is passed as the first argument for nonstatic member functions?

 
 
 
 

17. Which looping process is best used when the number of iterations is known?

 
 
 
 

18. Observe following program and answer
class Example{
public: int a,b,c;
Example(){a=b=c=1;} //Constructor 1
Example(int a){a = a; b = c = 1;} //Constructor 2
Example(int a,int b){a = a; b = b; c = 1;} //Constructor 3
Example(int a,int b,int c){ a = a; b = b; c = c;} //Constructor 4
}
In the above example of constructor overloading, the following statement will call which constructor
Example obj = new Example (1,2,3);

 
 
 
 

19. The output of
{
int a = 5;
int b = 10;
cout << (a>b?a:b);
}

 
 
 
 

20. Which of the following functions below can be used Allocate space for array in memory?

 
 
 
 

21. We can prevent a function from throwing any exceptions.

 
 

22. The return value of the following code is
Class1& test(Class1 obj)
{
Class1 *ptr = new Class1();
???
return ptr;
}

 
 
 
 

23. Which of the following operators can be overloaded?

 
 
 
 

24. C++ provides facility to specify that the compiler should match function calls with the correct definition at the run time. This process is called as

 
 

25. The output of this program is
int
main () { cout << ?Hello World!? return 0; }

 
 
 
 

Question 1 of 25

Anil Computers

Anil Computers

Best computer Institute in Udaipur

Quiz_Anilcomputers1

सर्टिफिकेट  पाने के लिए अपने रिजल्ट का Screen shot नीचे दिये गये मोबाइल नम्बर पर send करें। Strictly call not allowed.