2nd puc computer science viva questions

 2nd puc computer science viva questions, kar 2nd puc computer science viva questions, 2nd puc computer science lab viva questions, karnataka 2nd puc computer science practical viva questions,

2nd puc computer science viva questions

 2ND PUC COMPUTER SCIENCE VIVA QUESTIONS

DATA STRUCUTURE

         1.     What is data structure?

Ans: a data structure is a specialized format for organizing and storing data

        2.     What are primitive data structures?

Ans: integer, floating point, character and pointer

        3.     Define an array

Ans: array is a collection of homogeneous data items under the same name

        4.     What is traversal?

Ans: the process of accessing each data item exactly once to perform some operation is called traversing

        5.     What is searching? Mention any two searching techniques

Ans: the process of finding the location of a data item from the given collection of data items is called searching

Ex: linear search and binary search

6.     What is sorting?

Ans: the process of arrangement of data items in ascending or descending order is called sorting

        7.     What is merging?

Ans: the process of combining the data items of two structures to form a single structure is called merging

        8.     What is stack?

Ans: a stack is an ordered collection of items where the addition of new items and the removal of existing items always take place at the same end. This technique uses LIFO principle

        9.     What are the applications of stacks?

Ans: - stack is used to reverse a word

-       It is used in “undo” mechanism in text editors

-       Used in backtracking

-       Used in conversion of decimal number into binary

-       To solve tower of Hanoi

-       Conversion of infix into prefix and postfix expression

        10.     What are prefix and postfix expressions?

Ans: if an operator precedes two operands, it is called prefix expression

      Ex: +ab

If an operator follows two operands it is called post fix expression

      Ex: ab+

11.What is queue?

Ans: a queue is an ordered collection of items where an item is inserted at one end called the rear and the existing item is removed at the other end called the front. Queues maintain a FIFO principle

        12.     Specify the types of queues

Ans: - Simple queue

-       Circular queue

-       Priority queue

-       Dequeue or double ended queue

        13.     What is linked list?

Ans: a linked list is a linear collection of data elements called nodes and the linear order is given by means of pointers. Each node contains two parts fields: the data and reference to the next node.

        14.     Mention the types of linked lists

Ans: Singly linked list(SLL), Doubly linked list(DLL) and Circular linked list(CLL)

        15.     What is garbage collection?

Ans: if a node is added from the linked list or if a linked list is deleted, we require the space to be available for future use. The memory space of the deleted nodes is immediately reinserted into the free storage list. The operating system of the computer periodically collects all the deleted space into the free-storage list. This technique of collecting deleted space into free-storage list is called as garbage collection

        16.     What is graph?

Ans: a graph is a collection of nodes called vertices and the connections between them called edges

        17.  List the types of graphs

Ans: directed and undirected graphs

BASIC CONCEPT OF OOP

        1.     What are the basic concepts of OOPs? OR what are the major characteristics of OOPs?

Ans: - Objects      -Classes        -Data abstraction      -Data encapsulation

-       Inheritance      -Overloading      -Polymorphism      -Dynamic binding

-       Message passing

        2.     What is object?

Ans: object is an entity which has physical existence in the real world. An object is a collection of data members and associated member functions. Each object is identified by a unique name

        3.     What is class?

Ans: a class is a collection of object of similar type that share some common properties among them

        4.     What is data abstraction?

Ans: data abstraction permits the user to use an object without knowing its internal working

        5.     What do you mean by data encapsulation?

Ans: data encapsulation will prevent direct access to data. The data can be accessed only through functions present inside the class.

6.     What is inheritance?

Ans: inheritance is a process of acquiring properties from parent class to child class

        7.     What is overloading?

Ans: two or more functions having the same name but differ in the number of arguments or data type of arguments is called overloading.

        8.     What is polymorphism?

Ans: a function can take multiple forms based on the type of arguments, number of arguments and data type of return value

        9.     What is Dynamic binding?

Ans: it is a process of connecting one program to another at the time of its execution is called dynamic binding

        10.  What is a base class?

Ans: the class that inherit its property to another class is called base class or parent class or super class

11.  What is a derived class?

Ans: a class that get inherited by the other class is called derived class or child class or sub class

        12.  What is message passing?

Ans: a message for an object is request for execution of procedure. Message passing involves specifying the name of object, name of the function and the information to be sent

        13.  What are the applications of OOP?

Ans: - Computer graphic applications

-       CAD/CAM software

-       Object oriented data base

-       User interface design such as windows

-       Real time systems

-       Simulation and modeling

-       Artificial intelligence and expert systems

CLASSES AND OBJECTS

1.     Write the syntax of class

Ans:     class class_name

            {

            private: data member;

                        function member;

            protected: data member;

                        function member;

            public: data member;

                        function member;

            };


2.     What are the access specifiers? Mention their types

Ans: access specifiers are the keywords in C++ that allows access permission of the members of the class.

            There are three types of access specifiers

-       private   -protected   -public


3.     Where member functions can be defined?

Ans: member functions can be defined inside the class definition and outside the class definition using scope resolution operator (::)


4.     What are the two types of members referenced in a class?

Ans: data members and function members


5.     Which type of members is accessible outside the class?

Ans: public


6.     Which access specifier is implicitly used in a class?

Ans: private


7.     What is meant by an array of objects?

Ans: it is a collection of object of same class type are called array of objects


FUNCTION OVERLOADING AND MEMBER FUNCTIONS

        1.     Mention the restrictions on overloaded functions

Ans: - each function in a set of overloaded function must have different argument list

-       If typedef is used for naming functions, then the function is not considered as different type

        2.     What are inline functions?

Ans: inline function makes the compiler to replace a function call with the body of the function

        3.     What are the advantages of inline function?

Ans:  - they are compact function calls

-       The size of the object code is considerably reduced

-       The speed of the program execution increases

-       Efficient code can be generated

-       The readability of the program increases

        4.     What is the disadvantage of inline function?

Ans: as the body of inline function is substituted in place of a function call, the size of the executable file increases and more memory is needed

        5.     When inline function may not work?

Ans: inline function may not work when it is too long or complicated, when it is recursive, when it has looping constructs and when it has a switch or goto statements

        6.     What is friend function?

Ans: a friend function is a non-member function that is a friend of a class. The friend function is declared within a class with the prefix friend. This function is used to access private and protected members of the class

CONSTRUCOTRS AND DESTRUCTORS

        1.     What is a constructor?

Ans: constructor is a special member function used to initialize the data members of the class

        2.     What are the rules for writing constructors?

Ans: - a constructor name is same as that of the class name

-       There is no return type, not even void

-       A constructor should be declared in public section

-       A constructor is invoked automatically when objects are created

-       It is not possible to refer to the address of the constructors

-       The constructors make implicit calls to the operators new and delete when memory allocation is required

        3.     Mention the types of constructors

Ans:  - Default constructor

-       Parameterized constructor

-       Copy constructor

        4.     What are parameterized constructors?

Ans: a constructor that takes one or more arguments is called parameterized constructor

        5.     What is copy constructor?

Ans: A copy constructor in which one object can be copied to another object

        6.     What is destructor?

Ans: A destructor is a special member function that will be executed automatically when an object is destroyed. It is having same name as that of the class but preceded by a tilde (~).

INHERITANCE

        1.     What are the advantages of inheritance?

Ans:  - Reusing the existing code

-       Faster development time

-       Easy to maintain

-       Easy to extend

-       Memory utilization

        2.     Mention the types of inheritance

Ans:  - Single inheritance

-       Multilevel inheritance

-       Multiple inheritance

-       Hierarchical inheritance

-       Hybrid inheritance

        3.     What are virtual base classes?

Ans: When two or more objects are derived from a common base class, we can prevent multiple copies of the base class being present in an object derived from those objects by declaring the base class as virtual when it is being inherited. Such a base class is known as virtual base class. This can be achieved by preceding the base class name with the word virtual.

POINTER

        1.     What is a pointer?

Ans: pointer is a special variable that hold the address of another variable

        2.     How do you declare and initialize pointer?

Ans:

Declaration:

 data type  *pointer_variable, common_variable_name;

Initialization:

Pointer_variable=Address_operator common_ variable_name;

Ex: int *ptr,a;

      ptr=&a;

        3.     What are the operators that are used with pointers?

Ans: - the address of operator (&) and pointer operator (*)

        4.     What is memory leak?

Ans: if the objects that are allocated memory dynamically are not deleted using delete, the memory block remains occupied even at the end of the program. These memory blocks increase in number; bring adverse effect on the system. This situation is called memory leak

        5.     What is static memory?

Ans: it is a memory allocated to the variable during its declaration

        6.     What is dynamic memory?

Ans: it is a memory allocated to the variable during execution of a program

        7.     What is free store?

Ans: free store is a pool of unallocated memory heap given to a program that is used by the program for dynamic allocation during execution


SQL COMMANDS

        1.     What are DDL commands?

Ans: CREATE, ALTER AND DROP

        2.     What are DML commands?

Ans: INSERT, UPDATE AND DELETE

        3.     What are the operators used in SQL?

Ans: - Arithmetic operator

-       Comparison operator

-       Logical operator

-       Operators used to negate conditions

        4.     What is SQL primary key?

Ans: a column or combination of columns which uniquely identifies each row in the table

        5.     What is foreign key? OR what is referential integrity?

Ans: this constraint identifies any column referencing the primary key in another table

        6.     What is unique key?

Ans: this constraint ensures that a column or a group of columns in each row have a distinct value. A column(s) can have a null value but the values cannot be duplicated

        7.     What are DCL commands?

Ans: GRANT and REVOKE

        8.     Expand SQL

Ans: Structured Query Language

        9.     What is the use of commit and revoke command?

Ans: commit command is used to save the document permanently and it is used to save changes whereas revoke command is used to undone the changes made

WEB DESIGNING

        1.     Expand HTML

Ans: HyperText Markup Language

        2.     Name any four tags

Ans: <html>, <body>, <b>, <head>, <p>, <title> etc

        3.     What is web browser?

Ans: Web browser is application software that interprets the tags written in html

        4.     What are the types of listing?

Ans: Ordered List (<OL>) and Unordered List (<UL>)

        5.     What is the tag used to get hyperlink?

Ans: Anchor tag <a>

        6.     How to write comment line in HTML?

Ans: <! Text here>

        7.     What is the extension of hypertext markup language file?

Ans:  . (dot) html

        8.     What is XML?

Ans: eXtended Markup Langauage (XML) for documents containing structured information

        9.     What is DHTML?

Ans: Dynamic  HyperText Markup Language

        10.  Expand URL

Ans: Uniform Resource Locator

        11.  Expand HTTP.

Ans: HyperText Tranfer Protocol.

2nd puc computer science viva questions 2nd puc computer science viva questions Reviewed by Vision Academy on February 21, 2021 Rating: 5

2 comments:

CheckOut

Powered by Blogger.