0% found this document useful (0 votes)
10 views6 pages

Viva Questions Computer Science

The document provides a comprehensive overview of Object-Oriented Programming (OOP) concepts, including languages that support OOP, characteristics such as classes and inheritance, and various types of constructors and access specifiers. It also covers basic data structures, SQL commands, and HTML tags, along with their functionalities. Key concepts like pointers, memory allocation, and the differences between check boxes and radio buttons are also discussed.
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)
10 views6 pages

Viva Questions Computer Science

The document provides a comprehensive overview of Object-Oriented Programming (OOP) concepts, including languages that support OOP, characteristics such as classes and inheritance, and various types of constructors and access specifiers. It also covers basic data structures, SQL commands, and HTML tags, along with their functionalities. Key concepts like pointers, memory allocation, and the differences between check boxes and radio buttons are also discussed.
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/ 6

1. . Mention any three High level languages that follow the OOP.

 Java.
 Python.
 Ruby.
 C++

2. characteristics /features/ basic concepts of OOP.


ANS : Objects, Classes, Abstraction, Encapsulation ,Inheritance, Polymorphism
3. Which is the default access specifier?
ANS: private
4. Which operator is used to access members of a class?
ANS: (::) scope resolution operator.
5. Which type of data members can be accessed outside the class?
ANS: Public members
6. What is the use/significance of scope resolution operator?
ANS: To define member function outside the class declaration.
7. What is an array of objects?
ANS: Collection of objects of same class (type).
8. Can an array be a member of a class?
ANS: Yes
9. What are data members?
ANS: The variables declared inside a class are known as data members.
10. What is the use of member-functions?
ANS: Member-functions are used to interact with data contained within user defined type.
11. What are access specifiers?
ANS: Every data member of a class is specified by three levels of access protection for hiding
data and function members internal to the class. They are Private , Public and Protected.
12. How do you access a member function of a class?
ANS: Using dot (.) operator
13. What are class instances called as?
ANS: Objects

14.What is inline function?


Ans: The inline function is a short function. Compiler replaces a function call
with the body of the function.
15. Write any one advantage of inline functions
ANS: The speed of execution of a program increases.
 Very efficient code can be generated
16. What is the disadvantage of an inline function?
ANS: More memory is needed
17. What is a friend function?
ANS: A friend function is a non-member function of a class has the access permission to the
private member of the class.
18. What is function overloading?
ANS: Function Overloading means two or more functions have same name, but differ in the
number of arguments or data types of arguments.
19. What is a constructor?
ANS: A Constructor is a special member function that is called automatically when an object
is created.
20. Name the access specifier used to declare a constructor?
ANS: Public
21. How many types of constructors are there?
ANS: Constructors are normally classified as follows:
 Default Constructors.
 Parameterized Constructors
 Copy Constructors.

22. What is a default constructor?


ANS: A default constructor is a special member function which is invoked by the C++
compiler without any argument for initializing the object of a class.
23. What is a zero argument constructor?
ANS: default constructor is called as zero argument constructors.
24. What is the drawback of default constructor?
ANS: It is not possible to initialize different objects with different initial values using default
constructors.
25. What is a parameterized constructor?
ANS: A constructor that takes one or more arguments is called parameterized constructor.
26. Name any one method to invoke parameterized constructors.
ANS:
 Implicit Call
 Explicit Call
 Initialization at the time of declaration with “ = “ operator.
27. What is a copy constructor?
ANS: Copy constructor is a parameterized constructor using one object can be copied to
another object.
28. What is a destructor?
ANS: A destructor is special member function that is executed when an object of that class is
destroyed.
29. Which operator is used with destructor?
ANS: tilde (~).
30. What is inheritance?
ANS: Inheritance is the capability of one class to inherit properties from another class.
31. What is a base class?
ANS: Base Class is the class whose properties are inherited by another class. It is also called
Super class.
32. What is derived class?
ANS: Derived Class is the class that inherits the properties from base class. It is also called
Sub class.
33. Give any one advantage of inheritance?
ANS: Reusing existing code
34. What is singe level inheritance?
ANS: Single Inheritance is the process of creating a new class from existing class base class.
35. What is a super class?
ANS: Base Class or Super class is the class whose properties are inherited by another class.
36. What is a subclass?
ANS: Derived Class or Sub class is the class that inherits the properties from base class.
37. Write any two advantages of inheritance.
ANS:
 Reusing existing code
 Faster development time
 Easy to maintain
38. What do you mean by a pointer?
ANS: A pointer is a variable that holds a memory address of another variable.
39. Give any one advantage of pointer?
ANS: Pointers save memory space.
40. What is static memory allocation?
ANS: Allocating memory during the compilation of the program.
41. What is dynamic memory allocation?
ANS: Allocating memory during the execution of the program or at run time.
42. What is the use of new operator in C++?
ANS: ‘new’ operator is an operator used for allocating memory during the execution of the
program or at run time.
43. What is the use of delete operator in C++?
ANS: The ‘delete’ operator is used to destroy the variables space which has been created by
using the ‘new’ operator dynamically.
44. What is the other name for pointer operator?
ANS: Indirection operator.
45. What does a pointer variable store?
ANS: It holds a memory address of another variable.
46. Expand SQL
ANS: Structured Query Language
47. What is alter command
ANS: It is used to modify table structure
48. What is update command
ANS: It is used to modify the records present in table
49. What is truncate command
ANS: It is used to delete all records present in table without affecting table structure
50. What is Drop command
ANS: It is used to delete complete table
51. Mention data types in SQL?
ANS: Varchar2, Number, Date
52. Which types of data members are accessible outside the class?
Ans: public members
53. What is an array?
Ans: An array is a set of homogeneous elements under the same name and same data type
(Or Any Relevant Definition)
54. Define data structure.
Ans: A data structure is a specialized format for organizing and storing data.
55. Give an example for linear data structure.
Ans: Array / stack / queue / linked list.
56. Define stack.
Ans: STACK is a special type of data structure where data items are inserted and deleted
from one (same) end called top of the stack
57. What is the purpose of <img> tag?
Ans: To insert an image in a webpage.
58. What is the purpose of <tr> tag in html?
Ans: To insert row in a table.
59. What is DHTML?
Ans: Dynamic Hyper Text Markup Language (DHTML) is a combination of Web
development technologies used to create dynamically changing websites.
60. What is web page?
Ans: Webpage is a hypertext document on the World Wide Web (website) (Any Relevant
Answer).
61. Mention any one example for web browser.
 Google Chrome.
 Mozilla Firefox.
 Microsoft Edge.
 Internet Explorer.
 Safari. (Any One)
62. Mention the Difference between Check Box and Radio Button
Ans: Check Box: Can choose one or more options
Radio button: Can choose only one option
63. Name text formatting tags in HTML
<B>: Bold <I>: Italics <U>: Underline (Any Formatting Tag)
64. Explain any two resizing text tags.
ANS : <font> , <small> , <big>

65. What is HTML?


ANS: Hypertext Markup Language, a standardized system for tagging text files to achieve font,
colour, graphic, and hyperlink effects on World Wide Web pages.

66. Expand HTML.


ANS: Hypertext Markup Language

67. Mention table tags


<Table> --- Start Table
<TR> ---Table Row
<TD>--- Table Data
</TD>--- End Data
</TR>--- End Row
</Table>--- Ends Table.

You might also like