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

Bihar STET Computer Science Guide

This book is designed for the Bihar STET computer science re-exam, featuring over 370 pages of content including key topics and multiple-choice questions relevant to the BELTRON standard. It covers essential areas such as data communication, networking, operating systems, data structures, and C++. The author expresses gratitude for the contributions of collaborators and emphasizes the book's focus on clarity and relevance for exam preparation.

Uploaded by

surajkrsce
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 views371 pages

Bihar STET Computer Science Guide

This book is designed for the Bihar STET computer science re-exam, featuring over 370 pages of content including key topics and multiple-choice questions relevant to the BELTRON standard. It covers essential areas such as data communication, networking, operating systems, data structures, and C++. The author expresses gratitude for the contributions of collaborators and emphasizes the book's focus on clarity and relevance for exam preparation.

Uploaded by

surajkrsce
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

PREFACE

This book has been prepared considering Bihar STET computer science re-exam in
September 2020. We have included topics and MCQs considering level of
BELTRON. Every effort has been made to ensure that book should be to the point
and as per expected line of BELTRON STET. This book consists of 370+ pages so
it has ample content. I highly appreciate contribution of Mr. Javed (GK Practice
Set) & Mr. Nikhil Upadhyay to come up with this book.

I strongly admire efforts and advice of numerous people who had been engaged in
process of creation of this book.

22-08-2020 Varun Singh

[Link] (REC Surathkal), [Link]

COMPUTER SCIENCE

1
CONTENT TABLE

CONTENT PAGE NO.

Data Communication Networking 3-15

Operating System 16-22

Data Structure 23-32

DBMS 33-48

C++ 49-64

MCQs 65-370

2
DATA COMMUNICATION & NETWORKING

What is Data Transmission?


As clear by name, Data transmission is the transfer of digital data over a
point-to-point or point-to-multipoint communication sources. Examples are
copper wires, optical fibers, various wireless communication channels,
computer buses etc. There are numerous protocols that are followed when we
consider data transmission over any selected network.

What are Serial and Parallel Transmission?


Serial Transition: Digital data transmissions can be either serial or parallel.
When data in any communication network is sent or received using serial
data transmission, digital data bits are organized in a specific order, since
they can only be sent one after one in a proper order. Serial Transmission can
be Synchronous or Asynchronous.

Parallel Transmission: When digital data is transmitted using parallel data


transmission technique, multiple data bits are sent over multiple channels at
the same time. It means data can be sent much faster in compare to serial
transmission.

What are Synchronous and Asynchronous Data Transmission?

Synchronous Transmission: this transmission is a method of data transfer in


which continuous data signal is accompanied by timing signals to make sure
that the transmitter and the receiver are in step (synchronized) with each
other.

3
Asynchronous Transmission: This type of transmission works in spurts and
inserts a start bit as well as a stop bit at its termination to inform the receiver
where it begins and ends.

What are Simplex, Half Duplex and Full Duplex?


These are three data transmission modes.
Simplex: information flows in one direction.
Half Duplex: One time one way communication
Full Duplex: Simultaneous connection of both ways

What is Multiplexing and its types?


This is the technique of data transmission that allows multiple signals to
traverse across single data link in network. For any digital communication to
complete, multiplexing as well as de-multiplexing both are required. There
are numerous type of multiplexing and we describe three of them over here:

 FDM: it means frequency division multiplexing. Total bandwidth


is divided in frequencies. Every channel gets its own frequency
for transmission.
 WDM: it means wave division multiplexing. Different
wavelength light multiplexed into one.
 TDM: It means time division multiplexing. Switches are used to
carry this type of multiplexing.

Because of multiplexing, signal can be sent over very long distance without
distortion. Less number of wires required or circuit complexities decrease.

4
What is OSI Model?

OSI stands Open System Interconnection. This is an internationally accepted


digital communication models among networks. This model works for
computer as well as phonic communication. This model consists of seven
layers and each layer has its own functionality. This model was developed by
ISO in year 1984.

Out of seven layers of OSI model, some deal with host while some deal with
various functions of network.

Which are Different Layers of OSI and their Corresponding Function?

In OSI, there are seven layers with their individual functionality and we will
explain all of them one by one. List of layers are as below:

1. Physical Layer

5
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer

1. Physical layer: physical data system of communication is defined


in this layer. Type of transmission mode is defined in this layer
(Simplex, Duplex etc). Topology of network is also defined in this
layer of communication.
2. Data Link Layer: This layer provides node to node data transfer in
communication. Data link layer is further divided into 2 parts a)
media access control b) logical link control

6
3. Network layer: this layer works for functional as well as
procedural means for data transfer in network.
4. Transport layer: This layer works for delivering message between
network hosts. Transport layer also accepts data from application
layer and get it ready for addressing at network layer.
5. Session layer: This layer controls connection between computers in
any network. When to connect and when not to connect.
6. Presentation layer: As clear from name, data presentation is done
over here like data compression, decompression, encryption,
decryption etc.
7. Application layer: this is the layer that communicates directly with
user. This layer provides services like user login, naming network
devices, formatting messages, e-mails, transfer of files and many
more.

Physical Layer Cabling is done here


Data Link Layer Data Frames are created, Detection of
Transfer errors
Network layer Data Transformed Nodes to Nodes,
Router & Switches work here
Transport Layer Layer works for transmission of data
from source to destination
Session Layer Creates session for communication &
once process ends, session expires
Presentation Layer Encryption, Decryption, TLS, SSL

7
Application Layer HTTP, SMTP, DHCP, FTP,TELNET

What is Piggy Backing?

Piggy-Backing is a bi-directional data transmission system in OSI


transmission with acknowledgement.

Which are Different Types of Area Network?

8
There are many types of computer network based on area that they cover and
their modus operandi. Here we will explain about four prominent types of
networks:

1. LAN
2. MAN
3. WAN

LAN: Local area network is a computer network that interconnects


computers within a limited area such as any residential area, school, college,
laboratory, office building etc. Ethernet and Wi-Fi are often used
technologies for local area networks.

MAN: A metropolitan area network (MAN) is a computer network that


interconnects users with various computer resources in any geographic area
or region that is larger than that covered by a local area network (LAN) but
smaller than wide area network (WAN).

WAN: this is a telecommunications network that extends over very large


geographic region for the primary purpose of computer networking. WAN
are often established with leased telecommunication circuit.

9
What is Computer Network Topology and Different Types?

Network topology means arrangements of elements in any computer network.


Some well known and often used technologies are as listed below:

1. Mesh Topology
2. Star Topology
3. Bus Topology
4. Ring Topology
5. Hybrid Topology

Mesh Topology: In mesh topology every device will be connected to other


device on the computer network through a dedicated point-to-point link.
There will be data traffic issue with this type of network topology. Fault
detection will be easy and network will be secure too.

10
Star Topology: every device of the network will be connected to a central
device called hub. This network does not allow direct communication among
devices. Networking will be affordable as there will be requirement of only
one input/output port. For networking lesser cables would be required. If one
link fails then other links would still work fine.

Bus Topology: in this type of network, there will be one main cable and
concerned devices will be connected through drop lines. It is easy to install
this type of network. In compare to Mesh and Star both, there will be lesser
cable required for this type of network. This type of topology can’t be used
for broad network.

11
Ring Topology: A ring computer network is a topology in which every node
connects to exactly two nearby nodes, forming a continuous pathway for
signals through every node. This network is easy to install and devices can be
easily installed and removed from topology. Biggest problem with this type
of network is, if link fails at one point then entire network will collapse.

12
Hybrid Topology: we mentioned four different topologies above and mixture
of one or more topology is known as Hybrid topology. As per requirement,
one can change which topology to be selected. On other hand fault detection
will be not easy for this topology.

What is Packet and Circuit Switching?

Circuit switching is a method of starting a telecommunication in which two


network nodes make a dedicated communication channel before the nodes
start communication.

Packet Switching is a method of telecommunication in which data is


transmitted over a digital network into packets. Packets are made of a header
and a payload.

13
The main difference between circuit switching and packet switching is that
Packet Switching will be connectionless while circuit switching will be
connection-oriented.

Some More Noteworthy Points about Network Communication:

 Poll and Select are also computer network communication system. It is


based on master slave configuration.
 Error detection is done in Data Link Layer of OSI while error
correction is completed in Transport Layer.
 Data Gram: this is data sequence transfer system in which data frames
arrival time and order are not in fix.
 BAUD Rate: Total number of signals transferred per second in
communication.
 Parity Bit: ASCII is actually 7 bit code system but actually it is
considered as 8 bit. Concerned vendor adds an extra bit at the side of
least significant bit side. This extra bit works for error check.
 Cyclic Redundancy Check: this is a popular error detecting code
system in digital communication.
 WAN covers large area like a country or continent. WAN connection is
made using Subnet. Subnet stands for a big network.
 Repeater operates in physical layer of OSI. On traversing distance,
signal gets attenuated and this loss is fixed by repeater.

14
 A gateway in any network connects two different networks using
different protocols. On other hand Bridge is used to join two similar
types of networks.
 Handshaking is a communication process where rules are set prior to
start of communication.
 Nowadays IPV6 has broadly replaced IPV4.
 Computer network topology is an arrangement of various data elements
of network. Example: Nodes, Links etc.
 Peer to peer is decentralized style communication where every node
can communicate with other.

15
OPERATING SYSTEM

Operating System: An operating system is a collection of various software


programs that manages computer hardware resources and based on hardware
provide services for computer to operate. Operating System is system
software that provides bridge between computer user and computer hardware.
Examples: Microsoft Windows, MacOS, LINUX, Android etc are example of
operating system.

Purpose of Operating System: operating system is system software that


performs all the basic tasks in computer system like file management,
memory management, process management, various input and output,
controlling operations of peripheral devices like disk drives and printers.

 Memory Management
 Process Management
 Device Management
 Disk’s File Management
 System Security
 Control of system performance
 Coordination between other software and users

Prominent Operating Systems: name of some popular Operating Systems


are Linux Operating System, Windows Operating System, VMS, OS/400,
UNIX, AIX, z/OS, etc.

16
Memory management: it refers to management of Primary Memory or Main
Memory of system for execution of various programs. In multiprogramming,
the OS decides which process will be allotted memory when and how much

Processor Management: in multiprogramming system environment, the OS


decides which process will get processor when and how long. This function is
known as process scheduling.

File Management: A file system is normally organized into various


directories for easy navigation and usages. It keeps track of information,
location, uses, status and other details of file.

Types of Operating System:

Batch Operating System: Batch processing is actually a technique in which


an Operating System aggregates programs and data together in a batch before
its processing starts. Operating system of this category does not interact with
the computer directly. Example: Punch Card
17
Time Sharing Operating System: Time-sharing is a technique which
enables many users, located at various places, to make use of a particular
computer system at same time. This is an extension of multi programming.
Example: UNIX

Multi programming means there will be single processor and multiple


programs. Computer running Google Chrome and MS-Excel file
simultaneously is an example of multi programming.

Distributed Operating System: this type of operating system uses multiple


central processors to serve multiple real-time applications and many users
too. Example: Plan 9, MOSIX etc. This type of operating system is also
known as loosely coupled system.

Network Operating System: this type of operating System runs on a server


and provides server the capability to manage various data, users, groups,
security, various applications, and other networking associated functions.
Some prominent examples are windows, LINUX, MAC etc

Real Time Operating System: this type of operating system is created to


process data instantly without any buffer delay.

Multitasking: this is the condition when multiple jobs are executed by the
CPU simultaneously by interchanging among them. Switching occur so
frequently that the users can interact with every running program
simultaneously. This type of operating system is also known as Time-sharing
system.

18
Difference between Multi Programming and Multi Tasking?

Multiprogramming system works on single processor while Multitasking


works on multiple processors.

Spooling: this is acronym for simultaneous peripheral operations on line.


Spooling means putting numerous data for various I/O jobs in a buffer.

When any program is loaded into the memory and it turns into a process, it
can be classified into four sections namely stack, heap, text and data.

Stack contains temporary data like method/function parameters, return


address and various local variables.

Heap: this is dynamically allocated memory for any process during its run
time.

Process Scheduling: This is the activity of the process manager that handles
the elimination of the running process from the CPU and the selection of
some other process on basis of a planned strategy. A Process scheduler
schedules various processes to be assigned to the CPU based on pre-defined
scheduling algo.

Which are Well Known CPU Scheduling Algorithms?

 First Come, First Serve (FCFS) Scheduling


 Shortest Job First Scheduling
 Priority Scheduling
 Shortest Remaining Time Scheduling
 Round Robin Scheduling
19
 Multiple Level Queues Scheduling

These algorithms are either non-preemptive or preemptive. Non-preemptive


algorithms are designed so that once a process enters the running state, it
cannot be preempted until it completes its given time while preemptive
scheduling is based on priority where scheduler can preempt a low priority
running process anytime when any high priority process enters into a ready
state.

Priority Scheduling: this is a non-preemptive algorithm and also one of the


most common scheduling algorithms in the batch system. Every process is
given a priority number. Process that has highest priority will be executed
first and so on. Various processes with same priority will be executed on first
come first served basis. Priority of process can be decided based on memory
requirements, time requirements or other resource requirement.

Round Robin Scheduling: this is a preemptive process scheduling


algorithm. Every process will be provided a fix time for execution, it is called
a quantum. Once any process is executed for a given time period, it is
preempted and other process starts execution for a given time period.

Thread: this is a flow of execution through the process code, with its own
program counter which keeps track of which instruction to be executed next.

Program Counter: this is a register in a computer processor that contains the


address of the instruction that is to be executed at the current time.

Types of Threads:

20
There are two primary types of threads:

1. User level thread: it is managed by user.


2. Kernel level thread: It is managed by operating system

Swapping: this is a mechanism where a process can be swapped temporarily


out of main memory of system to secondary storage of system and make that
memory available for other processes.

Fragmentation: As various processes are loaded and removed from the


memory, the free space will be broken into little pieces. It happens after
sometime that processes can’t be allocated to system’s memory blocks
considering their small size and memory blocks will remain unused. This
problem is popularly known as fragmentation.

Paging: in operating systems, paging is a memory management scheme


through which computer stores and executes data from secondary storage for
uses in the main memory.

Direct Memory Access: this is a popular method that allows input/output


(I/O) device to send or receive data directly from the main memory of
computer, bypassing the CPU in process will speed up memory operations.

Polling I/O: Polling in computer science, refers to actively sampling of the


status of external device by any client program.

Maximum time, devices will not need attention and when one does it will
have to wait until it is next considered by the polling. This is an inefficient
method and processors time will be wasted on unnecessary polls.

21
What is Interrupt I/O?

An alternative option for dealing with I/O is the interrupt-driven method.


Interrupt is a signal for the microprocessor from a device that needs attention.

What is Semaphore?

In the world of computer science, semaphore is a variable or abstract data


type that is used to control various accesses for a common resource by
multiple processes in concurrent systems like a multitasking operating
system.

What is deadlock?

This is a condition where a set of various processes are blocked because


every process is holding any resource and waiting for another resource
acquired by the other process. Dijkstra’s algorithm is used to avoid deadlock.

22
DATA STRUCTURE

What is Data Structure?

Data structure is a collection of various types of data values, the relationships


among them, and the various possible functions or operations that can be applied to
the set of data. Data Structure is mainly used in programming and Databases.
Program can be considered as collection of algorithm and data structure.

What is Storage Structure?

Representation of any particular data structure in the main memory of a computer


system is called as storage structure.

What is Array?

An array is a collection of various data items stored at contiguous memory


locations in system. Idea is to store many items of the same type at one place. This
makes it easier to calculate the position of every component by adding an offset to
the base value. Array can be one dimensional or multi dimensional.

What is Sparse Array?

This is a type of data array where all elements have nearly the same value.

What is Linked List?


In the world of computer science, a linked list data structure is a linear
collection of various data elements whose order is not given by their physical

23
place in the memory. Each element points to the next member in this type of
data structure. It is the data structure consisting of a collection of various
nodes which together represent a sequence connection.

What is String?
A string is a data type and is often implemented as an array data structure of
bytes which stores a sequence of various elements. String may also denote
more general arrays or other sequence data types and structures.

What are differences between Recursion and Iteration?

Iteration Recursion

Process of executing of statements Recursion is a popular technique of


repeatedly until required condition is defining anything in terms of itself
met
Iteration includes four well known There must be an exclusive if statement
steps namely Initialization, Condition, inside any recursive functions,
Execution and Updating specifying stopping condition.
Any recursive problem can be Not all problems have recursive
addressed Iteratively solutions

Iterative counterpart of any problem is Recursion is generally not a good


more efficient in terms of system option to go for simple problems.
memory utilization and execution
speed.

24
Which are different Data Structure Types and associated Pros and Cons?
There are numerous types of data structure as listed below:
1. STACK: Stack is a linear data structure type that follows a particular
order in which the operations are supposed to be performed. The order
can be LIFO or FILO

2. ARRAY: An array is a collection of various data items stored at contiguous


memory locations in system. Idea is to store many items of the same type at
one place. This makes it easier to calculate the position of every component
by adding an offset to the base value. Array can be one dimensional or multi
dimensional.

3. Queue: this is a linear type structure that follows a particular order in


which various operations to be performed. The order will be here First
In First Out (FIFO). An example of a queue is any queue of consumers
for a resource where the consumer that came first will be served first.
Difference between stacks and queues comes in removing. In a stack
we remove the item from the side of the most recently added while in a
queue, we remove the item the least recently added.

4. Linked List: A linked list is a type of data structure that includes a


series of numerous connected nodes. Here, every node stores the data
and the address of the next node. Last node of linked list can be
identified because its next portion will be NULL.

25
5. Binary Tree: A tree structure whose elements have maximum two
children is called a binary tree. Because every element in a binary tree
can have maximum 2 children, we also name them the left and right
child.

Data Structure Advantages Disadvantages


Array Quick insertion and Slow search, slow
fast access deletion and fixed size
Ordered Array Quicker than unsorted Slow insertion and
array deletion
STACK Provides last in first Slow access to other
out access items
QUEUE Provides first in first Slow access to other
out access items
LINKED LIST Quick insertion and Slow Search
quick deletion
Binary Tree Quick search, insertion, Deletion algorithm is
deletion for balanced complex
tree

26
Heap Fast insertion, deletion, Slow access for other
access items

What is Pointer in Data Structure?

Pointers in Data Structure are used to store and manage addresses of the
dynamically allocated blocks of memory. Blocks are used to store data objects or
various arrays of objects. Structured and object oriented languages provide part of
memory known as heap or free store, from which objects are dynamically
allocated.

What are PUSH, POP and PEEK in STACK?

In STACK data structure, PUSH is the process of adding new element while POP
is the process of deleting an element from the top. These two are called primary
stack operations. On other hand, we have PEEK that is used to read values
from top of STACK.

How many Ways used for implementation of STACK?

STACK can be implemented in two ways namely

1. Using arrays
2. Using pointer

When we do it using array, it is known as static implementation while with pointer


it is known as dynamic.

Which are different types of Queue?

Queues can be classified in many different ways. Here we will classify them in
three parts as listed below:

27
1. Circular Queue: insertion of new element in the queue is done at first
position if last location is full.
2. Double ended Queue also known as De-Queue: insertion and deletion
can be done at both ends of structure.
3. Priority queue: a priority number will be assigned to every element of
the queue and as per priority number processing is also done. If two
elements have same priority number then one that is inserted first will
be also processed first.

What is Meaning of Dynamic Data Structure?


Dynamic data structures are those data structures that grow and shrink
whenever you need them as per memory from a place called the heap. They
are extremely important in languages like C because they allow the
programmer to exactly control memory consumption.

Which are Different Types of Linked List?


There are three types of linked lists as written below:
1. Singly Linked List: as clear by name, nodes in this type of linked list
are arranged sequentially by pointer.
2. Doubly Linked List: Nodes are linked through numerous links in
which successor and predecessor of node can be accessed.
3. Circular Linked List: there will be no beginning and no end. Nodes
arranged in structure in such a way that each node can be retraced to
itself.

What are Advantage and Disadvantage of Linked List?


There are some advantages as well as disadvantages associated with linked
list. When we consider advantages then list will be like:
28
Advantage: This is a dynamic structure so memory is utilized efficiently.
Insertion, deletion and all other operations become quite easy.
Disadvantage: because of two fields data and address, more memory would
be required.

What is Binary Tree and its Different Types?

In computer science, a binary tree is a tree like structure in which every node
has at most two children that are referred to as the left child and the right
child.

Which are Different Types of Binary Trees?

1. Binary Search Tree: every node in data structure should have value
and no two nodes should have the same value. Given value from
the left child should be always lesser than root while value of the
right child should be larger.
2. Balanced Binary Tree: this is the type of binary tree in which the
largest path from the left sub tree is of the same length as of the
largest path in the right sub tree.
3. Parse Tree: parse tree or derivation tree is ordered and rooted tree
that represents the syntactic structure of any string according to
context-free grammar.
4. AVL Tree: this type of tree is self balancing binary search tree.
29
5. Spanning Tree: A spanning tree is also known as subset of Graph
G, which has vertices covered with minimum possible number of
edges.

What is a Trivial Graph?


A graph that has only one vertex in it is known as trivial graph. It is also the
smallest possible graph.

Which are methods of graph traversing?


There are two methods for graph traversing as listed below:
1. DFS (Dept First Search): The algorithm starts search from the root
node and explores as far as possible along each branch before
backtracking.
2. BFS (Breadth First Search): Breadth-first search is an algorithm for
searching tree data structure. Search starts at the tree root, and explores
all of the neighboring nodes at the present depth prior to moving on the
nodes at the next depth level.

What is Time Complexity in Data Structure?


