MySQL interview questions part 15

MySQL interview questions part 15

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

Total Questions: 20

1. Which class/set of classes can illustrate polymorphism in the following code: abstract class student { public : int marks; calc_grade(); } class topper:public student { public : calc_grade() { return 10; } }; class average:public student { public : calc_grade() { return 20; } }; class failed{ int marks; };

Correct Answer is : mysqldbcopy

2. Which type of function among the following shows polymorphism?

Correct Answer is : SELECT

3. In case of using abstract class or function overloading, which function is supposed to be called first?

Correct Answer is : mysqldump

4. Which among the following can’t be used for polymorphism?

Correct Answer is : –new-storage-engine

5. What is output of the following program? class student { public : int marks; void disp() { cout<<”its base class” }; class topper:public student { public : void disp() { cout<<”Its derived class”; } } void main() { student s; topper t; s.disp(); t.disp(); }

Correct Answer is : fetchrow_hashref()

6. Which among the following can show polymorphism?

Correct Answer is : BIGINT

7. Find the output of the program: class education { char name[10]; public : disp() { cout<<”Its education system”; } class school:public education { public: void dsip() { cout<<”Its school education system”; } }; void main() { school s; s.disp(); } }

Correct Answer is : TEXT

8. Polymorphism is possible in C language.

Correct Answer is : bad

9. Which problem may arise if we use abstract class functions for polymorphism?

Correct Answer is : TRUE

10. Which among the following is not true for polymorphism?

Correct Answer is : CALL

11. If 2 classes derive one base class and redefine a function of base class, also overload some operators inside class body. Among these two things of function and operator overloading, where is polymorphism used?

Correct Answer is : –single-transaction

12. If a function has to be called only by using other member functions of the class, what should be the access specifier used for that function?

Correct Answer is : mysqlimport

13. Which among the following is correct for the code given below? class student { private: student() { } public : student( int x) { marks =x; } };

Correct Answer is : TRUE

14. Which among the following is true for the code given below? class A { private : int marks; char name[20]; public : A(int x=100) { marks=x; } };

Correct Answer is : Statement based

15. Which among the following is correct to call a private member from outside the class?

Correct Answer is : my_sys.h

16. If private members has to be accessed directly from outside the class but the access specifier must not be changed, what should be done?

Correct Answer is : my_global.h

17. Which access specifier is/are most secure during inheritance?

Correct Answer is : 2

18. Choose the correct option for the code given below class A{ static int c=0; public: A(){ c++; } };

Correct Answer is : 1

19. Which option is false for the following code? class A { private : int sum(int x, int y) { return x+y; } public: A() { } A(int x, int y) { cout<<sum(x,y); } };

Correct Answer is : mysql_real_query()

20. Which member will never be used from the following class? class A() { int marks; char name[20]; public : A() { marks=100; } void disp() { cout<<”Marks= ”<'<marks; cout<<”Student”; } };

Correct Answer is : mysql_query()

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon