You are on page 1of 4

II PUC – FINAL PRACTICAL EXAM FEB 2024

Computer Science - VIVA QUESTIONS, FEB’ 2024

PART-A
1. Which operator used to access member functions of a class?
Ans. Dot Operator (.)

2. Which operator used to define the member functions outside the class?
Ans. Scope Resolution Operator(::)

3. Which is the default access specifier of a class?


Ans. Private

4. What is a class?
Ans. It combines data members and member functions into a single entity.

5. What is an object?
Ans. It is an instance of a class.

6. Mention the access specifiers in C++.


Ans. Private, Public, Protected

7. Give an example for data encapsulation.


Ans. Class is an example.

8. What is an array?
Ans. It is a collection of elements of same type having the same name stored in continuous memory
locations.

9. What is insertion operation with respect to data structure?


Ans. It is the process of inserting an element into an array.

10. What is deletion operation with respect to data structure?


Ans. It is the process of deleting an existing element from an array.

11. What is searching?


Ans. It is the process of finding the location of an element in an array.

12. What is the condition to apply binary search technique to search an element in an array?
Ans. Array should be sorted.
13. What is sorting?
Ans. It is the process of arranging the array elements in either ascending or descending order.

14. Give an example for the primitive data structure.


Ans. int, float, character

15. Give an example for a linear data structure.


Ans. Stacks, Queues, Linked List

16. Give an example for non-linear data structure.


Ans. Trees, Graphs

17. What is function overloading?


Ans. Function overloading is the process of defining same function name many times to carry out
similar type of activities with different data items.

18. How does the compiler identify the particular function to be executed in a set of overloaded
functions?
Ans. Based on the number/data type of the arguments.

19. Which characteristics of OOPs is implemented using Function overloading?


Ans. Polymorphism

20. What is an inline function?


Ans. It is a function whose body is replaced at the place of its call during compilation.

21. Give an advantage of an inline function.


Ans. Faster execution of the program.

22. Mention any one disadvantage of an inline function


Ans. Size of executable file increases.

23. What is a constructor?


Ans. It is a special member function that is used to initialize data members of objects of a class
automatically.

24. When is a constructor invoked?


Ans. During Object declaration.

25. Mention the types of constructor.


Ans. Default Constructor, Parameterized Constructor and Copy Constructor.

26. A constructor is defined in which section of the class?


Ans. Public section
27. What is inheritance?
Ans. It is the capability of a class to inherit the properties of another class.

28. What is a base class?


Ans. It is the class from which properties are inherited.

29. What is derived class?


Ans. It is the class which inherits properties from base class.

30. Mention the operator used to create a derived class in C++


Ans. colon ( : )

31. What is a pointer?


Ans. It is a variable that contains the memory address of another variable.

32. Mention the address operator in C++.


Ans. &

33. Which operator is used to allocate memory dynamically?


Ans. new operator

34. Which operator is used to deallocate memory dynamically?


Ans. delete operator

PART - B
HTML
1. Mention any one web browser.
Ans. Google Chrome, Mozilla Firefox

2. Mention the text formation tags in HTML.


Ans. B, I, U

3. What is the purpose of TR tag in HTML?


Ans. to insert a row in a table

4. What is DHTML?
Ans. It is a combination of HTML tags and options that make web pages more interactive and
animated.

5. Differentiate between check box and radio button.


Ans. Check box – You can select multiple options Radio Button – You can select only one option

6. How do you change the background colour of a webpage?


Ans. using the attribute bgcolor with body tag.
7. Mention the tag used to scroll a text from one place to another in HTML.
Ans. Marquee tag

8. Mention the tag used to link from one webpage to another.


Ans. Anchor tag

SQL
1. Which command is used to add new columns to the existing table?
Ans. Alter + Add

2. Which command is used to count the number of records in a table?


Ans. Count(*) with Select

3. Differentiate between drop and delete command in SQL.


Ans. Drop deletes the table content and structure where as Delete deletes only the table contents.

4. Which clause in SQL is used to sort the records based on one or more columns?
Ans. ORDER BY with SELECT Command

5. Which command is used to modify the records of the table?


Ans. UPDATE Command

6. Mention the DDL commands in SQL.


Ans. CREATE, ALTER, DROP, DESC

7. Mention the DML commands in SQL.


Ans. INSERT, UPDATE, DELETE

8. Which command is used to retrieve the records of the table?


Ans. SELECT

You might also like