This is the time taken for search of data in data structure.

What are Requirements to Access any Substring?


There are numerous details that are required to access any substring:
1. What is name of string
2. Identify first character of sub string

30
3. What is the length of substring that is to be accessed

Which are different Notations in Data Structure?


Way to write arithmetic expression is known as notation. There are three
types of notations that can be written without changing essence of expression:
1. Infix A+B
2. Prefix +AB
3. Postfix AB+

How to Identify Degree at any node of Linked List?


Degree is number that is total number of connected sub trees at that node.
When we consider degree of entire tree, then it will be maximum possible
degree out of all nodes. Node where degree becomes zero is also known as
Leaf node. Check image below to understand more about nodes, degree, level
etc.

31
Which are different ways of Tree Traversal?

Linear data structure can be traversed in only one way while tree can be
traversed in numerous ways.

 Pre Order: RootLeft Right


 In Order: LeftRoot Right
 Post Order: Left RightRoot

These are three different ways of tree data structure traversal.

Some more noteworthy points from Data Structure:


1. AVL Tree: this is a self-balancing tree where height differs by one.
2. Undirected Graph: There will be no direction at edges of graph.
3. Fibanocci is faster way of data searching than Binary search.
4. Three popular sorting methods are quick sort, merge sort and heap sort.

32
DBMS

What is Database?

This is organized collection of data is known as database. Data can be integrated,


shared and accessed as per requirement. In large organizations, it is not easy to
handle high volume of data and this is the reason why database is required.
Database makes data secure as well as convenient. Numerous businesses have
emerged because of availability of databases.

What is DBMS?

DBMS stands for Database management system, it is software program designed


to store and do various actions on data. Some popular names among popular
DBMS are MySQL, Micorsoft Access, Oracle, Sybase, PostgreSQL, FoxPro etc.
ORACLE is the most popular DBMS among all major names.

Complete system of DBMS works on client-server basis. Server system is


supposed to run as a service while on the client side query language is used to
perform various operations on data. Nowadays database is used in various sectors
namely Banking, Airlines, Educational Institutions, Sales, Manufacturing, Gaming,
Media etc.

Different types of Database Management System?

Based on way data is stored and retrieved, DBMS are classified in many groups as
written below:

33
1. Hierarchical database: this model of DBMS is based on tree like structure
or parent-child structure of data. Every child component in database should
have one parent while parents can have more than one child. To retrieve
data, whole tree structure needs to be traversed from root node. The first
ever DBMS of the world was based on hierarchy model.

2. Network Database: After Hierarchical database model, this model had


come just to overcome drawbacks of previous one. Here a child can have
more than one parent node, which is the main difference. Time required to
access data gets reduced considerably in this type of database. This model
works on many-to-many relationship model. Before RDBMS, this was the
most popular option for data storage and processing.

34
3. Relational Model: as clear by name data is organized in two dimensional
tables or rows & columns system. This model was brought by famous
scientist E F Codd in year 1970. In this DBMS model, rows & column create
table and collection of various tables required for relational DBMS system.

4. E-R Model: this DBMS model is based on graphical representation system.


In this DBMS model, relationship is established by dividing objects into
entities and its properties into various attributes.

35
ER model works, there are three basic elements namely in this type of
database entity, attribute and relationship.

Various DBMS Terms & Their Corresponding Meanings:

RELATION TABLE

TUPLE ROW

CARDINALITY OF RELATION NUMBER OF ROWS

ATTRIBUTE COLUMN

DEGREE OF RELATION NUMBER OF COLUMN

36
What are various advantages of DBMS system?

1. Data Redundancy Problem Sorted: many copies of same file in any database
repository is a common problem in DBMS system. In DBMS, redundant
files can be identified immediately with few clicks.
2. Data Integrity: Integration generally means consistent and accurate data
collection. If there will be any consistency issue in any database then it
wouldn’t perform function properly.
3. Concurrent access: this is not possible to access same file by multiple people
in traditional style paper based data. DBMS gives ease of access as same
data can be shared among multiple people.

What is meaning of Integrity Constraints in DBMS Operations?

Data integrity constraint means various set of rules to maintain data integrity of
consistent information system. Constraints ensure that there will be no impact on
data because of various operations performed. It is quite clear that in absence of
constraints, data will get distorted and DBMS wouldn’t work properly.

Which are different types of database structure?

1. Centralized database: Data is saved at any central system or server and users
access it from different locations as required.
2. Distributed Database: it is clear by name, information is stored at various
locations and accessed at different locations through network links.
Example: Google Cloud Storage
3. Operational database: information of various operations of any institution is
stored in this type of database. Analytics, reports, transaction records etc are
part of data here.
4. Relational database: data that sets in various pre-defined categories are
arranged in tables.

37
5. Cloud Storage: data is stored in virtual storage system. Cloud storage can be
classified as private, public and hybrid cloud.
6. Object oriented database system: this type of database is collection of object
oriented programming (example C++) and relational database arrangement.
Information is presented as object and various characteristics of OOPS are
also applicable, some of which are Polymorphism, Inheritance,
Encapsulation etc.

Three Level Architecture in Database Design:

1. External or view level: related with user’s access of database


2. Conceptual or logical level: it explains relationship among data elements of
database.
3. Internal or physical level: here data is stored and various access methods are
defined

Entity: a component of any database that should have individual identity. Suppose
there is a company with numerous employees and we are supposed to create
database, then employee will be entity in database.

Strong entity: when we can find a primary key within attributes

Weak entity: when primary key can’t be created within attributes.

A weak entity can be turned into strong identity by adding various attributes.

RDBMS: A DBMS that is based on various relational tables. Example: Oracle,


Sybase, Informix, MySQL, DB2, Ingres etc.

38
Candidate key: column or set of various columns through which database
records can be uniquely related. Best candidate key in the table is called
primary key. Candidate key is also called minimal super key. Candidate key
is also called key without any redundant attribute.

Foreign key: primary key of any table is considered as foreign key of some
other table. This is also used to make relation from one table to some other
table.

What is Normalization Process of Database?

39
Normalization is the process of arranging data in the database without any
redundancy and undesirable anomalies that emerge because of numerous actions
on database components.

Anomaly is the common word that is often used in definition of Normalization that
means inconsistency or discrepancy.

Check table given below to know why normalization is required:

STUDENT ID STUDENT NAME ADDRESS BRANCH


101 Akash Patna Science
102 Akash Patna Arts
103 Vinod Munger Commerce
104 Shyam Darbhanga Engineering
105 Shyam Darbhanga Medical

Three common types of anomalies are written below:

1. Update anomaly
2. Insert anomaly
3. Delete anomaly

Update Anomaly: Akash is student in two different branches in college. In case


Akash’s address is to be updated then it requires to be done in two records.

Insert Anomaly: consider any new candidate joined college but not yet enrolled in
any branch then college wouldn’t be able to create record if Branch field does not
accept null value.

40
Delete anomaly: suppose college wants to close commerce section then complete
record of Vinod will be eliminated.

What are different types of normalization for database?

Though there are many ways to normalize data, we have listed here common
names:

1. First Normal Form (1NF)


2. Second Normal Form (2NF)
3. Third Normal Form (3NF)
4. BCNF

First Normal Form (1NF): any row of table must not have column with more
than one value or there should not be any attribute in table with multiple
values.

41
Second Normal Form (2NF): A database table will be in accordance of 1NF rules
and there must not be any partial dependency on primary key in table. It does
not have any non-prime attribute that is functionally dependent on proper
subset of the candidate key of the relation. 2NF’s main function is stop data
redundancy in the table.
(Non-Prime Attribute: an attribute of table that is not present in any candidate key
is called a non-prime attribute)

42
In this case, student name is dependent on roll number. Course name is dependent
on course number of college. Result depends on course number too. Roll number
and course number are candidate keys.

43
Third Normal Form (3NF): Table must follow rules of 2NF and there should
be no transitive dependency in the table.

Transitive dependency: if first factor depends on second and second


depends on third then first is also dependent on third, such cases are called
transitive dependency.

Every non prime attribute of database table must be dependent on primary


key. If this is not the case then separate values from this table. Check image
below:

Dependencies:

1. StuID: Stuname, RollNum, ClassCode


2. ClassCode: ClassName

44
It is possible that there can be more than one columns of primary key in
database table called composite primary key.

1NF: Attribute must have atomic values. Example: there is column named
COLOR and two given values are RED and BLUE. Because of two values
this is not in the 1NF. Keyword: Atomic Attribute Value

2NF: table must follow 1NF rules. All attribute of the table must depend on
the primary key. Problem will occur when there will be case of composite

45
primary key. Keyword: Partial Dependency, Problem of Composite
Primary Key

3NF: rules of 2NF must be followed. There should be no transitive


dependency among attributes of table.

Keyword: Transitive Dependency

BCNF: this is the advanced version of 3NF with no overlapping of candidate


keys of table. Keyword: Overlapping of Candidate Keys

4NF: It works in case of multi-Valued dependency. Multi-Valued functions


are being eliminated to meet 4NF. Keyword: Multi-Valued Dependency

5NF: this is also known as project join normal form. Table is divided into
more than one table without loss of any information. Keyword: Project
Join

SQL

Full form of SQL is structured query language, it is the language used for
various operations on numerous databases. It was released in year 1974 and
developed by Donald Chamberlin & Raymond Boyce. This is a cross
platform database language so it works for numerous operating systems.

SQL is language for database and MySQL is a popular DBMS so there is


nothing to confuse when we consider SQL and MySQL.

46
Which are different types of SQL languages statement to manage
database?

SQL statements:

1. DDL (Data Definition Language): it is used to define, change and


drop the structure of database table. Used to remove all rows from any
table.
Keywords:
a. Create: it will create table and define column constraints.
b. Alter: It add, delete, modify columns in any existing database table.
c. Drop: It will drop or delete table permanently from record.
Schema/structure of the table and various components will be also
dropped permanently. Data recovery is not possible in this case.
d. Truncate: this command will delete all rows from the database table.
Using Truncate, content of table will be lost completely while
definition will remain intact.
2. DML (Data Manipulation Language): it is used to enter, modify,
delete and retrieve data from any database table.
Keywords:
a. Select: it works for retrieving data from database table. Select * will
give list of all data in the table.
b. Insert into: this command is used to insert values in database table
INSERT INTO table_name (column1, column2, ...)
VALUES (value1, value2, ...);
47
c. Update: One or more column values can be modified from table.
d. Delete From: this can delete one or more rows from the column.

What is difference between TRUNCATE and DELETE statement in SQL?

TRUNCATE comes under DDL while DELETE comes in the DML section.
Truncate deletes all records of the database while Delete removes selectively
using WHERE clause in beginning. Data removed using TRUNCATE
statement can’t be recovered while data removed using DELETE can be
recovered using ROLLBACK statement of SQL.

3. DCL (Data Control Language): As clear by name, it is used to


provide control over the various types of data in a database.
Keywords:
a. Grant: it is used to give various types of user access.
b. Revoke: it is used to remove privileges that were assigned through
GRANT statement.
c. Commit: this statement converts all the modification made by the
current transaction become permanent.
d. Rollback: this can be considered as inverse of Commit statement.
This statement of SQL brings back the data that is removed using
DELETE statement.

48
C++

Q: What is C++?

A: This is an object oriented programming language which was brought as


extension of C language. This language was designed by Bajrane Stroustrup had
created C++ in year 1983 but first commercial release was done in 1985. Latest
version of this language is C++17 that was launched in year 2017. C++ compilers
are available from numerous companies namely Microsoft, Intel, Oracle, IBM etc.

Q: What are various characteristics of C++ or Object-Oriented programming


language?

A: We have already clarified that C++ got popular because it was based on object
oriented system. C is a procedural programming language while C++ has
procedural as well as object oriented properties. Class, object and many other
properties were first brought in C++ language. Characteristics of C++ or OOPS
programming:

1. Object: In C++, object is called instance of class. Object is an abstract data


type created by programmer. A single object can have multiple properties
and methods. Object=Data + Function.
2. Class: this is a user defined data type that contains data as well as function.
Keyword “Class” is to be used while declaration in the program. Class is
considered as building block of any program. Class can be of three types
namely private, protected and public.
3. Abstraction: it means providing only essential information about data and
hiding various background details. Abstraction is generally implemented in
C++ using classes.
4. Encapsulation: this is a way of data hiding in program. Encapsulation
combines data and functions in single unit called class. This way direct
access of data gets restricted and access can be given only through function.

49
5. Inheritance: Inheritance means transfer of properties from one class to other.
Code reusability is considered one of the important properties in
programming and it started with C++. In Inheritance, new class is formed
from an existing class of program so that properties can be inherited.
Existing class is known as base class while newly created class is known as
derived class.
6. Polymorphism: word polymorphism means many forms. It is ability to use
same function in different possible ways depending on the type of object that
invokes the function.
7. Overloading: this property can be considered as type of polymorphism. In
this, more than one function can have same name but there will be different
parameter list (data types). This way program becomes easy to understand
and flexible too.

What is a Compiler?

This is a computer program that translates high level programming language into a
low level programming language or machine language.

How is structure of any C++ program?

//My first ever program for STET

#include <iostream>

Int main()

Std::cout<<”Hello STET Candidates”;

//  Two forward slashes in C++ mean that statement is a comment. It will have
no impact on rest of program.
50
#include <iostream>: any word in C++ that starts with # is known as
preprocessor. These lines are interpreted before compilation process.

Int main(): this is the function declaration line. Execution of all program start
from the main function.

{}: opening point of braces show beginning of main function.

C++ Syntax

#include <iostream>
using namespace std;

int main() {
cout << "Hello STET Candidates";
return 0;
}

In the above written program, #include <iostream> is the header file library,
COUT comes from same source. Using various header files, we add functionalities
to any C++ program.

We have also used “using namespace std”, it means we can name object and
variable from standard library.

C++ ignores any space left in program and COUT is the object used for the text
output.

Two \n\n in any statement will create a blank line. Same function can be achieved
using endl also.

#include <iostream>
using namespace std;

int main() {
cout << "Hi STET Candidates! \n\n";
51
cout << "There will be few question in STET from C++";
return 0;
}

When this program will run then there will be one line gap between two sentences
in COUT.

C++ COMMENTS

Double slash is used to comment any line. It should be put in the beginning of any
line. Compiler will ignore complete line that starts with //. This double slash is
used to comment any single line. To comment multiple lines use below method.

/* TEXT WILL BE HERE*/.

C++ VARIABLE DECLARATION

int STET = 15;

cout << STET;

INT is variable type and STET is the variable name.

Variable can be also written in program as below:

int STET = 120;


cout << "I am getting" << STET << "marks.";

Above program will show output as: I am getting 120 marks.

C++ USER INPUT EXAMPLE

int x, y;
int sum;

52
cout << "Type any number: ";
cin >> x;
cout << "Type one more number: ";
cin >> y;
sum = x + y;
cout << "Sum is: " << sum;

This program will show some of two numbers X and Y.

C++ DATA TYPES

Data type declaration is required to restrict type of data to be stored. There are
three types of data in C++ as listed below:

1. Primary: these are pre-defined data types.


a. Integer
b. Character
c. Boolean
d. Floating Point
e. Void
2. Derived: these are derived from built-in data type.
a. Function
b. Array
c. Pointer
d. Reference
3. User Defined: user declares this type of data.
a. Class
b. Structure
c. Union
d. Enum

53
MEMORY REQUIRED TO STORE DIFFERENT DATA TYPES:

DATA TYPE SPACE REQUIRED

INTEGER 4 BYTES

CHARACTER 1 BYTES

FLOATING POINT 4 BYTES

DOUBLE FLOATING POINT 8 BYTES

Which are different C++ operators?

Operators are used for various types of operations on variables in C++. Operators
can be classified into different groups as written below:

1. Arithmetic Operators: these are used for various mathematical operations.


Example: + for addition, - for subtraction and so on.
2. Assignment Operators: here value of variable will be modified. += will add
value to variable. -= will subtract value from variable. *= will multiply
variable.
3. Comparison Operators: as clear by name, it is used to compare value of
multiple variables.
a. == means equal to
b. != means not equal to
c. > and < sign works as in mathematics

WHAT ARE STRINGS IN C++?

This is one of the important data type defined in C++ libraries. String means
collection of characters or letters. If you want to use string in C++ program, then
define <string> header file first.

54
Example:

#include <iostream>

#include <string>

using namespace std;

Int main()

string greeting = "You are selected in STET";

cout << greeting;

return 0;

As you run above program, you will get on display “You are selected in STET”

Concatenation of Strings

The + operator is used between strings to add them and make a new string. This is
called concatenation of string.

Program will be written as below:

string firstName = "Anand";

string lastName = "Kishore";

string fullName = firstName + lastName;

cout << fullName;

Understand difference between addition and concatenation:

55
int a = 30;

int b = 20;

int c = a + b; // c will be 30 (an integer)

string a = "10";

string b = "20";

string c = a + b; // z will be 1020 (a string)

Comment statement // shows what is difference between integer addition and


strong concatenation.

To find out length of any string, use the length() function:

string txt = "BELTRONSTET";

cout << "The length of given string is: " << [Link]();

In C++, <cmath> library, there are numerous functions that are used to perform
various mathematical operations. Some popular functions are SQRT, ROUND,
LOG etc.

C++ Conditions

C++ supports numerous logical conditions like <,>, =>, <=, == etc. Four common
conditions that are used in C++ are as below:

1. If

56
2. Else
3. Else If
4. Switch

An example of program using Else If statement is as below:

int time = 24;

if (time < 15) {

cout << "Good morning.";

} else if (time < 22) {

cout << "Good Night.";

} else {

cout << "Good Day.";

// Outputs "Good Day."

Because 24 is more than 15 as well as 22, then output will be Good Day.

C++ Switch

This statement is used to switch between code blocks as per condition.

int mon = 4;

switch (mon) {

case 1:

cout << "Jan";

break;

57
case 2:

cout << "Feb";

break;

case 3:

cout << "March";

break;

case 4:

cout << "April";

break;

// Outputs "April" (mon 4)

C++ While Loops

This statement is used execute block that meets any pre-written condition.

int i = 1;
while (i < 6)

{
cout << i << "\n";
i++;
}

This program will print from 1 to 6 and every time, it will go to new line as \n is
used.

58
BREAK statement in C++ is used to jump out of SWITCH statement as well as
loop.

C++ Arrays

Array is used to store many values in a single variable. Square bracket is used to
declare an array. Example of array declaration:

int Num[4] = {20, 30,40,50};

Example of Array in Programming:

string days[4] = {"mon", "tue", "wed", "thrus"};

for(int i = 0; i < 4; i++) {

cout << i << ": " << days[i] << "\n";

// This program will print names of days in new line start from 0 till 3 as written
below

0 mon

1 tue

2 wed

3 thrus

C++ Pointers

This is a type of variable that stores address of some other variable. It is declared
as type *var-name; or Int *Name;

59
How to use in program pointer in program?

string food = "Pizza"; // Given food variable is a type of string

string* ptr = &food; // A pointer variable of name ptr, that stores the address of
food item

C++ Functions

Functions are blocks of code and execute whenever any required condition is met.
Data is passed through parameters in C++ functions. This is useful because
program needs to write code once and it is called wherever required. Functions are
predefined and it can be user defined too. Function can be defined using
parenthesis as well as colon. VOID means function does not have any value to
return you.

Check program below to understand how function is used in C++ programs:

void myFunction() {

cout << "I Qualified STET Exam";

int main() {

myFunction(); // Function is called here.

return 0;

// Outputs " I Qualified STET Exam "

60
C++ Class

Class works as building block in C++ program and it establishes object oriented
programming. Object of class is considered its instance. When objects are created,
they inherit all variables and functions of that class.

How to use class in a C++ Program?

class MyClass { //Class Declaration

public: // Access Definition

int myNum; // Attribute (int variable)

string myString; // Attribute (string variable)

};

int main() {

MyClass myObj; // Create an object of class we defined earlier

// Access attributes and set values

[Link] = 15;

[Link] = "I Qualified STET";

// Print both attribute values

cout << [Link] << "\n";

cout << [Link];

return 0;

61
}

C++ Constructor

Constructor in C++ is member function that initializes object of class. No return


type possible in constructor. For constructor, same name as of class is used and
followed by parenthesis.

How constructor is used in program?

class Book { // Class Declared

public: // Access is specified

string subject; // Attribute

string version; // Attribute

int year; // Attribute

Book(string x, string y, int z); // Here Constructor is declared

};

Block written up can be used wherever required in main program.

C++ Encapsulation

Encapsulation is an act to hide data from users. To achieve this privacy, class
variable is kept as private (it means variable can’t be accessed from outside). Get
and Set methods are used to read values of private variables.

Use of Encapsulation in program:

62
class Worker {

private:

// Private attribute

int salary;

public:

void setSalary(int s) {

salary = s;

int getSalary() {

return salary;

};

C++ Inheritance

In C++ programming, inheritance is used to inherit attributes and methods from


one class to another. Inheritance is grouped into two categories namely:

1. Derived class (child)


2. Base class (parent)

To inherit from any class : symbol is used.

An example in C++ program:

// Base class

Class Automobile {

63
Public:

string brand = "Ford";

void honk() {

cout << "Tuut, tuut! \n" ;

};

// Part of Derived section

class Car: public Automobile {

public:

string model = "Mustang";

};

64
DBMS/SQL

1 Which one from below expresses the number of entities with which another
entity can be associated?

a) Mapping Cardinality

b) Relation based Cardinality

c) Instant Constraints

d) None

Answer: A

2 Which of the below written option is use to retrieval of data?

a) Stack

b) Data Structure

c) Linked list

d) Query

Answer: D

3 Which one from below is a special type of integrity constraint that relates two
relations?

a) Entity Constraints

65
b) Referential Constraints

c) Linked Constraints

d) Domain Constraints

Answer: B

4 ODBC stands for ______

a) Offline database connection

b) Oriented database connection

c) Open database connection

d) None of above

Answer C

5 Drop command cannot be used to drop a table referenced by which constraint.

a) Prime Key

b) Primary Key

c) Composite Key

d) Foreign Key

Answer: D

6 Which of the below written algebra is widely used in DBMS?

a) Relational algebra
66
b) Arithmetic algebra

c) Both

d) None

Answer: C

7 In DBMS, for any query processing, which one is the lowest-level operator to
access data.

a) Syntax Search

b) Linear search

c) File scan

d) Access paths

Answer: C

8 Which of the below written is unary operation?

a) Selection operation

b) Generalized selection

c) Primitive operation

d) Projection operation

Answer: D

67
9 Database is to DBMS as Boat is for

a) Pond

b) Desert

c) Farmland

d) None

Answer: A

10 In a database where the encryption system is applied the data cannot be


accessed by the unauthorized user without

a) Encryption key

b) Decryption key

c) Primary key

d) Authorised key

Answer: B

11 Which one from the below written encryption key is used to encrypt and
decrypt the data?

a) Public key

b) Private key

c) Symmetric key

d) Asymmetric key

68
Answer: C

12 Which SQL Query is used to delete a table and all its data from the database?

a) Create Table

b) Alter Table

c) Drop Table

d) None of these

Answer: C

13 Which one from below written requires no password travel across the internet?

a) Readable system

b) Manipulation system

c) Challenge–response system

d) Response system

Answer: C

14 In precedence of various set operators the expression is evaluated from which


side

a) Left to Left

b) Left to Right

69
c) Right to Right

d) Right to Left

Answer:

15 Which one from the below written provides the ability to query information
from the database and take various actions on the database?

a) DML (Data Manipulation Langauge)

b) DDL (Data Definition Langauge)

c) Query

d) Relational Schema

Answer: A

16 To remove a relation from SQL database record, we will use the ______
command.

a) Delete

b) Purge

c) Remove

d) Drop table

Answer: D

70
17 Which one from below is used for manipulation of database records?

a) Query

b) DML

c) Relational

d) DDL

Answer: B

18 In DBMS FD means _______

a) Facilitate data

b) Functional data

c) Facilitate dependency

d) Functional dependency

Answer: D

19 In SQL the spaces at the end of the string are removed by which function.

a) Upper

b) String

c) Trim

d) Lower

Answer: C
71
20 Which operator is used for appending two strings?

a) &

b) %

c) ||

d) _

Answer: C

21 How many types of different keys exist in Database Design?

a) Candidate key

b) Primary key

c) Foreign key

d) All of these

Answer: D

22 The intersection operator in table is used to get the _____ tuples.

a) Different

b) Common

c) All

d) Repeating

72
Answer: B

23 Which of the below written NORMAL FORM is based on Multi Valued


Dependency?

a) First

b) Second

c) Third

d) Fourth

Answer: B

24 If we want to save all duplicates, we must write which one from below in place
of union.

a) Union all

b) Union some

c) Intersect all

d) Intersect some

Answer: A

25 The number of attributes in any relation is known as

a) Cardinality

b) Degree

73
c) Tuples

d) Entity

Answer: B

26 Which one from below written clause is an additional filter that is applied to the
result.

a) Select

b) Group-by

c) Having

d) Order by

Answer: C

27 Which one is essentially used to search for patterns in target string.

a) Like Predicate

b) Null Predicate

c) In Predicate

d) Out Predicate

Answer: A

28 A relational database consists of a collection of which one from below:

74
a) Tables

b) Fields

c) Records

d) Keys

Answer: A

29 Which one from below represents a relationship among a set of values.

a) Column

b) Key

c) Row

d) Entry

Answer: C

30 Which term is used to refer to a row?

a) Attribute

b) Tuple

c) Field

d) Instance

Answer: B

75
31 The term attribute refers to which one from below:

a) Record

b) Column

c) Tuple

d) Key

Answer: B

32 For every attribute in a relation, there will be a set of permitted values known as
________ of that attribute.

a) Domain

b) Relation

c) Set

d) Schema

Answer: A

33 In any domain is atomic if elements of the domain are considered to be


____________ units.

a) Different

b) Indivisbile

c) Constant

d) Divisible

76
Answer: B

34 The tuples of the relation can be of which order.

a) Any

b) Same

c) Sorted

d) Constant

Answer: A

35 The subset of any super key is a candidate key under which condition?

a) No proper subset is a super key

b) All subsets are super keys

c) Subset is a super key

d) Each subset is a super key

Answer: A

36 Which of the below written is the structure of the Database?

a) Table

b) Schema

c) Relation

d) None of these
77
Answer: B

37 Which one from the below attribute can be considered as a primary key?

a) Name

b) Street

c) Id

d) Department

Answer: C

38 Which one from the below cannot be taken as a primary key?

a) Id

b) Register number

c) Dept_id

d) Street

Answer: D

39 What is correct about Database Management System?

a) Collection of interrelated data

b) Collection of programs to access data


78
c) Collection of data describing any particular enterprise

d) All of the above

Answer: D

40 Which one from below is the one in which the primary key of one relation is
used as a normal attribute in another relation.

a) Referential relation

b) Referencing relation

c) Referenced relation

d) Referred relation

Answer: C

41 Which of the below written is not a level of data abstraction?

a) Physical Level

b) Critical Level

c) Logical Level

d) View Level

Answer: B

79
42 Using which one from below language can user request information from a
database?

a) Query

b) Relational

c) Structural

d) Compiler

Answer: A

43 Which one is disadvantage of File systems to store data is:

a) Data redundancy and inconsistency

b) Difficulty in accessing data

c) Data isolation

d) All of the above

Answer: D

44 Which one from the below written is a procedural language?

a) Domain relational calculus

b) Tuple relational calculus

c) Relational algebra

d) Query language

80
Answer: C

45 Which operation from below allows the combining of two relations by merging
pairs of tuples, one from each relation, into a single tuple.

a) Select

b) Join

c) Union

d) Intersection

Answer: B

46 Which operation performs a set union of two “similarly structured” tables?

a) Union

b) Join

c) Product

d) Intersect

Answer: A

47 Commonly used operation in any relational algebra for projecting a set of tuple
from a relation is

a) Join

b) Projection

81
c) Select

d) Union

Answer: C

48 which operator takes the results of two queries and returns only rows that is
common on both result sets.

a) Union

b) Intersect

c) Difference

d) Projection

Answer: B

49 Which one from below is a pictorial depiction of the schema of any database
that shows the relations in the database, their attributes, and primary keys and
foreign keys?

a) Schema diagram

b) Relational algebra

c) Database diagram

d) Schema flow

Answer: A

82
51 To remove a relation from an SQL database, we use which command.

a) Delete

b) Purge

c) Remove

d) Drop table

Answer: D

52 Updates that violate which one from below are disallowed.

a) Integrity constraints

b) Transaction control

c) Authorization

d) DDL constraints

Answer: A

53 Which normal form, a composite attribute is converted to individual attributes.

a) First

b) Second

c) Third

d) Fourth

Answer: A
83
54 A database table on the many side of a one to many or many to many
relationship must be:

a) Be in Second Normal Form (2NF)

b) Be in Third Normal Form (3NF)

c) Have a single attribute key

d) Have a composite key

Answer: D

55 For tables in second normal form (2NF), which one is correct:

a) Eliminate all hidden dependencies

b) Eliminate the possibility of a insertion anomalies

c) Have a composite key

d) Have all non key fields depend on the whole primary key

Answer: A

56 Functional Dependencies are the types of which constraints that are based on….

a) Key

b) Key revisited

c) Superset key

d) None of the mentioned

84
Answer: A

57 Which normal form simplifies and ensures that there are minimal data
aggregates and repetitive groups:

a) 1NF

b) 2NF

c) 3NF

d) All are correct

Answer: C

58 Which normal form has a relation that possesses data with an individual entity?

a) 2NF

b) 3NF

c) 4NF

d) 5NF

Answer: C

59 Which normal form is based on the concept of functional dependency?

a) 1NF

b) 2NF

85
c) 3NF

d) 4NF

Answer: C

60 The normal form satisfies multi-valued dependencies and which is in BCNF


also

a) 4 NF

b) 3 NF

c) 2 NF

d) All are correct

Answer: A

61 Which one from below is a tuple-generated dependency?

a) Functional dependency

b) Equality-generating dependencies

c) Multivalued dependencies

d) Non-functional dependency

Answer: C

86
62 Which of the below written normal form is based on the multi-valued
dependencies?

a) First

b) Second

c) Third

d) Fourth

Answer: D

63 Which normal form has a relation that possesses data about individual entity?

a) 2NF

b) 3NF

c) 4NF

d) 5NF

Answer: C

64 Fifth Normal form is related with which one

a) Functional dependency

b) Multivalued dependency

c) Join dependency

d) Domain-key

87
Answer: C

65 For 2NF, which one is correct?

a) No functional dependencies (FDs) exist

b) No multivalued dependencies (MVDs) exist

c) No partial FDs exist

d) No partial MVDs exist

Answer: C

66 Which can help us detect poor E-R design in database table?

a) Database Design Process

b) E-R Design Process

c) Relational scheme

d) Functional dependencies

Answer: D

67 In any Entity-Relationship Diagram Rectangles means which one?

a) Entity sets

b) Attributes

c) Database

d) Tables
88
Answer: A

68 Which one from below has each related entity set has its own schema and there
is an additional schema for the relationship set?

a) A many-to-many relationship set

b) A multivalued attribute of an entity set

c) A one-to-many relationship set

d) All of the mentioned

Answer: A

69 What one from the below represents combination of attributes in a large


database?

a) Relational-and

b) Concatenation

c) Dot representation

d) All of the mentioned

Answer: B

70 _______ of course data gives the values of table attributes, like title and
department, of all courses at any point in time.

a) Instance

b) Snapshot

89
c) Both Instance and Snapshot

d) All of the mentioned

Answer: B

71 Any relational database consists of any collection of

a) Tables

b) Fields

c) Records

d) Keys

Answer: A

72 Which one in a table represents a relationship among set of values.

a) Column

b) Key

c) Row

d) Entry

Answer: C

73 Which one is used to refer to a row?

a) Attribute
90
b) Tuple

c) Field

d) Instance

Answer: B

74 The term attribute refers to which one in table.

a) Record

b) Column

c) Tuple

d) Key

Answer: B

75 Which attribute in any relation, there is a set of permitted values, called______


of that attribute.

a) Domain

b) Relation

c) Set

d) Schema

Answer: A

91
76 Which of the below written is not a Storage Manager Component?

a) Transaction Manager

b) Logical Manager

c) Buffer Manager

d) File Manager

Answer: B

77 A domain is atomic if elements of the domain are considered to be?

a) Different

b) Indivisbile

c) Constant

d) Divisible

Answer: B

78 The tuples of the relations can be of which order.

a) Any

b) Same

c) Sorted

d) Constant

Answer: A
92
79 Which term is often used to refer to a row?

a) Attribute

b) Tuple

c) Field

d) Instance

Answer: B

80 Which can help us detect poor E-R design.

a) Database Design Process

b) E-R Design Process

c) Relational scheme

d) Functional dependencies

Answer: D

81 Consider attributes namely ID, CITY and NAME. Which one of this can be
taken as a super key?

a) NAME

b) ID

c) CITY

d) CITY, ID

93
Answer: B

82 Subset of a super key is a candidate key under which condition?

a) No proper subset is a super key

b) All subsets are super keys

c) Subset is a super key

d) Each subset is a super key

Answer: A

83 Which one is a property of the entire relation, rather than any individual tuple in
which each tuple is unique?

a) Rows

b) Key

c) Attribute

d) Fields

Answer: B

84 Which one from below attribute can be considered as a primary key?

a) Name

b) Street

94
c) Id

d) Department

Answer: C

85 Which one from below cannot be taken as a primary key?

a) Id

b) Register number

c) Dept_id

d) Street

Answer: D

86 Any attribute in relation is a foreign key if the _______ key from one relation is
used as attribute in that relation.

a) Candidate

b) Primary

c) Super

d) Sub

Answer: B

87 The relation which has the attribute as a primary key is known as:

95
a) Referential relation

b) Referencing relation

c) Referenced relation

d) Referred relation

Answer: B

88 Which one from below is the primary key of one relation is used as a normal
attribute in another relation.

a) Referential relation

b) Referencing relation

c) Referenced relation

d) Referred relation

Answer: C

89 What is the main purpose of integrity constraints?

a) To maintain data integrity in data base

b) For various operations on database

c) For proper use of normal forms

d) None

Answer: A

96
90 Which one from below written is a physical storage media?

a) Tape Storage

b) Optical Storage

c) Flash memory

d) All of the mentioned

Answer: D

91 Which is the fastest and most costly form of storage in computer?

a) Cache

b) Disk

c) Main memory

d) Flash memory

Answer: A

92 Which one from below stores several gigabytes of data but usually lost when
power failure?

a) Flash memory

b) Disk

c) Main memory

d) Secondary memory

97
Answer: C

93 The flash memory storage used commonly is

a) NOR Flash

b) OR Flash

c) AND Flash

d) All of the mentioned

Answer: A

94 Which is increasingly being used in server systems to improve performance by


caching frequently used data, since it gives faster access than disk, with larger
storage capacity than main memory?

a) Flash memory

b) Disk

c) Main memory

d) Secondary memory

Answer: A

95 Which one from below is the cheapest memory device in terms of costs?

a) Semiconductor memory

98
b) Magnetic disks

c) Compact disks

d) Magnetic tapes

Answer: C

96 The primary medium for the long-term online storage of data is which one?

a) Semiconductor memory

b) Magnetic disks

c) Compact disks

d) Magnetic tapes

Answer: B

97 Which of the below written is not a Storage Manager Component?

a) Transaction Manager

b) Logical Manager

c) Buffer Manager

d) File Manager

Answer: B

99
98 There are “record-once” type of the compact disk and digital video disk, which
can be written only once; such disks are also known as.

a) Write-once, read-many (WORM)

b) CD-R

c) DVD-W

d) CD-ROM

Answer: A

99 Tape storage is referred to as which one from below

a) Direct-access

b) Random-access

c) Sequential-access

d) All of the mentioned

Answer: C

100 Which one from below written gives a logical structure of the database
graphically?

a) Entity-relationship diagram

b) Entity diagram

c) Database diagram

d) Architectural representation

100
Answer: A

101 The entity relationship set is represented in E-R diagram as which one from
below:

a) Double diamonds

b) Undivided rectangles

c) Dashed lines

d) Diamond

Answer: D

102 A Rectangles divided into two parts represents which one from below:

a) Entity set

b) Relationship set

c) Attributes of a relationship set

d) Primary key

Answer: A

103 We indicate roles in E-R diagrams by labeling the lines that connect which one

a) Diamond & diamond

b) Rectangle & diamond

101
c) Rectangle & rectangle

d) Diamond & rectangle

Answer: D

104 An entity set that does not have sufficient attributes to form a primary key is
known as:

a) Strong entity set

b) Variant set

c) Weak entity set

d) Variable set

Answer: C

105 For weak entity to be meaningful, it should be associated with another entity
set, known as:

a) Identifying set

b) Owner set

c) Neighbour set

d) Strong entity set

Answer: A

102
106 Weak entity set is also known as

a) Underline

b) Double line

c) Double diamond

d) Double rectangle

Answer: C

107 If you are collecting and storing information of music collection, an album
would be considered in __?

a) Relation

b) Entity

c) Instance

d) Attribute

Answer: B

108 What term will be used to refer to a specific record in music database; for
instance; information stored about any specific album?

a) Relation

b) Instance

c) Table

d) Column

103
Answer: B

109 Which one from the below has each related entity set has its own schema and
there is an additional schema for the relationship set.

a) A many-to-many relationship set

b) A multivalued attribute of an entity set

c) A one-to-many relationship set

d) All of the mentioned

Answer: A

110 Which is the best way to represent attributes in large database?

a) Relational-and

b) Concatenation

c) Dot representation

d) All of the mentioned

Answer: B

111 Designers use which one from below to tune the performance of systems to
support time-critical operations?

a) Denormalization

104
b) Redundant optimization

c) Optimization

d) Realization

Answer: A

112 The normal form which complies with multivalued dependencies and which is
in BCNF is

a) 4 NF

b) 3 NF

c) 2 NF

d) All of the mentioned

Answer: A

113 Which one from below is a tuple-generating dependencies?

a) Functional dependency

b) Equality-generating dependencies

c) Multivalued dependencies

d) Non-functional dependency

Answer: C

105
114 Which one from below normal form is based on multivalued dependencies?

a) First

b) Second

c) Third

d) Fourth

Answer: D

115 Which of the below written normal form has a relation that possesses data
about any individual entity?

a) 2NF

b) 3NF

c) 4NF

d) 5NF

Answer: C

116 Which one of the below written has each related entity set has its own schema
and there is an additional schema for the relationship set?

a) A many-to-many relationship set

b) A multivalued attribute of an entity set

c) A one-to-many relationship set

d) None of the mentioned

106
Answer: A

117 Fifth Normal form is concerned with which one:

a) Functional dependency

b) Multivalued dependency

c) Join dependency

d) Domain-key

Answer: C

118 What is right about 2NF?

a) No functional dependencies (FDs) exist

b) No multivalued dependencies (MVDs) exist

c) No partial FDs exist

d) No partial MVDs exist

Answer: C

119 Which one from below level of RAID refers to disk mirroring with block
striping?

a) RAID level 1

b) RAID level 2

107
c) RAID level 0

d) RAID level 3

Answer: A

120 Optical disk technology uses which one from below:

a) Helical scanning

b) DAT

c) A laser beam

d) RAID

Answer: D

121 With multiple disks, we can improve the transfer rate by which one?

a) Striping

b) Dividing

c) Mirroring

d) Dividing

Answer: A

122 DML enables users to do which one from below:

a) Retrieval of information stored in database


108
b) Insertion of new info in the database

c) Deletion of info from any database

d) All of the above

Answer: D

123 The recovery scheme of database must also provide

a) High availability

b) Low availability

c) High reliability

d) High durability

Answer: A

124 Which one from below is a failure to a system?

a) Boot crash

b) Read failure

c) Transaction failure

d) All of the mentioned

Answer: C

125 Which one from below belongs to transaction failure?


109
a) Read error

b) Boot error

c) Logical error

d) All of the mentioned

Answer: C

126 Which of the below written is not an Schema?

a) Database Schema

b) Physical Schema

c) Critical Schema

d) Logical Schema

Answer: C

127 Which of the below written is Database Language?

a) Data Definition Language

b) Data Manipulation Language

c) Query Language

d) All of the above

Answer: D

110
128 The database is partitioned into fixed-length storage units that is called

a) Parts

b) Blocks

c) Reads

d) Build

Answer: B

129 Which one from below written causes system to crash

a) Bug in software

b) Loss of volatile data

c) Hardware malfunction

d) All of the mentioned

Answer: D

130 Which one from below written is true for Seeheim model?

a) Presentation is abstracted from dialogue and Application

b) Presentation and Dialogue is abstracted from Application

c) Presentation and Application is abstracted from Dialogue

d) None of the mentioned

Answer: A
111
131 Which one of the below unit operation is used in Model view controller?

a) Is a Decomposition

b) Part Whole Decomposition

c) All of the mentioned

d) None of the mentioned

Answer: B

132 Which of the below written in not a function of DBA?

a) Network Maintenance

b) Routine Maintenance

c) Schema Definition

d) Authorization for data access

133 Which layer provides a high-level view of data and actions on data?

a) Business logic

b) Presentation

c) User interaction

d) Data access

112
Answer: A

134 Which system is widely used for mapping from Java objects to relation?

a) Hibernate

b) Object oriented

c) Objective

d) None of the mentioned

Answer: A

135 What is the portability concerns founded in Seeheim model?

a) Replacing the presentation toolkit

b) Replacing the application toolkit

c) Replacing the dialogue toolkit

d) Replacing the presentation & application toolkit

Answer: D

136 Bitmap indices is specialized type of index designed for easy querying on
which one?

a) Bit values

b) Binary digits

c) Multiple keys

113
d) Single keys

Answer: C

137 Which one on the attribute A of relation r consists of one bitmap for each
value that A can take.

a) Bitmap index

b) Bitmap

c) Index

d) Array

Answer: A

138 To check the deleted records we use which one?

a) Existence bitmap

b) Current bitmap

c) Final bitmap

d) Deleted bitmap

Answer: A

139 Which is full form of DBA?

a) Database administrator

114
b) Database ample

c) Database analytics

d) None

Answer: A

140 A tablespace is further broken down into which one?

a) Tablespace

b) Segments

c) Extents

d) Blocks

Answer: B

141 Indices whose search key specifies an order different from the sequential order
of the file is known as ___________ indice.

a) Nonclustered

b) Secondary

c) All of the mentioned

d) None of the mentioned

Answer: C

115
142 Which of the below written is a Data Model?

a) E-R model

b) Relational data model

c) Object-Based data model

d) All of the above

Answer: D

143 What term is known for a specific record in music database; for instance;
information stored about any specific album?

a) Relation

b) Instance

c) Table

d) Column

Answer: B

144 In DBMS, term Row is referred as

a) Relation

b) Attribute

c) Tuple

d) Domain

116
145 Which is a reasonable way to represent the attributes in a large database?

a) Relational-and

b) Concatenation

c) Dot representation

d) All of the mentioned

Answer: B

146 Which of the below written represents a relationship among set of values?

a) A Row

b) A Table

c) A Field

d) A Column

147 The normal form that satisfies multivalued dependencies and which is also in
the BCNF is

a) 4 NF

b) 3 NF

c) 2 NF

d) None

Answer: A

117
148 Which one from below is a tuple-generating dependency?

a) Functional dependency

b) Equality-generating dependencies

c) Multivalued dependencies

d) Non-functional dependency

Answer: C

149 Which one of the below written normal form is based on multivalued
dependencies?

a) First

b) Second

c) Third

d) Fourth

Answer: D

150 Which one from below written is a valid SQL command?

(a)Commit

(b)Summit

(c)Culprit

(d)Bollit

118
Answer: A

151 Which one from below written comes under DCL command list?

[Link]

[Link]

[Link] Into

[Link]

Answer: B

152 Which command from below can be used to remove data from database?

a Drop

b Delete

c Truncate

d All above are correct

Answer: D

153 In DBMS, various related fields are grouped to form a

[Link] file

[Link] record

[Link]
119
[Link]

Answer: B

[Link] RDBMS, what is meaning of relation?

[Link]

[Link]

[Link]

[Link]

Answer: A

[Link] any database architecture, mid level will be

[Link] level

[Link] level

[Link] level

[Link] level

Answer: B

[Link] is data dictionary?

[Link] contains metadata of database

[Link] contains various record of various objects in database


120
[Link] users can’t see data dictionary only few can access

[Link] above are correct

Answer: D

[Link] software set communicates between user’s side application and


database?

[Link]

[Link]

[Link]

[Link]

Answer: B

158. If a relation schema is in BCNF then it may or may not be in which one?

a.1NF

b.2NF

c.3NF

d.4NF

Answer: D

159. In DBMS system, what is full form of DML?

121
[Link] manipulation language

[Link] maintain language

[Link] multiplex language

[Link] mentor language

Answer: A

160. In any E-R diagram, relationship type representation is done by:

[Link]

[Link]

[Link]

[Link]

Answer: C

161. In DBMS, Table is referred as which one

a) Relation

b) Attribute

c) Tuple

d) Domain

Answer: A

122
[Link] is function of statement “Inner Join” in SQL?

[Link] will return all values from left table and matching values from right table

[Link] will return all values from right table and matching values from left table.

[Link] will return all matching values from both table

[Link]

Answer: C

[Link] key is generally known as:

[Link] key

[Link] key

[Link] super key

[Link] of these

Answer: C

[Link] is used for data retrieval from the database record?

[Link]

[Link]

[Link] Structure

[Link]

Answer: A
123
[Link] is the meaning of ACID in database operation?

[Link], Consistency, Isolation, Durability

[Link], Consistency, Isolation, Durability

[Link], Consistency, Isolation, Durable

[Link], Concurrent, Isolation, Durable

Answer: A

[Link] any one-to-many relationship in the table on the side of 'many' will be
called?

[Link]

[Link]

[Link]

[Link]

Answer: A

[Link] name from below must be unique in any database?

[Link]

[Link]

[Link]

[Link]

124
Answer: A

[Link] any database, multiple tables are often linked to maintain what?

[Link] entry

[Link] integrity

[Link] of various keys

[Link] reduce data redundancy

Answer: B

169. Which of the below written is the Relation-algebra Operation?

a) Select

b) Union

c) Rename

d) All of the above

Answer: D

[Link] one from below written is not a database object?

a. Tables

b. Queries

c. Relationship
125
d. Reports

Answer: C

171. What is right about Relation?

a) Subset of a Cartesian product of any list of attributes

b) Subset of a Cartesian product of any list of domains

c) Subset of a Cartesian product of any list of tuple

d) Subset of a Cartesian product of any list of relations

172. Data dictionary is a type of which one?

[Link]

[Link] language

[Link]

[Link]

Answer: A

173. Transitive dependency can be removed in which normal form?

a. 2NF

b. 3NF

c. 4NF

d. 5NF
126
Answer: B

174. Which Normal form is also called Project Join normal form?

a. 2NF

b. 3NF

c. 4NF

d. 5NF

Answer: D

[Link] comes under which one from below:

a. DDL

b. DML

c. DCL

d. PPL

Answer: A

176. DBMS row is also known as

a. Relation

b. Tuple

c. Attribute
127
d. Degree

Answer: B

177. What is full form of DDL in Database?

a. Data definition language

b. Data demand language

c. Data dependent language

d. None

Answer: A

178. Column header referred as which one?

a) Table

b) Relation

c) Attributes

d) Domain

179. Which one from below is one of the popular DBMS?

a. Kybase

b. Mybase

c. Sybase
128
d. Thybase

Answer: C

180. Which of the below written is not Modification of the Database?

a) Deletion

b) Insertion

c) Sorting

d) Updating

Answer: C

[Link] is functionality of EXISTS in SQL?

[Link] check presence of any record

[Link] remove any record that is present

[Link] make a copy of existing record

[Link]

Answer: A

182. Minimal Superkey is also called

a) Schema keys

b) Candidate keys
129
c) Domain keys

d) Attribute keys

183 Which of the below written is not Outer join?

a) Left outer join

b) Right outer join

c) Full outer join

d) All of the above

Answer: D

130
NETWORKING

1 The IETF standard documents are known as

a) RFC

b) CSS

c) IDS

d) DMC

Answer: A

2 In which type of connection, more than two devices can share a single link.

a) Point-to-point

b) Primary

c) Multi-point

d) Secondary

Answer: C

3 The structure or format of data is known as

a) Syntax

b) Semantics

c) Struct

131
d) Formatting

Answer: A

4 Which of the below written is not a constituent of residential telephone line?

a) A high-speed downstream channel

b) A medium-speed downstream channel

c) A low-speed downstream channel

d) An ultra-high speed downstream channel

Answer: C

5 The first ever network is known as

a) CNNET

b) NSFNET

c) ASAPNET

d) ARPANET

Answer: D

6 Communication between a computer and a keyboard involves which type of

Transmission?

a) Full-duplex
132
b) Half-duplex

c) Simplex

d) None of these

Answer: C

7 Which one of the below written is not a network edge device?

a) PC

b) Smartphones

c) Servers

d) Switch

Answer: D

8 In any network with 30 computers, which topology would require the most

Extensive cable system?

a) Star

b) Mesh

c) Bus

d) None of these

Answer: B

133
9 Three or more devices share a link in which connection?

a) Unipoint

b) Multipoint

c) Point to point

d) Simplex

Answer: B

10 Which type of topology needs a central controller or hub?

a) Star

b) Mesh

c) Bus

d) Ring

Answer: A

11 Which is the physical path over which any message travels?

a) Protocol

b) Medium

c) Signal

d) All of the above

134
12 Which of the following written computer networks is built on the top of another
network?

a) prior network

b) chief network

c) prime network

d) overlay network

Answer: D

13 In computer network nodes are known as:

a) the computer that begin data transaction

b) the computer that routes the data

c) the computer that terminates the data

d) all of the mentioned

Answer: D

14 Which of the below written organization has authority over interstate &
international commerce in the communications field?

a) ITU-T

b) IEEE

c) ISO

d) FCC

135
Answer: D

15 Bluetooth is an example of which type of network?

a) personal area network

b) local area network

c) virtual private network

d) wide area network

Answer: A

16 The information to be communicated in any data communications system is


which one:
a) Medium

b) Protocol

c) Transmission

d) Message

Answer: D

17 A list of protocols used by a system, one protocol per layer, is known as

a) protocol architecture

b) protocol stack

136
c) protocol suite

d) protocol system

Answer: B

18 Network congestion occurs when

a) in case of traffic overloading

b) when a system terminates

c) when connection between two nodes ends

d) in case of transfer failure

Answer: A

19 For which transmission, the channel capacity is shared by both communicating


device every time:

a) Full-duplex

b) Simplex

c) Half-duplex

d) Half-Simplex

Answer: A

137
20 Communication between a computer and a keyboard involves which type of
transmission?

a) Automatic

b) Half-duplex

c) Full-duplex

d) Simplex

Answer: D

21 DSL telcos provide which of the below written services?

a) Wired phone access

b) ISP

c) Wired phone access and ISP

d) Network routing and ISP

Answer: C

22 What is function of DSLAM?

a) Convert analog signals into digital signals

b) Convert digital signals into analog signals

c) Amplify digital signals

d) De-amplify digital signals

138
Answer: A

23 An unauthorized user in any network is which type of issue?

a) Performance

b) Reliability

c) Security

d) All of the above

24 HFC contains which one from below written?

a) Fibre cable

b) Coaxial cable

c) A combination of Fibre cable and Coaxial cable

d) Twisted Pair Cable

Answer: C

25 Which of the below written statements is not applicable for cable internet
access?

a) It is a shared broadcast medium

b) It includes HFCs

c) Cable modem connects home PC to Ethernet port

139
d) Analog signal is converted to digital signal in DSLAM

Answer: D

26 Which of the below written topology requires a multipoint connection?

a) Mesh

b) Star

c) Ring

d) Bus

27 StarBand provides which access?

a) FTTH internet access

b) Cable access

c) Telephone access

d) Satellite access

Answer: D

28 Home Access is provided by which one?

a) DSL

b) FTTP
140
c) Cable

d) All of the mentioned

Answer: D

29 ONT is connected to splitter using which one?

a) High speed fibre cable

b) HFC

c) Optical cable

d) Twisted pair cable

Answer: C

30 Which of the below written factors affect transmission rate in DSL?

a) The gauge of the twisted-pair line

b) Degree of electrical interference

c) Shadow fading

d) The gauge of the twisted-pair line and degree of electrical interference

Answer: D

31What is number of layers that are present in the Internet protocol stack (TCP/IP
model)?

141
a) 5

b) 7

c) 6

d) 10

Answer: A

32 The number of layers in the OSI reference model is

a) 5

b) 7

c) 6

d) 10

Answer: B

33 Which of the below written layer is an addition to OSI model when compared
with TCP IP model?

a) Application layer

b) Presentation layer

c) Session layer

d) Session and Presentation layer

Answer: D

142
34 Application layer is implemented in which one from below?

a) End system

b) NIC

c) Ethernet

d) Packet transport

Answer: A

35 Transport layer is implemented in which one?

a) End system

b) NIC

c) Ethernet

d) Signal transmission

Answer: A

36 The functionalities of the presentation layer include which one?

a) Data compression

b) Data encryption

c) Data description

d) All of the mentioned

143
Answer: D

37 Delimiting and synchronization of data exchange is provided by which one?

a) Application layer

b) Session layer

c) Transport layer

d) Link layer

Answer: B

38 Which of the below written networks extends a private network across public
network?

a) local area network

b) virtual private network

c) enterprise private network

d) storage area network

Answer: B

39 Communication channel is shared by all the machines on the network in which


type?

a) broadcast network

b) unicast network

144
c) multicast network

d) anycast network

Answer: A

40 In the OSI model, as a data packet moves from the lower to the upper layers,
what happens to adder?

a) Added

b) Removed

c) Rearranged

d) Randomized

Answer: B

41 When collection of various computers seems a single coherent system to its


client, then it is known as?

a) computer network

b) distributed system

c) networking system

d) mail system

Answer: B

145
42 Transmission data rate is decided by which layer?

a) network layer

b) physical layer

c) data link layer

d) transport layer

Answer: B

43 Which of the below written layer provides the services to user?

a) application layer

b) session layer

c) presentation layer

d) physical layer

Answer: A

44 Which of the below written address is used to identify a process on a host by the
transport layer?

a) physical address

b) logical address

c) port address

d) specific address

146
Answer: C

45 Which of the below written layer is responsible for process to process delivery
in general network model?

a) network layer

b) transport layer

c) session layer

d) data link layer

Answer: B

46 TCP/IP model was created _____ the OSI model.

a) prior to

b) after

c) simultaneous to

d) with no link to

Answer: A

47 Which one from below is the physical path over which a messages travel?

a) Path

b) Medium

c) Protocol

147
d) Route

Answer: B

48 Which of the below written layer is used to link the network support layers and
user support layers?

a) session layer

b) data link layer

c) transport layer

d) network layer

Answer: C

49 TCP/IP model does not have that layer but OSI model have that layer.

a) session layer

b) transport layer

c) application layer

d) network layer

Answer: A

50 Total number of layers in OSI reference model is __________

a) 4

148
b) 5

c) 6

d) 7

Answer: D

52 The physical layer is concerned with which one from below:

a) bit-by-bit delivery

p) process to process delivery

c) application to application delivery

d) port to port delivery

Answer: A

53 Which transmission media provides the highest transfer speed in any network?

a) coaxial cable

b) twisted pair cable

c) optical fiber

d) electrical cable

Answer: C

149
54 Bits can be sent over guided and unguided media as analog signal using which
one?

a) digital modulation

b) amplitude modulation

c) frequency modulation

d) phase modulation

Answer: A

55 Communication between a computer and a keyboard involves which type of


transmission?

a) Automatic

b) Half-duplex

c) Full-duplex

d) Simplex

Answer: D

56 The physical layer provides which one from below:

a) mechanical specifications of electrical connectors and cables

b) electrical specification of transmission line signal level

c) specification for IR over optical fiber

d) all of the mentioned

150
Answer: D

57 In any asynchronous serial communication system the physical layer provides


which one from below:

a) start and stop signalling

b) flow control

c) both start & stop signalling and flow control

d) only start signalling

Answer: C

58 The physical layer is responsible for which one?

a) line coding

b) channel coding

c) modulation

d) all of the mentioned

Answer: D

59 The physical layer translates logical communication requests from which layer
into hardware specific operations.

a) data link layer

151
b) network layer

c) trasnport layer

d) application layer

Answer: A

60 A single channel is shared by multiple signals by which modulation?

a) analog modulation

b) digital modulation

c) multiplexing

d) phase modulation

Answer: C

61 Wireless transmission of signals can be done via which one from below?

a) radio waves

b) microwaves

c) infrared

d) all of the mentioned

Answer: D

62 What is full form of OSI?


152
a) open system interconnection

b) operating system interface

c) optical service implementation

d) open service Internet

Answer: A

63 Which of the following written tasks is not done by data link layer?

a) framing

b) error control

c) flow control

d) channel coding

Answer: D

64 A television broadcast is an example of which transmission?

a) Half-duplex

b) Full-duplex

c) Simplex

d) Automatic

153
65 Header of a frame generally contains which one from below:

a) synchronization bytes

b) addresses

c) frame identifier

d) all of the mentioned

Answer: D

66 Automatic repeat request error management mechanism is provided by which


one from below:

a) logical link control sublayer

b) media access control sublayer

c) network interface control sublayer

d) application access control sublayer

Answer: A

67 When two or more bits in a data unit has been changed during the transmission,
the error is known as

a) random error

b) burst error

c) inverted error

d) double error

154
Answer: B

68 What is full form of CRC?

a) cyclic redundancy check

b) code repeat check

c) code redundancy check

d) cyclic repeat check

Answer: A

69 Which of the below written is a data link protocol?

a) ethernet

b) point to point protocol

c) hdlc

d) all of the mentioned

Answer: D

70 Which type of connection provides a dedicated link between two devices?

a) Multi-point

b) Point-to-Point

c) Primary
155
d) Secondary

Answer: B

71 Cable break in which topology stops all possible transmission.

a. Mesh

b. Star

c. Primary

d. Bus

Answer: D

72 The network layer is concerned with which one from below:

a) bits

b) frames

c) packets

d) bytes

Answer: C

73 Which one of the below written is not a function of network layer?

a) routing

b) inter-networking
156
c) congestion control

d) error control

Answer: D

74 A 4 byte IP address consists of which one from below:

a) only network address

b) only host address

c) network address & host address

d) network address & MAC address

Answer: C

75 In virtual circuit network each packet contains which one?

a) full source and destination address

b) a short VC number

c) only source address

d) only destination address

Answer: B

76 Which of the below written routing algorithms can be used for network layer
design?

157
a) shortest path algorithm

b) distance vector routing

c) link state routing

d) all of the mentioned

Answer: D

77 Which one of the below written is not correct in relation to multi-destination


routing?

a) is same as broadcast routing

b) contains the list of all destinations

c) data is not sent by packets

d) there are multiple receivers

Answer: C

78 A subset of a network that includes all the routers but contains no loops is
known as?

a) spanning tree

b) spider structure

c) spider tree

d) special tree

158
Answer: A

79 Which one from below written algorithm is not used for congestion control?

a) traffic aware routing

b) admission control

c) load shedding

d) routing information protocol

Answer: D

80 The network layer protocol for internet is known as:

a) ethernet

b) internet protocol

c) hypertext transfer protocol

d) file transfer protocol

Answer: B

81 ICMP is primarily used for which purpose?

a) error and diagnostic functions

b) addressing

c) forwarding

d) routing
159
Answer: A

82 Transport layer aggregates data from different applications into a single stream
before passing it to which one?

a) network layer

b) data link layer

c) application layer

d) physical layer

Answer: A

83 Which of the below written transport layer protocols used in networking?

a) TCP and FTP

b) UDP and HTTP

c) TCP and UDP

d) HTTP and FTP

Answer: C

84 Which layer changes bits into electromagnetic signals?

a) Physical

b) Transport

160
c) None of the above

d) Data link

Answer: A

85 What is right about transmission control protocol?

a) is a connection-oriented protocol

b) uses a three way handshake to establish a connection

c) receives data from application as a single stream

d) all of the mentioned

Answer: D

86 An endpoint of an inter-process communication system across a computer


network is known as

a) socket

b) pipe

c) port

d) machine

Answer: A

161
87 The physical layer is concerned with which transmission over the physical
medium.

a. Programs

b. Protocols

c. Bits

d. Dialog

Answer: C

88 Which one from the below written is a version of UDP with congestion control?

a) Datagram congestion control protocol

b) Stream control transmission protocol

c) Structured stream transport

d) User congestion control protocol

Answer: A

89 Which one is a TCP name for a transport service access point.

a) port

b) pipe

c) node

d) protocol

162
Answer: A

90 Transport layer protocols deals with which one from below:

a) application to application communication

b) process to process communication

c) node to node communication

d) man to man communication

Answer: B

91 Which of the below written is a transport layer protocol?

a) stream control transmission protocol

b) internet control message protocol

c) neighbor discovery protocol

d) dynamic host configuration protocol

Answer: A

92 Which of the below written protocol delay is faced by the packet in travelling
from one end system to another?

a) Propagation delay

b) Queuing delay

c) Transmission delay

163
d) All of the mentioned

Answer: D

93 Mail services are available to network users through which layer?

a) Data link

b) Physical

c) Application

d) Transport

Answer: C

94 The time needed to check the packet’s header and determine where to direct the
packet is part of which one?

a) Processing delay

b) Queuing delay

c) Transmission delay

d) Propagation delay

Answer: A

95 When data packet moves from lower to upper layers, what happens to header?

a) Added

164
b) Rearranged

c) Modified

d) Subtracted

96 Which layer lies between the network layer and the application layer.

a) Data link

b) Physical

c) Transport

d) None of the above

Answer: C

98 Layer 2 lies between the physical layer and which layer.

a) Data link

b) Network

c) Transport

d) None of the above

165
99 In any network, If P is the only packet that is being transmitted and there was
no earlier transmission, which of the below written delays could be zero?

a) Propagation delay

b) Queuing delay

c) Transmission delay

d) Processing delay

Answer: B

100 Transmission delay does not depend on which one from below:

a) Packet length

b) Distance between the routers

c) Transmission rate

d) Bandwidth of medium

Answer: B

101 Propagation delay depends on which one from below:

a) Packet length

b) Transmission rate

c) Distance between the routers

d) Speed of the CPU

166
Answer: C

102 The sharing of any medium and its link by two or more devices is known as:

a) Fully duplexing

b) Multiplexing

c) Micropleixng

d) Duplexing

Answer: B

103 Multiplexing is used in which one

a) Packet switching

b) Circuit switching

c) Data switching

d) Packet & Circuit switching

Answer: B

104 Which one from below multiplexing technique used to transmission of digital
signals?

a) FDM

b) TDM

c) WDM

167
d) FDM & WDM

Answer: B

105 If there are n signal sources of same data rate, then the TDM link will be
having _______ slots.

a) n

b) n/2

c) n*2

d) 2n

Answer: A

106 What of the below written main function of the transport layer?

a) Process-to-process delivery

b) Node-to-node delivery

c) Synchronization

d) Updating and maintenance of routing tables

Answer: A

107 The state when dedicated signals are idle are known as:

a) Death period

168
b) Poison period

c) Silent period

d) Stop period

Answer: C

108 Multiplexing provides which one from below:

a) Efficiency

b) Privacy

c) Anti jamming

d) Both Efficiency & Privacy

Answer: D

109 Which of the below written is an application layer service?

a) Remote log-in

b) File transfer and access

c) Mail service

d) All the above

Answer: D

169
110 In TDM, slots are further divided into which one?

a) Seconds

b) Frames

c) Packets

d) Bits

Answer: B

111 The attacker using a network of compromised devices is called as

a) Internet

b) Botnet

c) Telnet

d) D-net

Answer: B

112 Which one of the below written is a form of DoS attack?

a) Vulnerability attack

b) Bandwidth flooding

c) Connection flooding

d) All of the mentioned

Answer: D
170
113 The Internet model consists of how many layers?

a) Three

b) Five

c) Seven

d) Eight

Answer: B

114 The DoS attack, in which attacker sends deluge of packets to the targeted host
is known as

a) Vulnerability attack

b) Bandwidth flooding

c) Connection flooding

d) UDP flooding

Answer: B

115 Packet sniffers involve which one

a) Active receiver

b) Passive receiver

c) Legal receiver

d) Partially-active receiver

171
Answer: B

116 Sniffers can be prevented by using which one?

a) Wired environment

b) WiFi

c) Ethernet LAN

d) Switched network

Answer: D

117 Firewalls are often configured to block which one?

a) UDP traffic

b) TCP traffic

c) Sensitive traffic

d) Best-effort traffic

Answer: A

118 Which layer is the layer closest to the main transmission medium.

a. Network

b. Physical

c. Data link
172
d. Transport

Answer: B

119 Physical or logical arrangement of network is known as:

a) Topology

b) Routing

c) Networking

d) Control

Answer: A

120 Which network topology needs a central controller or hub?

a) Star

b) Mesh

c) Ring

d) Bus

Answer: A

121 Which topology requires a multipoint connection?

a) Star

b) Mesh
173
c) Ring

d) Bus

Answer: D

122 Data communication system spanning states, countries, or the whole world is
one of the below written?

a) LAN

b) WAN

c) MAN

d) PAN

Answer: B

123 Data communication system within a building or campus is one of the below
written:

a) LAN

b) WAN

c) MAN

d) PAN

Answer: A

174
124 What is full form of WAN?

a) World area network

b) Wide area network

c) Web area network

d) Web access network

Answer: B

125 In TDM, slots are further divided into which one?

a) Seconds

b) Frames

c) Packets

d) Bits

Answer: B

126 Which one of the below written multiplexing technique that shifts each signal
to a different carrier frequency?

a) FDM

b) TDM

c) Both FDM & TDM

d) PDM

175
Answer: A

127 A local telephone network is an example of which type of network.

a) Packet switched

b) Circuit switched

c) Bit switched

d) Line switched

Answer: B

128 Most packet switches use which principle?

a) Stop and wait

b) Store and forward

c) Store and wait

d) Stop and forward

Answer: B

129 In TDM, slots are further divided in which one?

a) Seconds

b) Frames

c) Packets

d) Bits
176
Answer: B

130 Which are various methods to move data through a network of numerous links
and switches?

a) Packet switching and Line switching

b) Circuit switching and Line switching

c) Line switching and bit switching

d) Packet switching and Circuit switching

Answer: D

131 The attacker using a network of compromised devices is called as

a) Internet

b) Botnet

c) Telnet

d) D-net

Answer: B

132 As the resources are reserved between two communicating systems in circuit
switching, which one is achieved?

a) authentication

177
b) guaranteed constant rate

c) reliability

d) store and forward

Answer: B

133 In which system, resources are allocated on demand.

a) packet switching

b) circuit switching

c) line switching

d) frequency switching

Answer: A

134 Which of the below written is not an application layer service?

a) Network virtual terminal

b) File transfer, access, and management

c) Mail service

d) Error control

Answer: D

178
135 A piece of icon or image on a web page associated with another webpage is
known as:

a) url

b) hyperlink

c) plugin

d) extension

Answer: B

136 What is right about Dynamic web pages?

a) is same every time whenever it displays

b) generates on demand by a program or a request from browser

c) both is same every time whenever it displays and generates on demand by a


program or a request from browser

d) is different always in a predefined order

Answer: B

137 What is function of web browser?

a) a program that can display a web page

b) a program used to view html documents

c) it enables user to access the resources of internet

d) all of the mentioned

179
Answer: D

138 Common gateway interface is used for which purpose?

a) generate executable files from web content by web server

b) generate web pages

c) stream videos

d) download media files

Answer: A

139 URL stands for which of the below written

a) unique reference label

b) uniform reference label

c) uniform resource locator

d) unique resource locator

Answer: C

140 A web cookie is a small piece of data that is known as

a) sent from a website and stored in user’s web browser while a user is browsing a
website

b) sent from user and stored in the server while a user is browsing a website

180
c) sent from root server to all servers

d) sent from the root server to other root servers

Answer: A

141 Which of the below written is not used to generate dynamic web pages?

a) PHP

b) [Link]

c) JSP

d) CSS

Answer: D

142 An alternative to JavaScript on windows platform is which of the below


written:

a) VBScript

b) [Link]

c) JSP

d) PHP

Answer: A

143 What is meaning of document object model (DOM)?

181
a) convention for representing and interacting with objects in html documents

b) application programming interface

c) hierarchy of objects in [Link]

d) scripting language

Answer: A

144 AJAX stands for which one of the below written:

a) asynchronous javascript and xml

b) advanced JSP and xml

c) asynchronous JSP and xml

d) advanced javascript and xml

Answer: A

145 The size of an IP address in IPv6 is how much?

a) 4 bytes

b) 128 bits

c) 8 bytes

d) 100 bits

Answer: B

182
146 The header length of an IPv6 datagram is how much?

a) 10bytes

b) 25bytes

c) 30bytes

d) 40bytes

Answer: D

147 Which one of the below written is a form of DoS attack?

a) Vulnerability attack

b) Bandwidth flooding

c) Connection flooding

d) All of the mentioned

Answer: D

148 IPv6 does not use which type of address.

a) broadcast

b) multicast

c) anycast

d) unicast

Answer: A
183
149 Which among of the below written features is present in IPv6 but not in IPv4?

a) Fragmentation

b) Header checksum

c) Options

d) Anycast address

Answer: D

150 Which of the below written field determines the lifetime of IPv6 datagram

a) Hop limit

b) TTL

c) Next header

d) Type of traffic

Answer: A

151 Dual-stack approach refers to which one?

a) implementing Ipv4 with 2 stacks

b) implementing Ipv6 with 2 stacks

c) node has both IPv4 and IPv6 support

d) implementing a MAC address with 2 stacks

184
Answer: C

154 What is the access point in a wireless LAN network?

a) device that allows wireless devices to connect to a wired network

b) wireless devices itself

c) both device that allows wireless gazettes to connect to a wired network and
wireless devices itself

d) all the nodes in the network

Answer: A

155 In wireless ad-hoc network, what is right?

a) access point is not required

b) access point is must

c) nodes are not required

d) all nodes are access points

Answer: A

156 Which multiple access technique from below is used by IEEE 802.11 standard
for wireless LAN?

a) CDMA

b) CSMA/CA

185
c) ALOHA

d) CSMA/CD

Answer: B

157 For wireless distribution system, what is correct?

a) multiple access point are inter-connected with each other

b) there is no access point

c) only one access point exists

d) access points are not required

Answer: A

158 A wireless network interface controller can work in which of the below
written?

a) infrastructure mode

b) ad-hoc mode

c) both infrastructure mode and ad-hoc mode

d) WDS mode

Answer: C

186
159 In wireless network an extended service set is a set of which of the below
written?

a) connected basic service sets

b) all stations

c) all access points

d) connected access points

Answer: A

160 Which of the below written is used in wireless LAN.

a) time division multiplexing

b) orthogonal frequency division multiplexing

c) space division multiplexing

d) channel division multiplexing

Answer: B

161 Which of the below written event is not possible in wireless LAN?

a) collision detection

b) acknowledgement of data frames

c) multi-mode data transmission

d) connection to wired networks

187
Answer: A

162 What is purpose of Wired Equivalent Privacy (WEP)?

a) security algorithm for ethernet

b) security algorithm for wireless networks

c) security algorithm for usb communication

d) security algorithm for emails

Answer: B

163 What is full form of WPA?

a) wi-fi protected access

b) wired protected access

c) wired process access

d) wi-fi process access

Answer: A

164 What is meaning of internet?

a) a single network

b) a vast collection of different networks

c) interconnection of local area networks

d) interconnection of wide area networks


188
Answer: B

165 To join the internet, the computer has to be connected to a which of the below
written?

a) internet architecture board

b) internet society

c) internet service provider

d) different computer

Answer: C

166 Internet access by transmitting digital data over the wires of a local telephone
network is provided by which of the below written?

a) leased line

b) digital subscriber line

c) digital signal line

d) digital leased line

Answer: B

167 ISP exchanges internet traffic between their networks through which of the
below written?

a) internet exchange point

189
b) subscriber end point

c) isp end point

d) internet end point

Answer: A

168 Which of the below written protocols is used in the internet?

a) HTTP

b) DHCP

c) DNS

d) DNS, HTTP and DNS

Answer: D

169 The size of an IP address in IPv6 is which of the below written?

a) 32 bits

b) 64 bits

c) 128 bits

d) 265 bits

Answer: C

170 Internet works on which of the below written?


190
a) packet switching

b) circuit switching

c) both packet switching and circuit switching

d) data switching

Answer: A

171 Which of the below written is not an application layer protocol used in
internet?

a) remote procedure call

b) internet relay chat

c) resource reservation protocol

d) local procedure call

Answer: C

172 Which of the below written protocol assigns IP address to the client connected
in the internet?

a) DHCP

b) IP

c) RPC

d) RSVP

191
Answer: A

173 Which one of the below written is not used in media access control?

a) ethernet

b) digital subscriber line

c) fiber distributed data interface

d) packet switching

Answer: D

174 Which one of the below written is not used in media access control?

a) ethernet

b) digital subscriber line

c) fiber distributed data interface

d) packet switching

Answer: C

175 STP stands for which of the below written?

a) Shielded twisted pair cable

b) Spanning tree protocol

c) Static transport protocol


192
d) Shielded two power cable

Answer: A

178 What is the maximum possible cable length of STP?

a) 100 ft

b) 200 ft

c) 100 m

d) 200 m

Answer: C

179 What is the maximum possible data transfer rate of STP?

a) 10 mbps

b) 100 mbps

c) 1000 mbps

d) 10000 mbps

Answer: B

180 Which of the below written connector does STP use?

a) BNC
193
b) RJ-11

c) RJ-45

d) RJ-69

Answer: C

181 What is the central device used in the star topology?

a) STP server

b) Hub/switch

c) PDC

d) Router

Answer: B

182 What is the maximum possible data transfer rate for optical fiber cable?

a) 10 mbps

b) 100 mbps

c) 1000 mbps

d) 10000 mbps

Answer: C

183 Which of the below written architecture uses CSMA/CD access method?
194
a) ARC net

b) Ethernet

c) Router

d) STP server

Answer: B VARUN KHAGAUL

195
DATA STRUCTURE

1 Which of the below written best describes an array?

a) A data structure that shows a hierarchical behavior

b) Container of objects of similar types

c) Arrays are immutable once initialized

d) Array is not a data structure

Answer: B

2 Which of the below written data structure allows deletion from front and
insertion from rear side?

a)QUEUES

b)STACK

c)Linked List

d) Binary Tree

Answer: A

3 Which of the below written concepts make extensive use of arrays?

a) Binary trees

b) Scheduling of processes

196
c) Caching

d) Spatial locality

Answer: D

4 Which of the below written data structure permits deletion at both end but
insertion at one end

a) Priototy Queue

b) Linked List Queue

c) Input restricted Deque

d) None of these

Answer: C

5 Which of the below written data structure is non-linear in nature?

a)string

b)List

c)Stack

d)None of these

Answer: D

6 Assuming Int is of 4bytes, what will be the size of int arr[15];?

197
a) 15

b) 19

c) 11

d) 60

Answer: D

7 Which of the below written data structure is suitable for representation of


hierarchical relation between elements?

a) Deque

b) Linked List

c) Tree

d) Array

Answer: C

8 Elements in an array are accessed through which one of the below:

a) randomly

b) sequentially

c) exponentially

d) logarithmically

Answer: A

198
9 In which of the below written binary tree, there is either zero or two children per
node

a) extended binary tree

b) parent binary tree

c) Binary search tree

d) none of these

Answer: A

10 Process of removing an element from stack is known as:

a) Create

b) Push

c) Evaluation

d) Pop

Answer: D

11 Which of the below written algorithm calls itself directly?

a) Recursive

b) Sub Algo

c) POlish

d) Traversal

199
Answer: A

12 Pushing any element into stack data structure already having five elements and
stack size of 5, then stack becomes which of the below written?

a) Overflow

b) Crash

c) Underflow

d) User flow

Answer: A

13 A connected graph without any cycle is known as

a) tree graph

b) free tree

c) tree

d) All above are correct

Answer: D

14 Which of the below written applications may use a stack?

a) A parentheses balancing program

b) Tracking of local variables at run time

c) Compiler Syntax Analyzer

200
d) Data Transfer between two asynchronous process

Answer: D

15 Which of the below written case does not exist in the complexity theory?

a) Null case

b) Worst Case

c) Average Case

d) Best Case

Answer: A

16 Which data structure required to check any expression contains balanced


parenthesis is?

a) Stack

b) Queue

c) Array

d) Tree

Answer: A

17 Which are two measures for the efficiency of any algorithm?

a) complexity and capacity

201
b) processor and memory

c) time and space

d) data and space

Answer: C

18 The process of accessing data stored in a serial access memory is similar to


manipulating data on which of the below written?

a) Heap

b) Binary Tree

c) Array

d) Stack

Answer: D

19 For linear search algorithm system, when does worst case happens?

a) when item is in the middle

b) when item is not in array at all

c) when item is the last element in array

d) when item is not there at all

Answer: D

202
20 Which of the below written data structure is used for implementing recursion?

a) Queue

b) Stack

c) Array

d) List

Answer: B

21 Stack is also called

a) last in first out

b) First in last out

c) Last in last out

d) first in first out

Answer: A

22 Which of the below written is not an inherent application of stack?

a) Reversing a string

b) Evaluation of postfix expression

c) Implementation of recursion

d) Job scheduling

203
Answer: D

23 The type of expression in which of the below written operator succeeds its
operands is?

a) Infix Expression

b) Prefix Expression

c) Postfix Expression

d) Both Prefix and Postfix Expressions

Answer: C

24 Which of the below written data structure is not suitable for non-homogenous
data elements?

a) Pointer

b) Array

c) Stack

d) Linked List

Answer: B

25 The data structure required for Breadth First Traversal on any graph is which of
the below written?

a) Stack

b) Array

204
c) Queue

d) Tree

Answer: C

26 A queue follows which of the below written?

a) FIFO (First In First Out) principle

b) LIFO (Last In First Out) principle

c) Ordered array

d) Linear tree

Answer: A

27 Circular Queue is also known as which of the below written?

a) Ring Buffer

b) Square Buffer

c) Rectangle Buffer

d) Curve Buffer

Answer: A

28 A data structure in which of the below written elements can be inserted or


deleted from both the ends but not from the middle?

205
a) Queue

b) Circular queue

c) Dequeue

d) Priority queue

Answer: C

29 Queues serve major role in which of the below written?

a) Simulation of recursion

b) Simulation of arbitrary linked list

c) Simulation of limited resource allocation

d) Simulation of heap sort

Answer: C

30 Which of the below written is not the type of queue?

a) Ordinary queue

b) Single ended queue

c) Circular queue

d) Priority queue

Answer: B

206
31 A linear collection of which of the below written data elements where the linear
node is given by means of pointer is called?

a) Linked list

b) Node list

c) Primitive list

d) Unordered list

Answer: A

32 Herder node is also used in which of the below data structure?

a) Binary tree

b) Array

c) Pointer

d) Linked list

Answer: A

34 For breadth first search option, we use which type of data structure?

a) Queue

b) Stack

c) Array

d) Tree

207
Answer: A

35 Linked lists are not suitable to for the implementation of which of the below
written?

a) Insertion sort

b) Radix sort

c) Polynomial manipulation

d) Binary search

Answer: D

36 Linked list is considered as an example of which type of memory allocation.

a) Dynamic

b) Static

c) Compile time

d) Heap

Answer: A

37 In Linked List implementation, a node carries information regarding which one


of below:

a) Data

b) Link

208
c) Data and Link

d) Node

Answer: B

38 Linked list data structure offers considerable saving in which one?

a) Computational Time

b) Space Utilization

c) Space Utilization and Computational Time

d) Speed Utilization

Answer: C

39 Which of the below written data structure comes in the linear type?

a) Stack

b) Tree

c) Binary Tree

d) Linked List

40 Which of the below written sorting algorithms can be used to sort a random
linked list with minimum time complexity?

209
a) Insertion Sort

b) Quick Sort

c) Heap Sort

d) Merge Sort

Answer: D

41 Which of the below written is not internal sort?

a) Insertion sort

b) Bubble sort

c) Merge sort

d) Heap sort

42 Which of the below written is not a disadvantage to the usage of array?

a) Fixed size

b) There are chances of waste of memory space if elements inserted in an array are
lesser than the allocated size

c) Insertion based on position

d) Accessing elements at specified positions

Answer: D

210
43 The data structure required to analyze whether an expression contains balanced
parenthesis is?

a) Stack

b) Queue

c) Array

d) Tree

Answer: A

44 What type of data structure would you mostly likely see in a non recursive
implementation of any recursive algorithm?

a) Linked List

b) Stack

c) Queue

d) Tree

Answer: B

45 The process of accessing any data stored in a serial access memory is similar to
manipulating data on which one from below?

a) Heap

b) Binary Tree

c) Array

d) Stack

211
Answer: D

46 Which type of data structure is needed to convert infix notation to postfix


notation?

a) Branch

b) Tree

c) Queue

d) Stack

Answer: D

47 Which of the below written data structure is used for implementing recursion?

a) Queue

b) Stack

c) Array

d) List

Answer: B

48 Which of the below written statement about stack data structure is not right?

a) Linked List are used for implementing Stacks

b) Top of the Stack always contain the new node

212
c) Stack is the FIFO data structure

d) Null link is present in the last node at the bottom of the stack

Answer: C

49 Which of the below written is not an inherent application of stack?

a) Reversing a string

b) Evaluation of postfix expression

c) Implementation of recursion

d) Job scheduling

Answer: D

50 The type of expression in which operator succeeds its operands is known as?

a) Infix Expression

b) Prefix Expression

c) Postfix Expression

d) Both Prefix and Postfix Expressions

Answer: C

51 A linear list of elements in which deletion can be done from front end and
insertion can take place only at the rear end is known as?

213
a) Queue

b) Stack

c) Tree

d) Linked list

Answer: A

52 Which data structure is required for Breadth First Traversal on a graph?

a) Stack

b) Array

c) Queue

d) Tree

Answer: C

53 A queue follows which of the below written?

a) FIFO (First In First Out) principle

b) LIFO (Last In First Out) principle

c) Ordered array

d) Linear tree

Answer: A

214
54 Circular Queue is also known as which of the below written?

a) Ring Buffer

b) Square Buffer

c) Rectangle Buffer

d) Curve Buffer

Answer: A

55 A data structure in which elements can be inserted or deleted from both the ends
but not in the middle is known as?

a) Queue

b) Circular queue

c) Dequeue

d) Priority queue

Answer: C

56 Queues serve major role in which one from below:

a) Simulation of recursion

b) Simulation of arbitrary linked list

c) Simulation of limited resource allocation

d) Simulation of heap sort

215
Answer: C

57 Which of the below written is not the type of queue?

a) Ordinary queue

b) Single ended queue

c) Circular queue

d) Priority queue

Answer: B

58 Linear collections of data elements where the linear node is given by means of
pointer are known as?

a) Linked list

b) Node list

c) Primitive list

d) Unordered list

Answer: A

59 In linked list data structure every node contain minimum of two field
information. One field is data field to store the data second field is?

a) Pointer to character

b) Pointer to integer

216
c) Pointer to node

d) Node

Answer: C

60 Which operation can't be performed on Queue?

a) Travesal

b) Insertion

c) Deletion

d) Retrival

Answer: A

61 With which data structure can a priority queue can be implemented?

a) Array

b) List

c) Heap

d) Tree

Answer: D

62 Which of the below written is not an application of priority queue?

a) Huffman codes
217
b) Interrupt handling in operating system

c) Undo operation in text editors

d) Bayesian spam filter

Answer: C

63 Which of the below written is not a disadvantage of priority scheduling in


operating systems?

a) A low priority process might have to wait indefinitely for the CPU

b) If the system crashes, low priority systems may be lost permanently

c) Interrupt handling

d) Indefinite blocking

Answer: C

64 Which of the below written is not an advantage of priority queue?

a) Easy to implement

b) Processes with different priority can be properly handled

c) Applications with differing requirements

d) Easy to delete elements in any case

Answer: D

218
65 Which is the time complexity to insert any node based on position in a priority
queue?

a) O(nlogn)

b) O(logn)

c) O(n)

d) O(n2)

Answer: C

66 How many stacks are needed for applying evaluation of infix expression
algorithm?

a) one

b) two

c) three

d) four

Answer: B

67 What is total number of passes does the evaluation of infix expression algorithm
makes through the input?

a) One

b) Two

c) Three

d) Four

219
Answer: A

68 Which type of data structure can be performed on different data structures?

a) Creation

b) Destruction

c) Selection

d) All above

Answer: D

69 Which of the below written statement is incorrect with respect to evaluation of


infix expression algorithm?

a) Operand is pushed on to the stack

b) If the precedence of operator is higher, pop two operands and evaluate

c) If the precedence of operator is lower, pop two operands and evaluate

d) The result is pushed on to the operand stack

Answer: B

70 Evaluate this statement using infix evaluation algorithm and select the correct
answer. 1+2*3-2

a) 3

220
b) 6

c) 5

d) 4

Answer: C

71 How many stacks are needed for evaluation of prefix expressions?

a) one

b) two

c) three

d) four

Answer: B

72 While evaluating any prefix expression, the string is read from which side?

a) left to right

b) right to left

c) center to right

d) center to left to right

Answer: B

74 What does determine the order of evaluation of any prefix expression?


221
a) precedence and associativity

b) precedence only

c) associativity only

d) depends on the parser

Answer: A

75 What is meaning of bit array?

a) Data structure for representing arrays of records

b) Data structure that compactly stores bits

c) An array in which elements mostly have the same value

d) Array in which elements are not present in continuous locations

Answer: B

76 Which of the below written bitwise operations will you use to set a particular bit
to 1?

a) OR

b) AND

c) XOR

d) NOR

Answer: A

222
77 Which of the below written bitwise operations will you use to set a particular bit
to 0?

a) OR

b) AND

c) XOR

d) NAND

Answer: B

78 Which of the below written bitwise operations will you use to toggle a
particular bit?

a) OR

b) AND

c) XOR

d) NOT

Answer: C

79 Which of the below written is not an advantage of bit array?

a) Exploit bit level parallelism

b) Maximal use of data cache

c) Can be stored and manipulated in the register set for long time period

223
d) Accessing Individual Elements is easy

Answer: D

80 Which of the below written is not a disadvantage of bit array?

a) Without compression, they might become sparse

b) Accessing individual bits is expensive

c) Compressing bit array to byte/word array, the machine also has to support
byte/word addressing

d) Storing and Manipulating in the register set for long periods of time

Answer: D

81 Which of the below written is not applications of bit array?

a) Used by the Linux kernel

b) For the allocation of memory pages

c) Bloom filter

d) Implementation of Vectors and Matrices

Answer: D

82 Which class in Java can be put to represent bit array?

a) BitSet

224
b) BitVector

c) BitArray

d) BitStream

Answer: A

83 Which of the below written bitwise operator will you use to invert all the bits in
a bit array?

a) OR

b) NOT

c) XOR

d) NAND

Answer: B

84 Which of the below written hamming weight count mean in Bit array system?

a) Finding the number of 1 bit in a bit array

b) Finding the number of 0 bit in a bit array

c) Finding the sum of bits in a bit array

d) Finding the average number of 1’s and 0’s in bit arrays

Answer: A

225
85 Which of the below written operations returns the first occurrence of bit 1 in bit
arrays?

a) Find First Zero

b) Find First On

c) Counting lead Zeroes

d) Counting lead One

Answer: B

86 What is meaning of hash table?

a) A structure that maps values to keys

b) A structure that maps keys to values

c) A structure used for storage

d) A structure used to implement stack and queue

Answer: B

87 If several elements are competing for the same bucket in any hash table, what it
will be called?

a) Diffusion

b) Replication

c) Collision

d) Duplication

226
Answer: C

88 What is meaning of direct addressing?

a) Distinct array position for every possible key

b) Fewer array positions than keys

c) Fewer keys than array positions

d) Same array position for all keys

Answer: A

89 What is meaning of hash function?

a) A function has allocated memory to keys

b) A function that computes the location of the key in the array

c) A function that creates an array

d) A function that computes the location of the values in the array

Answer: B

90 Which of the below written is not a technique to avoid a collision?

a) Make the hash function appear random

b) Use the chaining method

c) Use uniform hashing

d) Increasing hash table size


227
Answer: D

91 What is meaning of load factor?

a) Average array size

b) Average key size

c) Average chain length

d) Average hash table length

Answer: C

92 What is meaning of simple uniform hashing?

a) Every element has equal chance of hashing into any of the slots

b) A weighted probabilistic method is used to hash elements into the slots

c) Elements has no fix probability of hashing into array slots

d) Elements are hashed based on priority

Answer: A

93 In simple chaining system, which data structure is appropriate?

a) Singly linked list

b) Doubly linked list

c) Circular linked list


228
d) Binary trees

Answer: B

94 What is the order of any matrix?

a) number of rows X number of columns

b) number of columns X number of rows

c) number of rows X number of rows

d) number of columns X number of columns

Answer: A

95 Which of the below written property does not hold for matrix multiplication?

a) Associative

b) Distributive

c) Commutative

d) Additive Inverse

Answer: C

96 Which data structure is called simplest data structure?

a) Linked list

b) Linear Array
229
c) Binary Tree

d) None of these

Answer: B

98 Which of the below written don’t use matrices?

a) In solving linear equations

b) Image processing

c) Graph theory

d) Sorting number

Answer: D

99 Which of the below written is an advantage of matrices?

a) Internal complexity

b) Searching through a matrix is complex

c) Not space efficient

d) Graph Plotting

Answer: D

100 A graph having an edge from every vertex to every other vertex is known as:

a) Tightly Connected
230
b) Strongly Connected

c) Weakly Connected

d) Loosely Connected

Answer: A

101 What will be the number for any unlabeled simple directed graph that can be
made with 1 or 2 vertices?

a) 2

b) 4

c) 5

d) 9

Answer: B

102 Linear array is also known as which one

a) Straigh array

b) One dimensional array

c) Two dimensional array

d) multi dimensional array

Answer: B

231
103 What will be the max possible number of edges in a directed graph with no
self loops having total 8 vertices?

a) 28

b) 64

c) 256

d) 56

Answer: D

104 What will be maximum number of edges present in simple directed graph with
7 vertices if there exists no cycles in that graph?

a) 21

b) 7

c) 6

d) 49

Answer: C

105 What is meaning of dequeue?

a) A queue with insert/delete defined for both front and rear ends

b) A queue implemented with a doubly linked list

c) A queue that is implemented with both singly and doubly linked lists

d) A queue with insert/delete defined for front side of the queue

232
Answer: A

106 What is application of dequeue?

a) A-Steal job scheduling algorithm

b) Can be used as both stack and queue

c) To find the maximum of all sub arrays of size k

d) To avoid collision in hash tables

Answer: D

107 How many child nodes every node of Ternary Tree contain?

a) 4

b) 6

c) 5

d) 3

Answer: D

108 Which of the below written is the name of the node having child nodes?

a) Brother

b) Sister

c) Mother
233
d) Parent

Answer: D

109 What is the depth of the root node of any ternary tree?

a) 2

b) 1

c) 0

d) 3

Answer: C

110 What will be Height of the root node of ternary tree?

a) 1

b) 2

c) 3

d) 0

Answer: D

111 How many total extra nodes will be there in the full ternary tree than a
complete ternary tree?

a) 1

234
b) 2

c) 3

d) Both have same number of nodes

Answer: D

112 Which of the below written is the implementation of the ternary tree?

a) AVL Tree

b) Ternary Heap

c) Hash Table

d) Dictionary

Answer: B

113 What is meaning of load factor?

a) Average array size

b) Average key size

c) Average chain length

d) Average hash table length

Answer: C

114 When does the top value of stack changes?


235
a) After deletion

b) Before Deletion

c) During Deletion

d) None

115 In the simple chaining system, which data structure is appropriate?

a) Singly linked list

b) Doubly linked list

c) Circular linked list

d) Binary trees

Answer: B

116 What will be the order of a matrix?

a) number of rows X number of columns

b) number of columns X number of rows

c) number of rows X number of rows

d) number of columns X number of columns

Answer: A

236
117 Which of the below written following property does not hold for matrix
multiplication?

a) Associative

b) Distributive

c) Commutative

d) Additive Inverse

Answer: C

118 What is time complexity of quick sort

a) O(n)

b) O(n2)

c) O(nlogn)

d) None

119 Which data structure is known as one ended structure?

a) Stack

b) Tree

c) Graph

d) Array

237
Answer: A

120 Which of the below written don’t use matrices?

a) In solving linear equations

b) Image processing

c) Graph theory

d) Sorting number

Answer: D

121 Which data structure is also known as indexed structure?

a) Linked List

b) Binary Tree

c) Linear Array

d) None of these

122 Which of the below written advantage of arrays?

a) Objects of mixed data types can be stored

b) Elements in an array cannot be sorted


238
c) Index of first element of an array is 1

d) Easier to store elements of same data type

Answer: D

123 Which is the disadvantage of arrays?

a) Data structure like queue or stack cannot be implemented

b) There are chances of wastage of memory space if elements inserted in an array


are lesser than the allocated size

c) Index value of an array can be negative

d) Elements are sequentially accessed

Answer: B

124 In general context, the index of the first element in an array is which of the
below written?

a) 0

b) -1

c) 2

d) 1

Answer: A

239
125 Process of inserting an element in stack is called which of the below:

a) Create

b) Push

c) Evaluation

d) Pop

Answer: B

126 In any stack, if user tries to remove any element from empty stack it will be
called?

a) Underflow

b) Empty collection

c) Overflow

d) Garbage Collection

Answer: A

127 Which data structure, you are likely see in a non recursive implementation of a
recursive algo?

a) Linked List

b) Stack

c) Queue

d) Tree

240
Answer: B

128 Which of the below written data structure is needed to convert infix notation to
postfix notation?

a) Branch

b) Tree

c) Queue

d) Stack

Answer: D

241
OPERATING SYSTEM

1 Which of below written are the two types of Semaphore?

a) Digital Semaphores and Binary Semaphores.

b) Analog Semaphores and Octal Semaphores

c) Counting Semaphores and Binary Semaphores

d) Critical Semaphores and System Semaphores

Answer: C

2 To access services of any operating system, the interface is provided by which


one:

a) System calls

b) API

c) Library

d) Assembly instructions

Answer: A

3 What is meaning of dispatch latency?

a) The time taken by the dispatcher to stop one process and start some other

b) Time required by the processor to write a file into disk

c) The whole time taken by all processor

242
d) None of Above

4 Which of the below written error will be handle by the operating system?

a) power failure

b) lack of paper in printer

c) connection failure in the network

d) all of the mentioned

Answer: D

5 Which of the below written is not process states?

a) New

b) Running

c) Ready

d) Finished

Answer: D

6 Through operating system, the resource management can be done using which
one from below:

a) time division multiplexing

243
b) space division multiplexing

c) time and space division multiplexing

d) none of the mentioned

Answer: C

7 Which are the requirements for the solution for the critical section problem?

a) Mutual Exclusion

b) Progress

c) Bounded Waiting

d) All of Above

8 Which of the below written is the allocation method of a disk space?

a) Contiguous allocation

b) Linked allocation

c) Indexed allocation

d) All of the Above

9 Which of the below written is not a real time operating system?

a) VxWorks

b) Windows CE
244
c) RTLinux

d) Palm OS

Answer: D

10 The OS X has which one:

a) monolithic kernel

b) hybrid kernel

c) microkernel

d) monolithic kernel with modules

Answer: B

11 Which of the below written method of handling deadlocks?

A. Use a protocol to make sure that the system will never enter a deadlock state.

B. Allow the system to enter the deadlock state and then recover.

C. Pretend that deadlocks never occur in the system.

D. All of the Above

12 In operating system, every process has its

a) address space and global variables


245
b) open files

c) pending alarms, signals and signal handlers

d) all of the mentioned

Answer: D

13 In Unix operating system, which system call creates new process?

a) fork

b) create

c) new

d) none of the mentioned

Answer: A

14 A process can be terminated because of

a) normal exit

b) fatal error

c) killed by another process

d) all of the mentioned

Answer: D

15 What is meaning of Thrashing?


246
A. high paging activity is called thrashing.

B. high executing activity is called thrashing

C. extremely long process is called thrashing

D. Extremely long virtual memory is called thrashing

16 What is meaning of interprocess communication?

a) communication within the process

b) communication between two process

c) communication between two threads of same process

d) none of the mentioned

Answer: B

17 Which of the below written file format supports in Windows 7?

A) NTFS

B) BSD

C) EXT

D) All of the above

Answer: D

247
18 A process stack does not contain which one?

a) Function parameters

b) Local variables

c) Return addresses

d) PID of child process

Answer: D

19 What is the primary job of the operating system is

A) Manage Commands

B) Manage Users

C) Manage Programs

D) Manage Resources

Answer: D

20 What is the primary job of the operating system is

A) Manage Commands

B) Manage Users

C) Manage Programs

D) Manage Resources

Answer: D
248
21 A Process Control Block (PCB) does not contain which of the following?

a) Code

b) Stack

c) Bootstrap program

d) Data

Answer: C

22 The number of processes completed per unit time is called

a) Output

b) Throughput

c) Efficiency

d) Capacity

Answer: B

23 An operating system of computer is a program or a group of programs that

a) Helps in checking the spelling mistakes of Word

b) Maintain the relationship in Database table

c) Manages the resources of the Computer

d) Performs the calculations of cells in Excel

249
C

24 Which of the below written is not the state of a process?

a) New

b) Old

c) Waiting

d) Running

Answer: B

25 What is meaning of Process Control Block?

a) Process type variable

b) Data Structure

c) A secondary storage section

d) A Block in memory

Answer: B

26 The entry of all the PCBs of the current processes is known as:

a) Process Register

b) Program Counter

c) Process Table

d) Process Unit
250
Answer: C

27 What is meaning of degree of multiprogramming?

a) the number of processes executed per unit time

b) the number of processes in the ready queue

c) the number of processes in the I/O queue

d) the number of processes in memory

Answer: D

28 A single thread of control allows the process to perform which one from below:

a) only one task at a time

b) multiple tasks at a time

c) only two tasks at a time

d) all of the mentioned

Answer: A

29 What is the main objective of multiprogramming?

a) Have some process running at all times

b) Have multiple programs waiting in a queue ready to run

c) To minimize CPU utilization


251
d) None of the mentioned

Answer: A

30 Which of the below written do not belong to queues for processes?

a) Job Queue

b) PCB queue

c) Device Queue

d) Ready Queue

Answer: B

31 What is the main content in the page table?

A. Base address of each frame & corresponding page number

B. Memory address and corresponding page number

C. File name and corresponding page number

D. None of Above

32 What will happen when a process terminates?

a) It will be removed from all queues

b) It will be removed from all, but the job queue

c) Its process control block is de-allocated

d) Its process control block is never de-allocated


252
Answer: A

33 Which of the below written operating system reads and reacts in actual time?

A. Quick Response System

B. Real Time System

C. Time Sharing System

D. Batch Processing System

34 Which of the below written resources must be protected by the operating


system?

A. I/O

B. Memory

C. CPU

D. All of the above

35 What is meaning of medium term scheduler?

a) It selects which process has to be brought into the ready queue

253
b) It selects which process has to be executed next and allocates CPU

c) It selects which process to remove from memory by swapping

d) None of the mentioned

Answer: C

36 Which of the below written is major activities of an operating system in regard


to secondary storage management?

A. Free space management

B. Storage allocation

C. Disk scheduling

D. All of the above

37 When a computer is first switched on or restarted, special type of loader is


executed, select name?

a) Compile and Go loader

b) Boot loader

c) Bootstrap loader

d) Relating loader

254
38 The only state transition that is initiated by the user process itself is known as

a) block

b) wakeup

c) dispatch

d) none of the mentioned

Answer: A

39 Which of the below written operating systems is better for implementing a


Client-Server network

a) MS DOS

b) Windows 95

c) Windows 98

d) Windows 2000

40 In any multiprogramming environment what will happen?

a) the processor executes more than one process at a time

b) the programs are developed by more than one person

c) more than one process resides in the memory

d) a single user can execute many programs at the same time

255
Answer: C

41 The operating system manages which one

a) Memory

b) Processes

c) Disks and I/O devices

d) all of the above

42 The context of any process is in the PCB of process does not contain which
one?

a) the value of the CPU registers

b) the process state

c) memory-management information

d) context switch time

Answer: D

43 Which of the below written need not necessarily be saved on a context switch
between processes?

a) General purpose registers

256
b) Translation lookaside buffer

c) Program counter

d) All of the mentioned

Answer: B

44 Which of the below written does not interrupt a running process?

a) A device

b) Timer

c) Scheduler process

d) Power failure

Answer: C

45 Which of the below written process can be affected by other processes


executing in the system?

a) cooperating process

b) child process

c) parent process

d) init process

Answer: A

257
46 Operating system manages which one from below:

a) Memory

b) Processes

c) Disks and I/O devices

d) all of the above

48 Which of the below written is a synchronization tool?

a) thread

b) pipe

c) semaphore

d) socket

Answer: C

49 A semaphore is a shared integer variable that can

a) drop below zero

b) be more than zero

c) drop below one

d) be more than one

Answer: A
258
50 Mutual exclusion can be provided which one from below

a) mutex locks

b) binary semaphores

c) both mutex locks and binary semaphores

d) none of the mentioned

Answer: C

51 Which file keeps command when operating system starts?

a) [Link]

b) any batch file

c) [Link]

d) [Link]

52 Process synchronization can be done on which one?

a) hardware level

b) software level

c) both hardware and software level

d) none of the mentioned

259
Answer: C

53 A monitor is a module that encapsulates which one?

a) shared data structures

b) procedures that operate on shared data structure

c) synchronization between concurrent procedure invocation

d) all of the mentioned

Answer: D

54 To enable a process to wait within the monitor, what is right?

a) a condition variable must be declared as condition

b) condition variables must be used as boolean objects

c) semaphore must be used

d) all of the mentioned

Answer: A

55 What of the below written should be the extension to execute files?

a) EXE

b) BAT

c) COM

d) All of the above


260
B

56 A parent process calling which system call will be suspended until children
processes end.

a) wait

b) fork

c) exit

d) exec

Answer: A

57 Cascading termination means termination of all child processes before the


parent terminates

a) Normally

b) Abnormally

c) Normally or abnormally

d) None of the mentioned

Answer: A

59 In UNIX, every process is identified by which one?

a) Process Control Block

261
b) Device Queue

c) Process Identifier

d) None of the mentioned

Answer: C

61 What is right about child process?

a) be a duplicate of the parent process

b) never be a duplicate of the parent process

c) cannot have another program loaded into it

d) never have another program loaded into it

Answer: A

62 The child process completes its execution, but the parent keeps executing until
the child process is called

a) Orphan

b) Zombie

c) Body

d) Dead

Answer: B

262
63 Which of the below written is not true?

a) kernel is the program that constitutes the central core of the operating system

b) kernel is the first part of any operating system to load in the memory during
booting.

c) kernel is made of various modules which can not be loaded in running operating
system

d) kernel remains in the memory during the entire computer session

Answer: C

64 Message passing system allows processes which one

a) communicate with one another without resorting to shared data

b) communicate with one another by resorting to shared data

c) share data

d) name the recipient or sender of the message

Answer: A

65 Which of the below written two operations are provided by the IPC facility?

a) write & delete message

b) delete & receive message

c) send & delete message

d) receive & send message

263
Answer: D

66 What is right about, messages sent by a process

a) have to be of a fixed size

b) have to be a variable size

c) can be fixed or variable sized

d) None of the mentioned

Answer: C

67 The link between two processes P and Q to send and receive messages is known
as:

a) communication link

b) message-passing link

c) synchronization link

d) all of the mentioned

Answer: A

68 Which of the below written is the main function of the command interpreter?

a) to get and execute the next user-specified command

b) to provide the interface between API and application program

264
c) to handle the files in operating system

d) none of the mentioned

Answer: A

69 If any process fails, most operating system write the error information in which
one:

a) log file

b) another running process

c) new file

d) none of the mentioned

Answer: A

70 In the non blocking condition, what is right?

a) the sending process continue sending until the message is received

b) the sending process sends the message and resumes operation

c) the sending process keeps sending until it receives a message

d) none of the mentioned

Answer: B

71 For the Zero capacity queue, what is right?

265
a) the queue can store at least one message

b) the sender blocks until the receiver receives the message

c) the sender keeps sending and the messages don’t wait in the queue

d) none of the mentioned

Answer: B

72 What is meaning of Zero Capacity queue?

a) is referred to as a message system with buffering

b) is referred to as a message system with no buffering

c) is referred to as a link

d) none of the mentioned

Answer: B

73 Bounded capacity & unbounded capacity queues are referred to as which one?

a) Programmed buffering

b) Automatic buffering

c) User defined buffering

d) No buffering

Answer: B

74 The first program that is run when the computer is powered up is known as
266
a) boot program

b) bootloader

c) initializer

d) bootstrap program

Answer: D

75 How does the software trigger any interrupt signal?

a) Sending signals to CPU through bus

b) Executing of any special operation called system call

c) Executing a special program called system program

d) Executing a special program called interrupt trigger program

Answer: B

76 What is meaning of trap/exception?

a) hardware generated interrupt caused by an error

b) software generated interrupt caused by an error

c) user generated interrupt caused by an error

d) none of the mentioned

Answer: B

267
77 What is full form of ISR?

a) Information Service Request

b) Interrupt Service Request

c) Interrupt Service Routine

d) Information Service Routine

Answer: C

78 What is meaning of interrupt vector?

a) It will be an address that is indexed to an interrupt handler

b) It will be a unique device number that is indexed by an address

c) It will be unique identity given to an interrupt

d) None of the mentioned

Answer: A

79 DMA is used for which one from below:

a) High speed devices

b) Low speed devices

c) Utilizing CPU cycles

d) All of the mentioned

Answer: A
268
80 The systems which allow only one process execution at a time is known as:

a) uniprogramming systems

b) uniprocessing systems

c) unitasking systems

d) none of the mentioned

Answer: B

82 What is the ready state for any process?

a) when process is scheduled to run after some execution

b) when process is unable to run until some task completes

c) when process is using the CPU

d) none of the mentioned

Answer: A

83 How does the Hardware starts an interrupt?

a) Sending signals to processor through a system bus

b) Executing a special program called interrupt program

c) Executing a special program called system program

d) Executing a special operation called system call

269
Answer: A

84 Which of the below written system call returns the process identifier of any
terminated child?

a) wait

b) exit

c) fork

d) get

Answer: A

85 Which of the below written module gives control of the CPU to the process
selected by the short-term scheduler?

a) dispatcher

b) interrupt

c) scheduler

d) none of the mentioned

Answer: A

86 The state of a process is defined by which one?

a) the final activity of the process

b) the activity just executed by the process

270
c) the activity to next be executed by the process

d) the current activity of the process

Answer: D

87 Interval from the time of submission of any process to the time of completion is
known as

a) waiting time

b) turnaround time

c) response time

d) throughput

Answer: B

88 Which scheduling algorithm from below written allocates the CPU first to the
process that requests the CPU first?

a) first-come, first-served scheduling

b) shortest job scheduling

c) priority scheduling

d) none of the mentioned

Answer: A

271
89 What is right about priority scheduling algorithm?

a) CPU is allocated to the process with highest priority

b) CPU is allocated to the process with lowest priority

c) Equal priority processes can not be scheduled

d) None of the mentioned

Answer: A

90 In priority scheduling algorithm, when any process arrives at ready queue, its
priority is compared with the priority of which one?

a) all process

b) currently running process

c) parent process

d) init process

Answer: B

91 Which algorithm from below written is defined in Time quantum?

a) shortest job scheduling algorithm

b) round robin scheduling algorithm

c) priority scheduling algorithm

d) multilevel queue scheduling algorithm

272
Answer: B

92 Process are classified into different groups in which one?

a) shortest job scheduling algorithm

b) round robin scheduling algorithm

c) priority scheduling algorithm

d) multilevel queue scheduling algorithm

Answer: D

93 For any multilevel feedback scheduling algorithm, what is right?

a) a process can shift to a different classified ready queue

b) classification of ready queue is permanent

c) processes are not classified into groups

d) none of the mentioned

Answer: A

94 Which one of the below written cannot be scheduled by the kernel?

a) kernel level thread

b) user level thread

c) process

d) none of the mentioned


273
Answer: B

95 CPU scheduling is done on the basis of which one?

a) multiprocessor systems

b) multiprogramming operating systems

c) larger memory sized systems

d) none of the mentioned

Answer: B

96 In the multiprogramming, what is used productively.

a) time

b) space

c) money

d) all of the mentioned

Answer: A

97 Which are the two steps from below written for any process execution?

a) I/O & OS Burst

b) CPU & I/O Burst

c) Memory & I/O Burst


274
d) OS & Memory Burst

Answer: B

98 An I/O bound program will typically have which one?

a) a few very short CPU bursts

b) many very short I/O bursts

c) many very short CPU bursts

d) a few very short I/O bursts

Answer: C

100 In which of the below written case non-preemptive scheduling occurs?

a) When a process switches from the running state to the ready state

b) When a process goes from the running state to the waiting state

c) When a process switches from the waiting state to the ready state

d) All of the mentioned

Answer: B

101 The switching of the CPU from one process some other is known as:

a) process switch

b) task switch
275
c) context switch

d) all of the mentioned

Answer: D

102 What is meaning of Dispatch latency?

a) the speed of dispatching any process from running to ready state

b) the time of dispatching any process from running to ready state and CPU kept
idle

c) the time to stop one process and start running another one

d) none of the mentioned

Answer: C

103 Scheduling is done for what purpose?

a) increase CPU utilization

b) decrease CPU utilization

c) keep the CPU more idle

d) none of the mentioned

Answer: A

104 Scheduling is done for what purpose?

276
a) increase the throughput

b) decrease the throughput

c) increase the duration of a specific amount of work

d) none of the mentioned

Answer: A

105 What is meaning of Turnaround time?

a) the total wait time for a process to complete execution

b) the total time spent in the ready queue

c) the total time spent in the running queue

d) the total time from the completion till the submission of a process

Answer: D

107 What is meaning of waiting time?

a) the total time spent in the blocked and waiting queues

b) the total time spent in the ready queue

c) the total time spent in the running queue

d) the total time from the completion till the submission of a process

Answer: B

277
109 What is meaning of Response time?

a) total time taken from submission time till the completion time

b) total time taken from submission time till the start of response is produced

c) total time taken from submission time till the response is output

d) none of the mentioned

Answer: B

110 Concurrent accesses for any shared data can result?

a) data consistency

b) data insecurity

c) data inconsistency

d) none of the mentioned

Answer: C

112 The segment of code in which the process can change some common
variables, update tables, write into files is called:

a) program

b) critical section

c) non – critical section

d) synchronizing

278
Answer: B

113 Which of the below written conditions must be satisfied to solve the critical
section problem?

a) Mutual Exclusion

b) Progress

c) Bounded Waiting

d) All of the mentioned

Answer: D

116 How many variables required to be shared between processes to solve the
critical section problem?

a) one

b) two

c) three

d) four

Answer: B

118 An un-interruptible unit is called____

a) single

b) atomic

279
c) static

d) none of the mentioned

Answer:

120 Semaphore is?

a) hardware for a system

b) special program for any system

c) integer variable

d) none of the mentioned

Answer:

121 Which are the two atomic operations permissible on the semaphore?

a) wait

b) stop

c) hold

d) none of the mentioned

Answer:

122 What is meaning of Spinlocks?

a) CPU cycles wasting locks over critical sections of any program


280
b) Locks that avoid time wastage in context switches

c) Locks that work better on multiprocessor systems

d) All of the mentioned

Answer:

123 Which is the main disadvantage of spinlocks?

a) they are not sufficient for numerous process

b) they require busy waiting

c) they are unreliable sometimes

d) they are too complex for programmers

Answer:

124 The wait operation of the semaphore basically works on which one?

a) stop()

b) block()

c) hold()

d) wait()

Answer:

126 If semaphore value is negative then what it means?


281
a) its magnitude is the number of processes waiting on that semaphore

b) it is invalid

c) no operation can be further performed on it until the signal operation is


performed on it

d) none of the mentioned

Answer: A

127 Code that changes the value of the semaphore is which one?

a) remainder section code

b) non – critical section code

c) critical section code

d) none of the mentioned

Answer: C

128 What happens if a non-recursive mutex is locked more than one time?

a) Starvation

b) Deadlock

c) Aging

d) Signaling

Answer: B

282
129 What is meaning of semaphore?

a) is a binary mutex

b) must be accessed from only one process

c) can be accessed from multiple processes

d) none of the mentioned

Answer: C

130 Which are the two kinds of semaphores?

a) mutex & counting

b) binary & counting

c) counting & decimal

d) decimal & binary

Answer: B

131 What is meaning of mutex?

a) is a binary mutex

b) must be accessed from only one process

c) can be accessed from multiple processes

d) none of the mentioned

283
Answer: B

132 A binary semaphore is a semaphore with which integer value

a) 1

b) -1

c) 0.7

d) 0.5

Answer: A

133 Semaphores are mostly used for implementation of

a) System calls

b) IPC mechanisms

c) System protection

d) None of the mentioned

Answer: B

134 Spinlocks are intended to provide which one?

a) Mutual Exclusion

b) Bounded Waiting

c) Aging

d) Progress
284
Answer: B

135 The bounded buffer problem is also known as which one?

a) Readers – Writers problem

b) Dining – Philosophers problem

c) Producer – Consumer problem

d) None of the mentioned

Answer: c

137 For bounded buffer problem, what is right?

a) there is only one buffer

b) there are n buffers

c) there are infinite buffers

d) the buffer size is bounded

Answer: B

140 What is meaning of reusable resource?

a) that can be used by any one process at a time and is not depleted by that use

b) that can be used by more than one process at a time

c) that can be shared between various threads


285
d) none of the mentioned

Answer: A

141 Which of the below written condition is required for a deadlock to be


possible?

a) mutual exclusion

b) process may hold allocated resources while waiting assignment of other


resource.

c) no resource can be forcibly eliminated from a process holding it

d) all of the mentioned

Answer: D

142 A system is in the safe state in which case?

a) the system can allocate resources to each process in some order and still avoid a
deadlock

b) there exist a safe sequence

c) all of the mentioned

d) none of the mentioned

Answer: A

143 The circular wait condition can be handled by which one?

286
a) defining a linear ordering of resource types

b) using thread

c) using pipes

d) all of the mentioned

Answer: A

144 Which of the below written is the deadlock avoidance algorithm?

a) banker’s algorithm

b) round-robin algorithm

c) elevator algorithm

d) karn’s algorithm

Answer: A

145 Which is the flip side of banker’s algorithm?

a) in advance processes rarely know how many resource they will need

b) the number of processes changes as time progresses

c) resource once available can disappear

d) all of the mentioned

Answer: D

287
146 For proper effective operating system, when deadlock should be checked?

a) every time a resource request is made

b) at fixed time intervals

c) every time resource request is made at fixed time intervals

d) none of the mentioned

Answer: C

147 Problem encountered in the multitasking when any process is perpetually


denied required resources is known as:

a) deadlock

b) starvation

c) inversion

d) aging

Answer: B

148 Which of the below written is a mathematical way to determine the deadlock
existence?

a) resource allocation graph

b) starvation graph

c) inversion graph

d) none of the mentioned

288
Answer: A

149 To prevent deadlock

a) there must be a fixed number of resources for allocation

b) resource allocation must be done only once

c) all deadlocked processes must be aborted

d) inversion technique can be used

Answer: A

151 The request and release of resources are known as

a) command line statements

b) interrupts

c) system calls

d) special programs

Answer: C

152 What is meaning of multithreaded program?

a) lesser prone to deadlocks

b) more prone to deadlocks

c) not at all prone to deadlocks


289
d) none of the mentioned

Answer: B

153 For a deadlock to come up, which of the below written conditions must hold
simultaneously?

a) Mutual exclusion

b) No preemption condition

c) Hold and wait

d) All of the mentioned

Answer: D

154 For mutual exclusion condition to prevail in the system, which is correct?

a) at least one resource of the system must be held in a non sharable mode

b) the processor must be a uniprocessor rather than a multiprocessor

c) there must be at least one resource in a sharable mode

d) all of the mentioned

Answer: A

156 Deadlock prevention is a set of numerous methods for what purpose?

a) to ensure that at least one of the required conditions cannot hold

290
b) to ensure that all of the required conditions do not hold

c) to decide if the requested resources for a process have to be given or not

d) to recover from a deadlock

Answer: A

157 For non sharable resources like a printer, what is meaning of mutual
exclusion?

a) must exist

b) must not exist

c) may exist

d) none of the mentioned

Answer: A

158 For sharable resources, what is status of mutual exclusion?

a) is required

b) is not required

c) may be or may not be required

d) none of the mentioned

Answer: B

291
160 One way to ensure that the circular wait system never holds is to
____________

a) implement a total ordering of all resource types

b) to never let a process acquire resources that are held by other processes

c) to let a process wait for only one resource at a time

d) all of the mentioned

Answer: A

163 A deadlock avoidance algorithm dynamically examines which one from


below:

a) resource allocation state

b) system storage state

c) operating system

d) resources

Answer: A

164 A state is safe, if which of the below written condition occurs?

a) the system does not crash due to deadlock occurrence

b) the system can allocate various resources to each process in some order and still
avoid a deadlock

c) the state keeps the system protected and safe

d) all of the mentioned

292
Answer: B

165 A system is in a safe state only if there exists which one from below:

a) safe allocation

b) safe resource

c) safe sequence

d) all of the mentioned

Answer: C

166 All unsafe states will be

a) deadlocks

b) not deadlocks

c) fatal

d) none of the mentioned

Answer: B

167 If no cycle exists in the resource allocation graph then what is correct about
system?

a) system will not be in a safe state

b) system will be in a safe state

293
c) all of the mentioned

d) none of the mentioned

Answer: B

168 The resource allocation graph will be not applicable to any resource allocation
system

a) with numerous instances of each resource type

b) with a single instance of each resource type

c) single as well as multiple instances of each resource type

d) none of the mentioned

Answer: A

169 The Banker’s algorithm in compare to resource allocation graph algorithm.

a) less efficient

b) more efficient

c) equal

d) none of the mentioned

Answer: A

294
170 The data structures available in the Banker’s algorithm is which one from
below:

a) Available

b) Need

c) Allocation

d) All of the mentioned

Answer: D

171 The content of the matrix requirement is______

a) Allocation-Available

b) Max-Available

c) Max-Allocation

d) Allocation-Max

Answer: C

172 The wait for graph is a deadlock detection algorithm which will be applicable
when

a) all resources have a single instance

b) all resources have multiple instances

c) all resources have a single 7 multiple instances

d) all of the mentioned

295
Answer: A

174 If the wait for graph contains a cycle then what is correct?

a) then a deadlock does not exist

b) then a deadlock exists

c) then the system is in a safe state

d) either deadlock exists or system is in a safe state

Answer: B

175 If deadlocks occur frequently in operating system, the detection algorithm


should be invoked ________

a) rarely

b) frequently

c) rarely & frequently

d) none of the mentioned

Answer: B

176 What will be the disadvantage of invoking the detection algorithm for every
request?

a) overhead of the detection algorithm because of consumption of memory

296
b) excessive time consumed in the request to be allocated memory

c) considerable overhead in computation time

d) all of the mentioned

Answer: C

181 Deadlock condition can be broken by which one from below:

a) abort one or more processes to break the circular wait

b) abort all the process in the system

c) preempt all resources from all processes

d) none of the mentioned

Answer: A

182 The two ways of aborting any processes and eliminating deadlocks are which
one?

a) Abort all deadlocked processes

b) Abort all processes

c) Abort one process at once until the deadlock cycle is removed

d) All of the mentioned

Answer: C

297
183 Those processes should be denied on occurrence of a deadlock, the termination
of which?

a) is more time taking

b) incurs minimum cost

c) safety is not hampered

d) all of the mentioned

Answer: B

184 The process to be aborted is chosen on the basis of which below factors?

a) priority of the process

b) process is interactive or batch

c) how long the process has computed

d) all of the mentioned

Answer: D

185 Cost factors for process ending include

a) Number of resources that deadlock process is not holding

b) CPU utilization at the time of deadlock

c) Amount of time any deadlocked process has thus far consumed during its
execution

d) All of the mentioned

298
Answer: C

186 If we preempt any resource from any process, the process cannot continue
with its normal execution and it should be

a) aborted

b) rolled back

c) terminated

d) queued

Answer: B

187 To _______ to a safe state, the system requires to keep complete information
about the various states of processes.

a) abort the process

b) roll back the process

c) queue the process

d) none of the mentioned

Answer: B

188 If the resources are always preempted from the same process then what can
occur.

a) deadlock

299
b) system crash

c) aging

d) starvation

Answer: D

191 In which type of streaming option multimedia file is delivered to client, but not
shared?

a) real-time streaming

b) progressive download

c) compression

d) none of the mentioned

Answer: A

192 Which one from below is the characteristic of a multimedia system?

a) high storage

b) high data rates

c) both high storage and high data rates

d) none of the mentioned

Answer: C

193 The delay that occurs during the playback of a stream is known as_____

300
a) stream delay

b) playback delay

c) jitter

d) event delay

Answer: C

194 Real time streaming protocol is used for what purpose_________

a) to control streaming media servers

b) for establishing and controlling media sessions among endpoints

c) to provide real time control.

d) all of the mentioned

Answer: D

195 In teardown state of real time streaming protocol occurs when

a) the server resources for client

b) server delivers the stream to client

c) server suspends delivery of stream

d) server breaks down the connection

Answer: D

301
196 Which of the below written resource is not necessarily required on a file
server?

a) secondary storage

b) processor

c) network

d) monitor

Answer: D

302
PROGRAMMING

C++

1 STL is based on which of the below written programming paradigm?

A. Structured Programming

B. Object Oriented Programming (OOP)

C. Functional Programming

D. Aspect Oriented Programming (AOP)

Answer: C

2 What is meaning of Seek time?

a. time taken to retrieve a data

b. Time taken by read or write

c. Time taken by appropriate sector to come under read/write

d. None of the above

3 Which one of the below written is used for comments in C++?

303
a) // comment

b) /* comment */

c) both // comment or /* comment */

d) // comment */

Answer: C

4 Which of the below written correctly describes C++ language?

A. Statically typed language

B. Dynamically typed language

C. Both Statically and dynamically typed language

D. Type-less language

5 What is meaning of parameters in C++?

a) Parameters with which functions are called

b) Parameters which are used in the definition of the function

c) Variables other than passed parameters in a function

d) Variables that are never used in the function

Answer: B

304
6 Which of the below written keyword supports dynamic method resolution?

A. abstract

B. Virtual

C. Dynamic

D. Typeid

7 Who invented C++?

a) Bjarne Stroustrup

b) Dennis Ritchie

c) Ken Thompson

d) Brian Kernighan

Answer: A

8 Which of the below written language is not supported by C++?

A. Exception Handling

B. Reflection

C. Operator Overloading

D. Namespaces

Answer: B
305
9 A language which has the capability to generate new data type is known as:

a) Extensible

b) Overloaded

c) Encapsulated

d) Reprehensible

Answer: A

10 What is full form of STL stand for?

A. Simple Template Library

B. Standard Template Library

C. Static Type Library

D. Single Type-based Library

11 Which of the below written languages is a subset of C++ language?

A. C language

B. Java Language

C. C# language

D. B language

306
A

12 What is meaning of polymorphism in OOPs?

a) Concept of allowing overiding of functions

b) Concept of hiding data

c) Concept of keeping things in differnt modules/files

d) Concept of wrapping things into a single unit

Answer: A

13 Which concept in C++ allows programmer to reuse the written code?

a) Encapsulation

b) Abstraction

c) Inheritance

d) Polymorphism

Answer: C

14 How access specifier in C++ Class assists in Abstraction?

a) They does not helps in any way

b) They allows us to show only needed things to outer world

c) They help in keeping things together

d) Abstraction concept is not used in classes


307
Answer: B

15 What is correct about C++?

a) procedural programming language

b) object oriented programming language

c) functional programming language

d) both procedural and object oriented programming language

Answer: D

16 What is meaning of modularity?

a) Hiding part of program

b) Subdividing program into various small independent parts

c) Overriding parts of program

d) Wrapping things into single unit

Answer: B

17 Which of the below written class allows to declare only one object of it?

a) Abstract class

b) Virtual class

c) Singleton class
308
d) Friend class

Answer: C

18 Which of the below written is not a type of Constructor?

a) Friend constructor

b) Copy constructor

c) Default constructor

d) Parameterized constructor

Answer: A

19 Which of the below written is correct?

a) Base class pointer object can’t point to a derived class object

b) Derived class pointer object can’t point to a base class object

c) A derived class can’t have pointer objects

d) A base class can’t have pointer objects

Answer: B

20 Out of the below written, which is not a member of the class?

a) Static function

b) Friend function
309
c) Constant function

d) Virtual function

Answer: B

21 What of the below written name used for functions inside a class?

a) Member variables

b) Member functions

c) Class functions

d) Class variables

Answer: B

22 Which of the below written cannot be a friend?

a) Function

b) Class

c) Object

d) Operator function

Answer: C

23 How reference is different from pointers?

a) A reference cannot be made null


310
b) A reference cannot be changed once initialized

c) No extra operator is needed for dereferencing of a reference

d) All of the mentioned

Answer: D

24 Which of the below written provides a programmer with the facility of using
object of a class inside other some other classes?

a) Inheritance

b) Composition

c) Abstraction

d) Encapsulation

Answer: B

25 How many types of polymorphism are available there in C++?

a) 1

b) 2

c) 3

d) 4

Answer: B

311
26 How run-time polymorphisms are implemented using C++?

a) Using Inheritance

b) Using Virtual functions

c) Using Templates

d) Using Inheritance and Virtual functions

Answer: D

27 How compile-time polymorphism is implemented in C++?

a) Using Inheritance

b) Using Virtual functions

c) Using Templates

d) Using Inheritance & Virtual functions

Answer: C

28 Which of the below written is an abstract data type?

a) int

b) float

c) class

d) string

Answer: C
312
29 Which of the below written concept means that addition of new components to
a program as it runs?

a) Data hiding

b) Dynamic binding

c) Dynamic loading

d) Dynamic typing

Answer: C

30 Which of the below written explains the overloading of functions?

a) Virtual polymorphism

b) Transient polymorphism

c) Ad-hoc polymorphism

d) Pseudo polymorphism

Answer: C

31 Which of the below written approach is used by C++?

a) Top-down

b) Bottom-up

c) Left-right

d) Right-left

313
Answer: B

32 Which of the below written operator is overloaded for a cout object?

a) >>

b) <<

c) <

d) >

Answer: B

33 Which of the below written cannot be used with the virtual keyword?

a) Class

b) Member functions

c) Constructors

d) Destructors

Answer: C

34 Which of the below written concept is used to implement late binding?

a) Virtual functions

b) Operator functions

c) Constant functions

d) Static functions
314
Answer: A

35 Which of the below written is correct?

a) C++ allows static type checking

b) C++ allows dynamic type checking.

c) C++ allows static member function to be of type const.

d) C++ allows both static and dynamic type checking

Answer: D

36 Which of the below written supports the concept that reusability is a desirable
feature of a language?

a) It reduces the testing time

b) It reduces maintenance cost

c) It decreases the compilation time

d) It reduced both testing and maintenance time

Answer: D

37 Which of the below written is a static polymorphism mechanism?

a) Function overloading

b) Operator overloading

315
c) Templates

d) All of the mentioned

Answer: D

38 Which of the below written is true?

I) Any operators in C++ can be overloaded.

II) The main meaning of an operator can be changed.

a) I only

b) II only

c) Both I and II

d) Neither I nor II

Answer: D

39 Which of the below written is not a type of inheritance?

a) Multiple

b) Multilevel

c) Distributive

d) Hierarchical

Answer: C

316
40 What will happen if a class does not have a name?

a) It will not have a constructor

b) It will not have a destructor

c) It is not allowed

d) It will neither have a constructor or destructor

Answer: B

41 Which of the below written members are inherited but are not accessible in any
case?

a) Private

b) Public

c) Protected

d) Both private and protected

Answer: A

42 Which of the below written is correct?

a) Friend functions can access public members of any class

b) Friend functions can access protected members of any class

c) Friend functions can access private members of a class

d) All of the mentioned

317
Answer: D

43 Which of the below written is correct in C++?

a) Classes cannot have protected data members

b) Structures can have member functions

c) Class members are public by default

d) Structure members are private by default

Answer:

