| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which among the following is/are type(s) of this pointer?

Correct Answer is : –datadir

2. Which is the correct syntax for declaring type of this in a member function?

Correct Answer is : SHOW VARIABLES

3. How many types of constructors are available, in general, in any language?

Correct Answer is : performance_schema

4. Choose the correct option for the following code. class student { int marks; } student s1; student s2=2;

Correct Answer is : performance_schema

5. Which constructor is called while assigning some object with another?

Correct Answer is : exec_stmt_ssl

6. It’s necessary to pass object by reference in copy constructor because:

Correct Answer is : C

7. Which specifier applies only to the constructors?

Correct Answer is : libmysqld

8. Which among the following is true?

Correct Answer is : –with-embedded-server

9. Which type of constructor can’t have a return type?

Correct Answer is : TRUE

10. Why do we use static constructors?

Correct Answer is : TRUE

11. When and how many times a static constructor is called?

Correct Answer is : error log

12. Which among the following is true for static constructor?

Correct Answer is : slow query log

13. Within a class, only one static constructor can be created.

Correct Answer is : 10

14. Default constructor initializes all data members as:

Correct Answer is : –log-bin-index

15. When is the static constructor called?

Correct Answer is : TRUE

16. If constructors of a class are defined in private access, then:

Correct Answer is : IN and NOT IN

17. Which among the following is correct, based on the given code below: class student { int marks; public : student() { cout<<”New student details can be added now”; } }; student s1;

Correct Answer is : column

18. How many types of inheritance are possible in C++?

Correct Answer is : cascaded

19. Which type of inheritance is illustrated by the following code? class student{ public: int marks; }; class topper: public student { public: char grade; }; class average{ public: int makrs_needed; }; class section: public average{ public: char name[10]; }; class overall: public average{ public: int students; };

Correct Answer is : InnoDB

20. Which among the following best describes multiple inheritance?

Correct Answer is : referential integrity