GrapeCity Placement - Technical questions on OOPS and DBMS from previous years

GrapeCity Placement - Technical questions on OOPS and DBMS from previous years



OOPS

• What is the relation between inheritance and abstraction?

a. Inheritance prevents abstraction
b. A base class is an abstraction of all its derived classes
c. Base and derived classes are abstractions for each other
d. No relationship between them
e. A derived class is an abstraction of all its base classes

• Explain the purpose of template functions.

a. To implement container classes
b. To allow a single function to be used with varying types of arguments
c. To permit the use of the debugger without the gstabs flag
d. To hide the same name of the function from the linker

• Is it possible to have same names for 2 classes containing member functions

a. Yes, but only if the main program does not declare both kinds
b. No
c. Yes, this is always allowed
d. Yes, but only if the 2 classes have the same name

• Choose the general characteristics of object by selecting the correct option.

a. Name, properties, behaviour
b. It can act on receiving a message
c. Has name and properties
d. A & C
e. B & C

• Can you activate a member function of a class if you got to activate another member function of the same class?

a. Yes, only private member function
b. No
c. Yes, but only public member functions
d. Yes, both public and private member functions can be activated

• If you have to step thro’ items of a container class, which technique will you use?
a. Iterator
b. Copy constructor
c. Default constructor

• Explain inheritance.
a. A relationship in which the structure and functionality of a class make calls to functionality of another
b. A relationship in which the structure of a class includes one or more instances of another
c. A relationship in which the structure and functionality of a class (“child) is defined in terms of the structure and functionality of another (parent)
d. A relationship in which the structure and functionality of a class (“parent) is defined in terms of the structure and functionality of another (“child)
e. All of the above

• Why do you think is object oriented programming useful?
a. It promotes thinking about s/w in a way that models the way we think and interact naturally
b. Supports code rescue
c. It supports good s/w engineering practices
d. A & B
e. A, B and C

• What do you call bundling data members together with functions?
a. Data morphism
b. Encapsulation
c. Data hiding
d. Data binding

• List the relation between .a class and its public parent class.
a. “is implemented as a
b. “has a
c. Uses a
d. “.is a.
e. Becomes a

• Choose the correct statement if you want to develop 2 different, + operators that calculate and return an object of the same class.
a. Operators must have different parameter lists
b. It is not possible to have two different +operators
c. One operator must be a friend and the other must not
d. One operator must be public and the other private


DBMS

• From the below mentioned options, choose the one used with a foreign key constraint?
a. Check constraint
b. Primary key constraint
c. The references clause

• Choose the odd man out from, select type, average (price), minimum (price), from product group by category.
a. There is nowhere clause
b. Nothing
c. You can’t include multiple aggregates in a select list

• Where indexing should be applied?
a. Changed frequently
b. Seldom referenced in query
c. On frequently searched column
d. Containing few unique columns

• From the below mentioned options which of the following is not mentioned in a trigger?
a. Begin
b. While
c. Update
d. Select into

• How will you control the query execution plan used by the database while writing SQL queries?
a. Define a static cursor and specify the “using specific index” keyword
b. Enclose query in a transaction and add a statement using the “set search” keyword
c. Query directly against an index instead of table
d. Most databases provide proprietary methods to give database hint

• Represent this statement in a type of relationship in the relation model, “a student has three different teachers. Each of these teachers has several students”.
a. A single many to many relationship
b. Three one to one many relationship
c. Two many to one relationship
d. At least 2 many to many relationship

• If you have to set for the column to function as a primary key, which of the following properties will you use of a column or column sets?
a. A non - clustered index
b. A clustered index
c. No nulls
d. There must be at least one foreign key on the same table

• From the below mentioned options, which is used to return the number of rows in a table?
a. Select count (*) from table name
b. Select numrows from table name
c. Select all count from table name

• The primary key uses which type of data integrity?
a. Domain integrity
b. Relational integrity
c. Entity integrity
d. Referential integrity

• How many rows could be returned by the below mentioned query:
Selecta.pk, fn, b.zip, c.city from a, b, c where a.pk = b.pk
a. 10,000
b. 100
c. 1,00,000
d. 1,000, 000
Post your comment