0% found this document useful (0 votes)
11 views3 pages

Cs Questions

Uploaded by

dummyaltaccc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Cs Questions

Uploaded by

dummyaltaccc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CS-VIVA QA-for Practical Exam

PRACTICAL EXAMINATION, JAN -FEB ‘2025


COMPUTER SCIENCE- VIVA QUESTION AND ANSWERS
PART – A (C++)
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. Mention the default access specifiers of a class
Ans : private
4. What is a class?
Ans: A class is a group of objects having similar characteristics
OR
A class is a user defined datatype consisting of data members and member functions.
5. What is an object?
Ans : An object is an instance of a class which can access data members and member functions
of a class.
6. Mention the different access specifiers in C++
Ans : private , public and protected
7. Which characteristic of OOP is implemented by defining a class?
Ans : Data Encapsulation.
8. What is an array?
Ans : An array is a collection of elements of same type with a common name.
9. What is insertion operation with respect to data structure? (Exclusively asked for inserting
an element into an array program )
Ans : It is a process of inserting / adding a new element into an existing array
10. What is deletion operation with respect to data structure? (Exclusively asked for deletion
an element from an array program )
Ans : It is a process of deleting / removing an element from an existing array.
11. What is searching? (Exclusively asked for Binary search program )
Ans : It is a process of finding an element and its location in an array.
12. What is the condition to apply binary search technique to search an element in an array
(Exclusively asked for Binary search program )
Ans : Elements should be in the sorted order (Ascending or Descending order)
13. What is sorting? (Exclusively asked for Sorting program)
Ans : It is a process of arranging the elements in an ascending or descending order.
14. Give an example for the primitive data structure
Ans : int , char , float , double
15. Give an example for a linear data structure
Ans : array , stack , queue
16. Give an example for non-linear data structure
Ans : Graph and Tree

1
CS-VIVA QA-for Practical Exam

17. What is function overloading?


Ans : It is a process of having two or more functions with the same name but differs in the
argument list (Number of arguments and type of arguments)
18. How does the C++ compiler identify the particular function to be executed in a set of overloaded
functions.
Ans : It identifies based on number of arguments and/or type of arguments.
19. Which characteristic of OOP is implemented using Function overloading?
Ans : Polymorphism
20. What is an inline function?
Ans : It is a short function which replaces the function call with the body of the function.
21. Give an advantage of an inline function.
Ans : Speed of execution of program increases (Or any relevant advantage)
22. Mention any one disadvantage of an inline function
Ans : The size of executable file increases which requires more memory.
23. What is a constructor?
Ans : It is a special member function which has the same name as that of a class used to
initialize objects.
24. When does a constructor is invoked?
Ans : It is invoked automatically when an object is created
25. Mention the types of constructor.
Ans : Default Constructor, Parameterized constructor and Copy Constructor
26. Which section of a class a constructor can be defined.
Ans : public Section
27. What is inheritance?
Ans : It is a process of one class acquiring the properties of another class
28. What is a base class?
Ans : It is a class from which other classes are derived.
29. What is derived class?
Ans : It is a class which is derived from the 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 which holds the 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

2
CS-VIVA QA-for Practical Exam

PART – B (HTML and SQL)


HTML
35. Mention any one web browser.
Ans :Google chrome , Internet explorer , Microsoft edge.
36. Mention the text formation tags in HTML
Ans :<B> - Bold , <I> - Italics , <U> - Underline
37. What is the purpose of TR tag in HTML
Ans :It creates a table row
38. What is DHTML
Ans :It is a web content which changes each time it is viewed.
39. Differentiate between check box and radio button
Ans :Radio button is used to select only one item from a list of items.
Check box is used to select multiple items from a list of items.
40. How do you change the background color of a webpage
Ans : Using BGCOLOR
41. Mention the tag used to scroll a text from one place to another in HTML
Ans : MARQUEE Tag
42. Mention the tag used to link from one webpage to another.
Ans : ANCHOR ( <A> ) Tag

SQL

43. Which command is used to add new columns to the existing table
Ans : Alter Command
44. Which command is used to count the number of records in a table
Ans : Using Count() group function
45. Differentiate between drop and delete command in SQL
Ans : drop command is used to delete entire structure of the table .
delete command is used to delete the records of the table.
46. Which clause in SQL is used to sort the records based on one or more columns
Ans : Order By clause
47. Which command is used to modify the records of the table
Ans : Update Command
48. Mention the DDL commands in SQL
Ans : Create , Alter and Drop commands
49. Mention the DML commands in SQL
Ans : Select , Insert , update and delete commands
50. Which command is used to retrieve the records of the table.
Ans : Select Command
-------------------------------------------------------------------------------

You might also like