44 Which of the below written is used to make an abstract class?

a) By using virtual keyword in front of a class declaration

b) By using an abstract keyword in front of a class declaration

c) By declaring a virtual function in a class

d) By declaring a pure virtual function in a class

Answer: D

45 Which of the below written is correct?

a) A class is an instance of its objects

b) An object is an instance of its class

c) A class is an instance of the type of data

d) An object is an instance of the data type of the class


318
Answer: B

46 What is meaning of latency time?

a. Time taken by read or write head mechanism to position itself over correct
cylinder

b. Time taken to transfer a data from memory

c. Time taken by appropriate sector to come under read/write head

d. None of above

47 What is meaning of virtual inheritance?

a) C++ property to avoid multiple copies of the base class into children/derived
class

b) C++ property to avoid multiple inheritances of classes

c) C++ property to enhance multiple inheritance

d) C++ property to ensure that a private member of the base class can be accessed
somehow

Answer: A

49 Which of the below written data type is used to represent the absence of various
parameters?

319
a) int

b) short

c) void

d) float

Answer: C

50 Which of the below written is the best suited to represent the logical value?

a) integer

b) boolean

c) character

d) float

Answer: B

51 When any language is capable to make new data type mean, it can be known as

a) overloaded

b) extensible

c) encapsulated

d) reprehensible

Answer: B

320
52 Which of the below is the correct definition of any array?

a) An array is a series of similar elements in contiguous memory locations

b) An array is a series of element

c) Array is a series of elements in non-contiguous memory locations

d) An array is an element of the different type

Answer: A

53 Which of the below written operator is having the right to left association in the
following?

a) Array subscripting

b) Function call

c) Addition and subtraction

d) Type cast

Answer: D

54 Which of the below written operator is having the highest precedence?

a) postfix

b) unary

c) shift

d) equality

321
Answer: A

55 Which of the below written is the use of dynamic_cast operator?

a) it converts virtual base class to derived class

b) it converts virtual base object to derived objects

c) it will convert the operator based on precedence

d) it converts the virtual base object to derived class

Answer: A

56 Which of the below written sequences of statements present in c++?

a) 4

b) 3

c) 5

d) 6

Answer: C

57 If..else statement can be replaced by which of the below operator?

a) Bitwise operator

b) Conditional operator

c) Multiplicative operator

d) Addition operator
322
Answer: B

58 How many types of loops are available there in C++?

a) 4

b) 2

c) 3

d) 1

Answer: A

59 Which of the below written looping process is best used when number of
iterations is known?

a) for

b) while

c) do-while

d) all looping processes need that the iterations be known

Answer: A

60 Which of the below written is the default return value of functions in C++?

a) int

b) char

323
c) float

d) void

Answer: A

62 What is meaning of inline function?

a) A function that expands at each call during execution

b) A function that is called during compile time

c) A function that is not checked for syntax errors

d) A function that is not monitered for semantic analysis

Answer: A

63 An inline function is expanded during which one from below:

a) compile-time

b) run-time

c) never expanded

d) end of the program

Answer: A

65 Where should be default parameter appears in any function prototype?

a) Rightmost side of the parameter list


324
b) Leftmost side of the parameter list

c) Anywhere inside the parameter list

d) Middle of the parameter list

Answer: A

66 If an argument from parameter list of any function is defined constant then


which of the below written is correct?

a) It can be modified inside the function

b) It cannot be modified inside the function

c) Error occurs

d) Segmentation fault

Answer: B

67 Which of the below written feature is used in function overloading & function
with default argument?

a) Encapsulation

b) Polymorphism

c) Abstraction

d) Modularity

Answer: B

325
68 Which one of the below written is the correct syntax of including a user defined
header file of C++?

a) #include <userdefined.h>

b) #include <userdefined>

c) #include “userdefined”

d) #include [userdefined]

Answer: C

69 In which of the below written, we cannot overload the function?

a) return function

b) caller

c) called function

d) main function

Answer: A

70 Function overloading is also similar to which of the below written?

a) operator overloading

b) constructor overloading

c) destructor overloading

d) function overloading

326
Answer: B

71 Which one of the below written is called address operator?

a) *

b) &

c) _

d) %

Answer: B

72 What is meaning of actual parameters in C++?

a) Parameters with which functions are called

b) Parameters which are used in the definition of a function

c) Variables other than passed parameters in a function

d) Variables that are never used in the function

Answer: A

73 What should be passed in the parameter when function does not need any
parameter?

a) void

b) blank space

c) both void and blank space

327
d) tab space

Answer: B

74 What is meaning of escape sequences?

a) Set of characters that convey special meaning in a program

b) Set of characters that whose use are avoided in C++ programs

c) Set of characters that are used in the name of the main function of the program

d) Set of characters that are avoided in cout statements

Answer: A

75 What of the below written is the return type conversion operator?

a) void

b) int

c) float

d) no return type

Answer: D

76 Which one of the below written is called extraction/get from operator?

a) <<

b) >>
328
c) >

d) <

Answer: B

77 Total how many parameters, conversion operator takes?

a) 0

b) 1

c) 2

d) Not Fixed

Answer: A

78 Which of the below written rule will not affect the friend function?

a) private & protected members of any class cannot be accessed from outside

b) private & protected member can be accessed wherever required

c) protected member can be accessed anywhere

d) private member can be accessed anywhere

Answer: A

79 Which keyword from below written is used to declare the friend function?

a) firend
329
b) friend

c) classfriend

d) myfriend

Answer: B

80 What will be the syntax of friend function?

a) friend class1 Class2;

b) friend class;

c) friend class

d) friend class()

Answer: A

81 Wrapping data and its various functionality into a single entity is popularly
called:

a) Abstraction

b) Encapsulation

c) Polymorphism

d) Modularity

Answer: B

82 Where is the appropriate place for keyword ‘friend’?

330
a) function declaration

b) function definition

c) main function

d) block function

Answer: A

83 From where derived class is derived?

a) derived

b) base

c) both derived & base

d) class

Answer: B

85 Which of the below written can derive class inherit?

a) members

b) functions

c) both members & functions

d) classes

Answer: C

331
86 Which of the below written operator is used to declare destructor?

a) #

b) ~

c) @

d) $

Answer: B

87 Which of the below written constructor will initialize the base class data
member?

a) derived class

b) base class

c) class

d) derived & base class

Answer: B

88 which of the below written class is used to design the base class?

a) abstract class

b) derived class

c) base class

d) derived & base class

332
Answer: A

89 Which of the below written is used to create a pure virtual function?

a) $

b) =0

c) &

d) !

Answer: B

90 Which of the below written is also called as abstract class?

a) virtual function

b) pure virtual function

c) derived class

d) base class

Answer: B

91 What is meaning of pure virtual function?

a) Function which has no definition of own

b) Function which has no definition of its own

c) Function which does not have any return type

d) Function which has no return type & own definition


333
Answer: A

92 Select the correct option from option below.

a) One can’t make an instance of any abstract base class

b) One can make an instance of an abstract base class

c) One can make an instance of an abstract super class

d) One can make an instance of any abstract derived class

Answer: A

93 Where we use abstract class?

a) base class only

b) derived class

c) both derived and base class

d) virtual class

Answer: A

94 What is correct about abstract class in the C++ programs?

a) Class specifically used as base class with at least one virtual function.

b) Class specifically used as base class with at least one pure virtual functions

c) Class from which any class is derived


334
d) Any Class in C++ is an abstract class

Answer: B

95 What is meaning of pure virtual function in C++?

a) Virtual function defined in the base class

b) Virtual function declared in the base class

c) Any function in a class

d) A function without definition in the base class

Answer: B

97 Which of the below written statement about pure virtual functions?

a) They must be defined inside a base class

b) Keyword should be used to declare pure virtual function

c) Pure virtual function should be implemented in derived classes

d) Pure virtual function cannot implemented in derived classes

Answer: C

99 Which of the below written keyword is used to handle the exception?

a) try

b) throw
335
c) catch

d) handler

Answer: C

100 Which of the below is used to throw a exception?

a) throw

b) try

c) catch

d) handler

Answer: A

103 Which of the below written exception is thrown by dynamic_cast?

a) bad_cast

b) bad_typeid

c) bad_exception

d) bad_alloc

Answer: A

104 What will be output of below program?

int main()
336
{

int a=10;

int b,c;

b = a++;

c = a;

cout<<a<<b<<c;

return 0;

(A) 111011

(B) 111111

(C) 101011

(D) 101010

Answer: A

105 What will be output?

int main()

int a = 10;

cout<<a++;

return 0;

}
337
(A) 10

(B) 11

(C) 12

(D) Not defined

Answer: A

106 What is output of below program?

int main()

const int a=10;

a++;

cout<<a;

return 0;

(A) 10

(B) 11

(C) Compilation Error

(D) Linking Error

Answer: C
338
107 How many times STET-EXAM is printed?

int main()

int i=0;

lbl:

cout<<"STET-EXAM";

i++;

if(i<5)

goto lbl;

return 0;

(A) Error

(B) 5 times

(C) 4 times

(D) 6 times

Answer: B

108 What should be the output of below program?


339
int main()

int a=10;

cout<<a++;

return 0;

(A) 11

(B) 10

(C) Error

(D) 0

Answer: B

109 what will be output?

#include <iostream>

using namespace std;

int main() {

cout << "STET BELTRON";

cout << "I am learning C++";

return 0;

(A) STET BELTRONI am learning C++


340
(B) STET BELTRON

(C) Error

(D) 0

Answer: A

110 what will be output of program written below?

#include <iostream>

using namespace std;

int main() {

int sum1 = 200 + 50;

int sum2 = sum1 + 250;

int sum3 = sum2 + sum2;

cout << sum1 << "\n";

cout << sum2 << "\n";

cout << sum3;

return 0;

(A)

250

500

750

(B) 750
341
(C) 500

(D) Error

Answer: A

111 what will be output of program below written?

#include <iostream>

#include <string>

using namespace std;

int main () {

string firstName = "Anand";

string lastName = "Kishore";

string fullName = firstName + lastName;

cout << fullName;

return 0;

(A) Anand Kishore

(B) Anand

(C) Error

(D) 0

Answer: A
342
112 What will be output?

#include <iostream>

#include <string>

using namespace std;

int main () {

string x = "20";

string y = "30";

string z = x + y;

cout << z;

return 0;

(A) 20

(B) 30

(C) 50

(D) 2030

Answer: D

113 what will be output?

#include <iostream>

#include <string>
343
using namespace std;

int main() {

string txt = "BIHARBOARD";

cout << "The length of the txt string is: " << [Link]();

return 0;

(A) BIHARBOARD

(B) The length of the txt string is: 10

(C) 10

(D) Error

Answer: B

114 What will be output?

#include <iostream>

#include <string>

using namespace std;

int main() {

string fullName;

cout << "REAL NAME: ";

getline (cin, fullName);

cout << "Your name is: " << fullName;


344
return 0;

(A) TYPE NAME

(B) REAL NAME

(C) AMIT

(D) Error

Answer: B

115 What will be output?

#include <iostream>

#include <cmath>

using namespace std;

int main() {

cout << sqrt(81) << "\n";

return 0;

(A) 81

(B) 9

(C) 0

(D) Error

Answer: B

345
116 What will be output?

#include <iostream>

using namespace std;

int main() {

int x = 30;

int y = 28;

if (x > y) {

cout << "x is greater than y";

return 0;

(A) y is greater than x

(B) x is greater than y

(C) 0

(D) Error

Answer: B

117 What will be output?

#include <iostream>

using namespace std;

int main() {

int time = 30;


346
if (time < 28) {

cout << "Good day.";

} else {

cout << "Good evening.";

return 0;

(A) Good evening

(B) Good Day

(C) 0

(D) Error

Answer: A

118 what will be output of program?

#include <iostream>

using namespace std;

int main() {

int time = 32;

if (time < 20) {

cout << "Good morning.";

} else if (time < 35) {

cout << "Good day.";


347
} else {

cout << "Good evening.";

return 0;

(A) Good evening

(B) Good Day

(C) 0

(D) Error

Answer: A

119 what will be output?

#include <iostream>

using namespace std;

int main() {

int day = 4;

switch (day) {

case 6:

cout << "Today is Saturday";

break;

case 7:

cout << "Today is Sunday";


348
break;

default:

cout << "STET RESULT";

return 0;

(A) Today is Saturday

(B) Today is Sunday

(C) STET RESULT

(D) Error

Answer: C

120 What will be output?

#include <iostream>

using namespace std;

int main() {

int i = 0;

do {

cout << i << "\n";

i++;

}
349
while (i < 5);

return 0;

(A)

(B) 01234

(C) 012345

(D) Error

Answer: A

121 What will be output?

#include <iostream>

using namespace std;

int main() {

for (int i = 0; i <= 8; i = i + 2) {

cout << i << "\n";


350
}

return 0;

(A)0

(B) 02468

(C) 012345

(D) Error

Answer: A

122 What will be output?

#include <iostream>

using namespace std;

int main() {

int i = 0;

while (i < 8) {

if (i == 4) {

i++;
351
continue;

cout << i << "\n";

i++;

return 0;

(A) 0

(B) 01234567

(C) 0

(D) Error

Answer: A

123 What will be output?

#include <iostream>

#include <string>
352
using namespace std;

int main() {

string books[4] = {"phy", "che", "math", "eng"};

cars[0] = "Opel";

cout << cars[0];

return 0;

(A) books

(B) phy che math eng

(C) Opel

(D) Error

Answer: C

124 What will be output?

#include <iostream>

#include <string>

using namespace std;

int main() {

string cars[4] = {"Volvo", "BMW", "Maruti", "Mazda"};

for(int i = 0; i < 4; i++) {

cout << i << ": " << cars[i] << "\n";


353
}

return 0;

(A) 0: Volvo

1: BMW

2: Maruti

3: Mazda

(B) CARS

(C) 0

(D) Error

Answer: A

125 What will be output?

#include <iostream>

#include <string>

using namespace std;

int main() {

string food = "Biryani";

string &meal = food;

cout << food << "\n";

cout << meal << "\n";


354
return 0;

(A) Biryani

Biryani

(B) Biryani Biryani

(C) 0

(D) Error

Answer: A

126 What will be output of program?

#include <iostream>

#include <string>

using namespace std;

int main() {

string food = "BIRYANI";

string* ptr = &food;

cout << food << "\n";

cout << &food << "\n";

cout << ptr << "\n";

return 0;

(A) BIRYANI
355
0x6dfed4

0x6dfed4

(B) BIRYANI 0x6dfed4 0x6dfed4

(C) 0

(D) Error

Answer: A

127 What will be output of program?

#include <iostream>

#include <string>

using namespace std;

int main() {

string food = "Biryani";

string* ptr = &food;

cout << ptr << "\n";

cout << *ptr << "\n";

return 0;

(A) 0x6dfed4

Biryani

(B) 0x6dfed4 Biryani


356
(C) 0

(D) Error

Answer: A

128 What will be output?

#include <iostream>

using namespace std;

void myFunction();

int main() {

myFunction();

return 0;

void myFunction() {

cout << "STET!";

(A) 0

(B) STET!

(C) MyFunction

(D) Error

Answer: B
357
129 What will be output?

#include <iostream>

#include <string>

using namespace std;

void myFunction(string fname) {

cout << fname << " Refsnes\n";

int main() {

myFunction("Anil");

myFunction("Suraj");

myFunction("Vijay");

return 0;

(A) 0

(B) Anil refsnes

Suraj refsnes

Vijay refsnes

(C) MyFunction

(D) Error

358
130 What will be output?

#include <iostream>

#include <string>

using namespace std;

void myFunction(string country = "Nepal") {

cout << country << "\n";

int main() {

myFunction("Slovakia");

myFunction("India");

myFunction();

myFunction("USA");

return 0;

(A) 0

(B) Slovakia

India

Nepal

USA

(C) MyFunction

(D) Error

359
Answer: B

131 What will be output of program?

#include <iostream>

#include <string>

using namespace std;

void myFunction(string fname, int age) {

cout << fname << " Refsnes. " << age << " years old. \n";

int main() {

myFunction("Ajay", 3);

myFunction("Vinod", 14);

myFunction("Anjana", 30);

return 0;

(A)Ajay Refsnes. 3 years old.

Vinod Refsnes. 14 years old.

Anjana Refsnes. 30 years old.

(B)Liam Refsnes. 3 years old.

(C)Error

(D)0

Answer: A
360
132 What will be output?

#include<iostream>

using namespace std;

void main() {

char s[] = "STET";

cout<<s<<" ";

s++;

cout<<s<<" ";

a)STET STET

b)C++ ++

c)++ ++

d)Compile error will come

Answer: D

133 What will be Output?

#include<iostream>

#include<string.h>

using namespace std;

main() {
361
cout<<strcmp("strcmp()","strcmp()");

a) 0

b)100

c)10000

d)Invalid usage of strcmp() function

Answer: A

134 What will be output?

#include <iostream>

using namespace std;

class MyClass {

public:

int x;

private:

int y;

};

int main() {

MyClass myObj;

myObj.x = 50;
362
myObj.y = 75;

return 0;

(A) 50 75

(B) 50

75

(C) 0

(D) ERROR

Answer: D

135 What will be output?

#include <iostream>

using namespace std;

class Employee {

private:

int salary;

public:

void setSalary(int p) {

salary = p;

int getSalary() {
363
return salary;

};

int main() {

Employee myObj;

[Link](80000);

cout << [Link]();

return 0;

(A) 8000

(B) 80000

(C) 0

(D) ERROR

Answer: B

136 What will be output?

#include <iostream>

#include <string>

using namespace std;

class Vehicle {

public:
364
string brand = "Ford";

void honk() {

cout << "Tuut, tuut! \n" ;

};

class Car: public Vehicle {

public:

string model = "Shovik";

};

int main() {

Car myCar;

[Link]();

cout << [Link] + " " + [Link];

return 0;

(A) Tuut, tuut!

Ford Shovik

(B) Tuut, tuut!

(C) 0

(D) ERROR

365
Answer: A

137 What will be output?

#include <iostream>

using namespace std;

class MyClass {

public:

void myFunction() {

cout << "Bihar STET Exam." ;

};

// Child class

class MyChild: public MyClass {

};

class MyGrandChild: public MyChild {

};

int main() {

MyGrandChild myObj;

[Link]();

return 0;

366
(A) Bihar STET Exam

(B) Some content

(C) 0

(D) ERROR

Answer: A

138 What will be output?

#include <iostream>

#include <string>

using namespace std;

// Base class

class Animal {

public:

void animalSound() {

cout << " This is how animal speaks \n" ;

};

// Derived class

class Pig : public Animal {

public:

void animalSound() {

cout << "The goat says: mee mee \n" ;


367
}

};

//This is Derived class

class Dog : public Animal {

public:

void animalSound() {

cout << "The cat says: mew mew \n" ;

};

int main() {

Animal myAnimal;

Pig myPig;

Dog myDog;

[Link]();

[Link]();

[Link]();

return 0;

(A) This is how animal speaks


368
The goat says: mee mee

The cat says: mew mew

(B) The animal makes a sound

(C) 0

(D) ERROR

Answer: A

139 What will be output?

#include <iostream>

using namespace std;

int main() {

int x = 6;

int y = 7;

int sum = x + y;

cout << sum;

return 0;

(A) 1

(B) 13

(C) 0

(D) ERROR
369
Answer: B

140 What will be output?

#include <iostream>

#include <string>

using namespace std;

int main() {

string vans[4] = {"Bajaj", "Chetak", "Hero", "Honda"};

cars[0] = "Opel";

cout << cars[0];

return 0;

(A) Vans

(B) Bajaj Chetak Hero Honda

(C) Opel

(D) Error

Answer: C

370
371

Common questions

Powered by AI

Violating integrity constraints during database transactions can lead to disallowed updates to maintain data consistency and integrity. This can prevent records from being incorrectly updated or deleted, thus preserving relationships and data accuracy .

The physical layer is crucial in network communications as it is responsible for the physical transmission of data through bit-by-bit delivery over a physical medium. It defines the electrical, mechanical, and procedural specifications for hardware .

The transport layer is responsible for process-to-process delivery and uses port addresses to identify processes on a host, ensuring data is delivered error-free and in sequence. The session layer, in the OSI model, manages sessions between applications, providing synchronization and dialog control. It links support layers to enhance communication .

Arrays are not suitable for storing non-homogeneous data elements because they are designed for data types that are uniform, benefiting from direct access and efficient memory allocation. For non-homogeneous data, structures like linked lists offer more flexibility .

File systems for storing data tend to suffer from data redundancy and inconsistency, difficulty in accessing data, and data isolation. These issues can lead to inefficient data retrieval and discrepancies in data integrity .

The Join operation combines two relations by merging pairs of tuples, one from each relation, into a single tuple, whereas the Union operation combines two 'similarly structured' tables by forming a set union, joining tuples with matching schemas .

A database table on the 'many' side of a one-to-many or many-to-many relationship must have a composite key to ensure the uniqueness of each record and properly represent the relationships between entities. This encompasses multiple columns that, together, enforce uniqueness .

A stack is significant due to its LIFO (Last In First Out) principle, useful for operations like backtracking, parsing, and recursion. However, it is not ideal for scheduling tasks that require FIFO processing, such as job scheduling, where a queue would be more appropriate .

The Fourth Normal Form (4NF) eliminates multi-valued dependencies by ensuring that a relation is in BCNF and that no non-trivial multi-valued dependencies exist unless they are a superkey, thus reducing redundancy and improving database structure .

A schema diagram is crucial because it provides a visual representation of the database structure, showing tables (relations), attributes, and keys, which helps in understanding and designing the database architecture effectively. It aids in identifying relationships and dependencies among data .

You might also like