KEMBAR78
Mock Test PDF | PDF | Computer Network | Class (Computer Programming)
0% found this document useful (0 votes)
12 views137 pages

Mock Test PDF

The document is a mock test for Computer Science covering various topics related to C++ programming, database management systems, and data structures. It includes multiple-choice questions along with correct answers and explanations for each question. The content is designed to assess knowledge in programming concepts, database functionalities, and data structure principles.

Uploaded by

niftyhawking
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)
12 views137 pages

Mock Test PDF

The document is a mock test for Computer Science covering various topics related to C++ programming, database management systems, and data structures. It includes multiple-choice questions along with correct answers and explanations for each question. The content is designed to assess knowledge in programming concepts, database functionalities, and data structure principles.

Uploaded by

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

Scanned with CamScanner

Scanned with CamScanner


Scanned with CamScanner
Scanned with CamScanner
Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

STET 2023 (COMPUTER SCIENCE) Mock Test-1


1. Who invented C++?
a) Dennis Ritchie
b) Ken Thompson
c) Brian Kernighan
d) Bjarne Stroustrup

Answer: d
Explanation: Bjarne Stroustrup is the original creator of C++ in 1979 at AT&T Bell Labs.
2. What is C++?
a) C++ is an object oriented programming language
b) C++ is a procedural programming language
c) C++ supports both procedural and object oriented programming language
d) C++ is a functional programming language

Answer: c
Explanation: C++ supports both procedural(step by step instruction) and object oriented
programming (using the concept of classes and objects).
3. Which is more effective while calling the C++ functions?
a) call by object
b) call by pointer
c) call by value
d) call by reference

Answer: d
Explanation: In the call by reference, it will just passes the reference of the memory
addresses of passed values rather than copying the value to new memories which
reduces the overall time and memory use.
4. Which of the following is used to terminate the function declaration in C++?
a) ;
b) ]
c) )
d) :

Answer: a
Explanation: ; semicolon is used to terminate a function declaration statement in C++.
5. The C++ code which causes abnormal termination/behaviour of a program
should be written under _________ block.
a) catch
b) throw
c) try
d) finally

Answer: c
Explanation: Code that leads to the abnormal termination of the program should be
written under the try block.
6. Which of the following class allows to declare only one object of it?
a) Abstract class

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) Virtual class
c) Singleton class
d) Friend class

Answer: c
Explanation: Singleton class allows the programmer to declare only one object of it, If
one tries to declare more than one object the program results into error.
7. Which of the following is not a type of Constructor?
a) Friend constructor
b) Copy constructor
c) Default constructor
d) Parameterized constructor

Answer: a
Explanation: Friend function is not a constructor whereas others are a type of
constructor used for object initialization.
8. Which operator is overloaded for a cout object?
a) >>
b) <<
c) <
d) >

Answer: b
Explanation: cout in C++ uses << operator to print anything so << operator is overloaded
for a cout object.
9. Which of the following cannot be used with the virtual keyword?
a) Class
b) Member functions
c) Constructors
d) Destructors

Answer: c
Explanation: Virtual keyword cannot be used with constructors as constructors are
defined to initialized an object of particular class hence no other class needs constructor
of other class.
10. Which concept is used to implement late binding?
a) Virtual functions
b) Operator functions
c) Constant functions
d) Static functions

Answer: a
Explanation: Virtual functions are used to implement the concept of late binding i.e.
binding actual functions to their calls.
11. Which of the following 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.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) C++ allows both static and dynamic type checking

Answer: d
Explanation: C++ allows both static and dynamic type checking i.e. types are checked
by the compiler.
12. Which of the following computer language is written in binary codes only?
a) pascal
b) machine language
c) C
d) C#

Answer: b
Explanation: Machine Language is written in binary codes only. It can be easily
understood by the computer and is very difficult for us to understand. A machine
language, unlike other languages, requires no translators or interpreters.
13. Which of the following is the brain of the computer?
a) Central Processing Unit
b) Memory
c) Arithmetic and Logic unit
d) Control unit

Answer: a
Explanation: The CPU is referred to as the brain of a computer.
It consists of a control unit and an arithmetic and logic unit. It is responsible for
performing all the processes and operations.
14. Which of the following is not a characteristic of a computer?
a) Versatility
b) Accuracy
c) Diligence
d) I.Q.

Answer: d
15. What is the full form of DBMS?
a) Data of Binary Management System
b) Database Management System
c) Database Management Service
d) Data Backup Management System

Answer: b
Explanation: DBMS is abbreviated as Database Management System. Database
Management System stores the data and allows authorized users to manipulate and
modify the data.
16. What is a database?
a) Organized collection of information that cannot be accessed, updated, and managed
b) Collection of data or information without organizing
c) Organized collection of data or information that can be accessed, updated, and
managed
d) Organized collection of data that cannot be updated

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: c
Explanation: It is defined as an organized collection of data or information for easy
access, updating, and management in a computer.
17. Which type of data can be stored in the database?
a) Image oriented data
b) Text, files containing data
c) Data in the form of audio or video
d) All of the above

Answer: d
Explanation: The reason for creating the database management system was to store
large data and these data can be of any form image, text, audio, or video files, etc.
DBMS allows the users to store and access the data of any format.
18. In which of the following formats data is stored in the database management
system?
a) Image
b) Text
c) Table
d) Graph

Answer: c
Explanation: The data is stored in a table format intended to manage the storage of data
and manipulate stored data to generate information.
19. Which of the following is not a type of database?
a) Hierarchical
b) Network
c) Distributed
d) Decentralized

Answer: d
Explanation: Different types are:
1) Centralized
2) Distributed
3) Relational
4) NoSQL
5) Cloud
6) Object-oriented
7) Hierarchical
8) Network
20. Which of the following is not an example of DBMS?
a) MySQL
b) Microsoft Acess
c) IBM DB2
d) Google

Answer: d
Explanation: MySQL, Microsoft Access, IBM DB2 are database management systems
while Google is a search engine. MySQL is a Linux-based database management
system, Microsoft Access is a tool that is a part of Microsoft Office used to store data,
IBM DB2 is a database management system developed by IBM. Google’s Bigtable is the

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

database that runs Google’s Internet search, Google Maps, YouTube, Gmail, and other
products.
21. Which of the following is not a feature of DBMS?
a) Minimum Duplication and Redundancy of Data
b) High Level of Security
c) Single-user Access only
d) Support ACID Property

Answer: c
Explanation: Single-user Access only” is not a feature of DBMS. DBMS allows multiple
users to access and manipulate the database concurrently. It provides mechanisms to
handle concurrent access and ensure data consistency and integrity among multiple
users.
The important features of a database management system are:

 Minimum Duplication and Redundancy of Data


 High Level of Security
 Mulitple-user Access
 Support ACID Property

22. Which of the following is a function of the DBMS?


a) Storing data
b) Providing multi-users access control
c) Data Integrity
d) All of the above

Answer: d
Explanation: The purpose of creating DBMS was to store the data. The data stored in
the database management system can be can accessed by multiple users if the access
is provided. The data stored will be accurate and complete hence providing data
integrity.

23. Which of the following is a component of the DBMS?


a) Data
b) Data Languages
c) Data Manager
d) All of the above

Answer: d
Explanation: The components of DBMS are as follows:
1) Hardware: Like a hard drive, monitor, etc.
2) Software: Provides a user interface
3) Data Manager: Manages operations of DBMS.
4) Data: The collection of information on the DB is known as data.
5) Data Languages: Languages like DDL, DML, DAL, and DCL allow to perform
operations like creating, modifying, storing, or retrieving data.

24.

SELECT name ____ instructor name, course id

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

FROM instructor, teaches


WHERE instructor.ID= teaches.ID;
Which keyword must be used here to rename the field name?
a) From
b) Rename
c) As
d) Join

Answer: c
Explanation: As keyword is used to rename.
25.

SELECT emp_name
FROM department
WHERE dept_name LIKE ’ _____ Computer Science’;

Which one of the following has to be added into the blank to select the dept_name
which has Computer Science as its ending string?
a) %
b) _
c) ||
d) $

Answer: a
Explanation: The % character matches any substring.
26.

SELECT name
FROM instructor
WHERE dept name = ’Physics’
ORDER BY name;

By default, the order by clause lists items in ______ order.


a) Descending
b) Any
c) Same
d) Ascending

Answer: d
Explanation: Specification of descending order is essential but it not for ascending.
27. The ______ format is usually used to store data.
a) BCD
b) Decimal
c) Hexadecimal
d) Octal

Answer: a
Explanation: The data usually used by computers have to be stored and represented in
a particular format for ease of use.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

28. The 8-bit encoding format used to store data in a computer is ______
a) ASCII
b) EBCDIC
c) ANCI
d) USCII

Answer: b
Explanation: The data to be stored in the computers have to be encoded in a particular
way so as to provide secure processing of the data.
29. A source program is usually in _______
a) Assembly language
b) Machine level language
c) High-level language
d) Natural language

Answer: c
Explanation: The program written and before being compiled or assembled is called as a
source program.
30. Which memory device is generally made of semiconductors?
a) RAM
b) Hard-disk
c) Floppy disk
d) Cd disk

Answer: a
Explanation: Memory devices are usually made of semiconductors for faster
manipulation of the contents.
31. The small extremely fast, RAM’s are called as _______
a) Cache
b) Heaps
c) Accumulators
d) Stacks

Answer: a
Explanation: These small and fast memory devices are compared to RAM because they
optimize the performance of the system and they only keep files which are required by
the current process in them
32. The ALU makes use of _______ to store the intermediate results.
a) Accumulators
b) Registers
c) Heap
d) Stack

Answer: a
Explanation: The ALU is the computational center of the CPU. It performs all
mathematical and logical operations. In order to perform better, it uses some internal
memory spaces to store immediate results.
33. The control unit controls other units by generating ___________
a) Control signals

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) Timing signals
c) Transfer signals
d) Command Signals

Answer: b
Explanation: This unit is used to control and coordinate between the various parts and
components of the CPU.
34. To reduce the memory access time we generally make use of ______
a) Heaps
b) Higher capacity RAM’s
c) SDRAM’s
d) Cache’s

Answer: d
Explanation: The time required to access a part of the memory for data retrieval.
35. ______ is generally used to increase the apparent size of physical memory.
a) Secondary memory
b) Virtual memory
c) Hard-disk
d) Disks

Answer: b
Explanation: Virtual memory is like an extension to the existing memory.
36. What is a data structure?
a) A programming language
b) A collection of algorithms
c) A way to store and organize data
d) A type of computer hardware

Answer: c
Explanation: A data structure is a way to store and organize data efficiently, enhancing
access and manipulation, unlike programming languages, algorithms, or computer
hardware.
37. What are the disadvantages of arrays?
a) Index value of an array can be negative
b) Elements are sequentially accessed
c) Data structure like queue or stack cannot be implemented
d) There are chances of wastage of memory space if elements inserted in an array are
lesser than the allocated size

Answer: d
Explanation: Arrays are of fixed size. If we insert elements less than the allocated size,
unoccupied positions can’t be used again. Wastage will occur in memory.
38. Which data structure is used for implementing recursion?
a) Stack
b) Queue
c) List
d) Array

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: a
Explanation: Stacks are used for the implementation of Recursion.
39. The data structure required to check whether an expression contains a
balanced parenthesis is?
a) Queue
b) Stack
c) Tree
d) Array

Answer: b
Explanation: The stack is a simple data structure in which elements are added and
removed based on the LIFO principle. Open parenthesis is pushed into the stack and a
closed parenthesis pops out elements till the top element of the stack is its
corresponding open parenthesis. If the stack is empty, parenthesis is balanced
otherwise it is unbalanced.
40. Which data structure is needed to convert infix notation to postfix notation?
a) Tree
b) Branch
c) Stack
d) Queue

Answer: c
Explanation: The Stack data structure is used to convert infix expression to postfix
expression. The purpose of stack is to reverse the order of the operators in the
expression. It also serves as a storage structure, as no operator can be printed until both
of its operands have appeared.
41. The prefix form of A-B/ (C * D ^ E) is?
a) -A/B*C^DE
b) -A/BC*^DE
c) -ABCD*^DE
d) -/*^ACBDE

Answer: a
Explanation: Infix Expression is (A-B)/(C*D^E)
(-A/B)(C*D^E)
-A/B*C^DE. Thus prefix expression is -A/B*C^DE.
42. Which data structure is based on the Last In First Out (LIFO) principle?
a) Tree
b) Linked List
c) Stack
d) Queue

Answer: c
Explanation: The data structure that follows the Last In First Out (LIFO) principle is the
Stack. It operates like a stack of objects, making it suitable for specific-order
management.
43. Which of the following application makes use of a circular linked list?
a) Recursive function calls
b) Undo operation in a text editor

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

c) Implement Hash Tables


d) Allocating CPU to resources

Answer: d
44. Which of the following is not the type of queue?
a) Priority queue
b) Circular queue
c) Single ended queue
d) Ordinary queue

Answer: c
Explanation: Queue always has two ends. So, single ended queue is not the type of
queue.
45. What is an AVL tree?
a) a tree which is unbalanced and is a height balanced tree
b) a tree which is balanced and is a height balanced tree
c) a tree with atmost 3 children
d) a tree with three children

Answer: b
Explanation: It is a self balancing tree with height difference atmost 1.
46. The optimal data structure used to solve Tower of Hanoi is _________
a) Tree
b) Heap
c) Priority queue
d) Stack

Answer: d
Explanation: The Tower of Hanoi involves moving of disks ‘stacked’ at one peg to
another peg with respect to the size constraint. It is conveniently done using stacks and
priority queues. Stack approach is widely used to solve Tower of Hanoi.
47. Which is the most appropriate data structure for reversing a word?
a) stack
b) queue
c) graph
d) tree

Answer: a
Explanation: Stack is the most appropriate data structure for reversing a word because
stack follows LIFO principle.
48. Which of the following devices forwards packets between networks by
processing the routing information included in the packet?
a) firewall
b) bridge
c) hub
d) router

Answer: d
Explanation: A router is a networking device that forwards data packets between

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

computer networks. Routers perform the traffic directing functions on the Internet. They
make use of routing protocols like RIP to find the cheapest path to the destination.
49. Which of this is not a network edge device?
a) Switch
b) PC
c) Smartphones
d) Servers

Answer: a
Explanation: Network edge devices refer to host systems, which can host applications
like web browser. A switch can’t operate as a host, but as a central device which can be
used to manage network communication.
50. Which type of network shares the communication channel among all the
machines?
a) anycast network
b) multicast network
c) unicast network
d) broadcast network

Answer: d
Explanation: In a broadcast network, information is sent to all stations in a network
whereas in a multicast network the data or information is sent to a group of stations in
the network. In unicast network, information is sent to only one specific station. The
broadcast address of the network is the last assigned address of the network.
51. Which topology requires a multipoint connection?
a) Ring
b) Bus
c) Star
d) Mesh

Answer: b
Explanation: In bus topology, there is a single cable to which all the network nodes are
connected. So whenever a node tries to send a message or data to other nodes, this
data passes through all other nodes in the network through the cable. It is really simple
to install but it’s not secure enough to be used in most of the computer network
applications.
52. What is the term for the data communication system within a building or
campus?
a) MAN
b) LAN
c) PAN
d) WAN

Answer: b
Explanation: LAN is an abbreviation for Local Area Network. This network interconnects
computers in a small area such as schools, offices, residence etc. It is the most versatile
kind of data communication system where most of the computer network concepts can
be visibly used.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

53. What was the name of the first network?


a) ASAPNET
b) ARPANET
c) CNNET
d) NSFNET

Answer: b
Explanation: ARPANET stands for Advanced Research Projects Agency Networks. It
was the first network to be implemented which used the TCP/IP protocol in the year
1969.
54. Which network topology requires a central controller or hub?
a) Ring
b) Bus
c) Star
d) Mesh

Answer: c
Explanation: In star topology, no computer is connected to another computer directly but
all the computers are connected to a central hub. Every message sent from a source
computer goes through the hub and the hub then forwards the message only to the
intended destination computer.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

STET 2023 (COMPUTER SCIENCE) Mock Test-2


1. Which of the following is the correct syntax of including a user defined header
files in C++?
a) #include [userdefined]
b) #include “userdefined”
c) #include <userdefined.h>
d) #include <userdefined>

Answer: b
Explanation: C++ uses double quotes to include a user-defined header file. The correct
syntax of including user-defined is #include “userdefinedname”.
2. Which of the following is used for comments in C++?
a) /* comment */
b) // comment */
c) // comment
d) both // comment or /* comment */

Answer: d
Explanation: Both the ways are used for commenting in C++ programming. // is used for
single line comments and /* … */ is used for multiple line comments.
3. What is Inheritance in C++?
a) Deriving new classes from existing classes
b) Overloading of classes
c) Classes with same names
d) Wrapping of data into a single class

Answer: a
Explanation: Inheritance is the concept of OOPs in which new classes are derived from
existing classes in order to reuse the properties of classes defined earlier.
4. Which of the following symbol is used to declare the preprocessor directives in
C++?
a) $
b) ^
c) #
d) *

Answer: c
Explanation: # symbol is used to declare the preprocessor directives.
5. What is meant by a polymorphism in C++?
a) class having only single form
b) class having four forms
c) class having many forms
d) class having two forms

Answer: c
Explanation: Polymorphism is literally meant class having many forms.
6. Which of the following is correct?
a) Base class pointer object cannot point to a derived class object

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) Derived class pointer object cannot point to a base class object


c) A derived class cannot have pointer objects
d) A base class cannot have pointer objects

Answer: b
Explanation: C++ does not allow a derived class pointer to point a base class pointer
whereas Base class can point to a derived class object. Both base class and derived
class can have pointer objects.
7. Out of the following, which is not a member of the class?
a) Static function
b) Friend function
c) Constant function
d) Virtual function

Answer: b
Explanation: Friend function is not a member of the class. They are given the same
access rights as the class member function have but they are not actual members of the
class.
8. Which of the following is a static polymorphism mechanism?
a) Function overloading
b) Operator overloading
c) Templates
d) All of the mentioned

Answer: d
Explanation: All the options mentioned above uses static polymorphism mechanism. As
the conflicts in all these types of functions are resolved during compile-time.
9. Which of the following is true?
I) All operators in C++ can be overloaded.
II) The basic 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
Explanation: Both statements are false because all the operators of C++ cannot be
overloaded and the basic meaning of an operator cannot be changed, we can only give
new meaning to an operator.
10. Which of the following is not a type of inheritance?
a) Multiple
b) Multilevel
c) Distributive
d) Hierarchical

Answer: c
Explanation: Distributive is not a type of inheritance whereas others are a type of
inheritance having their own meaning.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

11. What happens 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
Explanation: A class without a name will not have a destructor. The object is made so
constructor is required but the destructor is not. Check the code below:
12. Which members are inherited but are not accessible in any case?
a) Private
b) Public
c) Protected
d) Both private and protected

Answer: a
Explanation: Private members of a class are inherited to the child class but are not
accessible from the child class.
13. Which of the following is correct?
a) Friend functions can access public members of a class
b) Friend functions can access protected members of a class
c) Friend functions can access private members of a class
d) All of the mentioned

Answer: d
Explanation: Friend functions can access any member of a class without caring about
the type of member i.e. without caring whether it is private, protected or public.
14. Which of the following 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: b
Explanation: Though C does not allows member functions in structures but C++ allows
structures to have member functions. Members of structures are public by default and
those of classes are private by default. Classes can have protected data members.
15. Which of the following 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
Explanation: Abstract class should have at least one pure virtual function. Therefore to
declare an abstract class one should declare a pure virtual function in a class.
16. Which of the following is correct?
a) A class is an instance of its objects
b) An object is an instance of its class

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

c) A class is an instance of the data type that the class have


d) An object is an instance of the data type of the class

Answer: b
Explanation: An object is an instance of a class i.e. an object represents a class i.e. what
class has(data members) and what it can do(member functions).
17. Which of the following is the smallest unit of data in a computer?
a) Bit
b) KB
c) Nibble
d) Byte

Answer: a
Explanation: A bit is defined as the smallest unit of data in a computer system. It is used
as a short form of Binary Digit. A bit can have only two values 0 or 1. A nibble comprises
4 bits, a byte is a collection of 8 bits whereas KB (Kilobyte) is equal to 1024 bytes.
18. Which of the following unit is responsible for converting the data received
from the user into a computer understandable format?
a) Output Unit
b) Input Unit
c) Memory Unit
d) Arithmetic & Logic Unit

Answer: b
19. Which of the following is not a type of computer code?
a) EDIC
b) ASCII
c) BCD
d) EBCDIC

Answer: a
Explanation: There is no coding scheme like EDIC. EBCDIC stands for Extended Binary
Coded Decimal Interchange Code. BCD stands for Binary Coded Decimal. ASCII stands
for American Standard Code for information interchange.
20. Which of the following is designed to control the operations of a computer?
a) User
b) Application Software
c) System Software
d) Utility Software

Answer: c
Explanation: Software is basically classified into two: System and application. System
Software is designed to control the operations and extend the processing capability of a
computer system.
21. Which of the following is used in EBCDIC?
a) Super Computers
b) Mainframes
c) Machine Codes

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) Programming

Answer: b
Explanation: This concept of EBCDIC was invented by IBM. It is mainly used in the IBM
mainframe environment. So basically, mainframes use EBCDIC codes.
22. Which of the following is the device used for converting maps, pictures, and
drawings into digital form for storage in computers?
a) Image Scanner
b) Digitizer
c) MICR
d) Scanner

Answer: b
Explanation: A digitizer serves the purpose given in the question. Digitizers are generally
used in the area of Computer-Aided Design by architects and engineers to design cars,
buildings, etc.
23. Which of the following can access the server?
a) Web Client
b) User
c) Web Browser
d) Web Server

Answer: a
Explanation: Any computer that has access to the webserver is called the web client. A
web server is any computer that uses the HTTP protocol.
24. Which of the following is known as the language made up of binary-coded
instructions?
a) High level
b) BASIC
c) C
d) Machine

Answer: d
Explanation: The language made up of binary-coded instructions built into the hardware
of a particular computer and used directly by the computer is machine language.
25. Which of the following is known as a set of entities of the same type that share
same properties, or attributes?
a) Relation set
b) Tuples
c) Entity set
d) Entity Relation model

Answer: c
Explanation: In the actual world, an entity is a distinct “thing” or “object” from all other
objects. For example: Each employee of an organization is an entity.
26. What is information about data called?
a) Hyper data
b) Tera data
c) Meta data

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) Relations

Answer: c
Explanation: Information about data is known as Metadata. Metadata describes the data
in detail by providing additional information like type, length of the data, etc. Metadata
helps the user to understand the data.
27. What does an RDBMS consist of?
a) Collection of Records
b) Collection of Keys
c) Collection of Tables
d) Collection of Fields

Answer: c
Explanation: It consists of a collection of tables i.e., the data is organized in tabular
format. The columns of the relation are known as Fields and rows of the relation are
known as fields. Constraints in a relation are known as Keys.
28. The values appearing in given attributes of any tuple in the referencing relation
must likewise occur in specified attributes of at least one tuple in the referenced
relation, according to _____________________ integrity constraint.
a) Referential
b) Primary
c) Referencing
d) Specific

Answer: a
Explanation: Consider 2 relations r1 and r2. r1 may include among its attributes the
primary key of relation r2. This attribute is called a foreign key from r1, referencing r2.
The relation r1 is also called the referencing relation of the foreign key dependency, and
r2 is called the referenced relation of the foreign key.
29. The DBMS acts as an interface between ________________ and
________________ of an enterprise-class system.
a) Data and the DBMS
b) Application and SQL
c) Database application and the database
d) The user and the software

Answer: c
Explanation: A database management system is an application that acts as an interface
between the user and the database. The user interacts with the application to access
data.
30. The ability to query data, as well as insert, delete, and alter tuples, is offered
by ____________
a) TCL (Transaction Control Language)
b) DCL (Data Control Language)
c) DDL (Data Definition Langauge)
d) DML (Data Manipulation Langauge)

Answer: d
Explanation: A query is a request for data or information. Relational Schema is the

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

design and structure of the relation. DDL consists of commands that help in modifying.
DML performs the change in the values of the relation.
31. ______________ is a set of one or more attributes taken collectively to
uniquely identify a record.
a) Primary Key
b) Foreign key
c) Super key
d) Candidate key

Answer: c
Explanation: Foreign key creates a relationship between two relations. Super key is the
superset of all the keys in a relation. A candidate key is used to identify tuples in a
relation.
32. Which command is used to remove a relation from an SQL?
a) Drop table
b) Delete
c) Purge
d) Remove

Answer: a
Explanation: Delete command is used to delete the existing record from the table. The
drop table deletes the whole structure of the relation. Purge removes the table which
cannot be obtained again.
33. After groups have been established, SQL applies predicates in the
___________ clause, allowing aggregate functions to be used.
a) Where
b) Having
c) Group by
d) With

Answer: b
Explanation: In SQL, after grouping data using the GROUP BY clause, the HAVING
clause is used to filter the groups based on specific conditions. It allows the use of
aggregate functions and selects only the groups that satisfy the given criteria.
34. Which of the following is the subset of SQL commands used to manipulate
Oracle Structures, including tables?
a) Data Described Language
b) Data Retrieval Language
c) Data Manipulation Language
d) Data Definition Language

Answer: d
Explanation: DDLs are used to define schema and table characters and consist of
commands that help in modifying. DML performs the change in the values of the relation.
35. The decoded instruction is stored in ______
a) IR
b) PC
c) Registers

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) MDR

Answer: a
Explanation: The instruction after obtained from the PC, is decoded and operands are
fetched and stored in the IR.
36. Which registers can interact with the secondary storage?
a) MAR
b) PC
c) IR
d) R0

Answer: a
Explanation: MAR can interact with secondary storage in order to fetch data from it.
37. During the execution of a program which gets initialized first?
a) MDR
b) IR
c) PC
d) MAR

Answer: c
Explanation: For the execution of a process first the instruction is placed in the PC.
38. Which of the register/s of the processor is/are connected to Memory Bus?
a) PC
b) MAR
c) IR
d) Both PC and MAR

Answer: b
Explanation: MAR is connected to the memory BUS in order to access the memory.
39. _______ is used to store data in registers.
a) D flip flop
b) JK flip flop
c) RS flip flop
d) None of the mentioned

Answer: a
Explanation: None.
40. ______ are used to overcome the difference in data transfer speeds of various
devices.
a) Speed enhancing circuitory
b) Bridge circuits
c) Multiple Buses
d) Buffer registers

Answer: d
Explanation: By using Buffer registers, the processor sends the data to the I/O device at
the processor speed and the data gets stored in the buffer. After that the data gets sent
to or from the buffer to the devices at the device speed.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

41. To extend the connectivity of the processor bus we use ________


a) PCI bus
b) SCSI bus
c) Controllers
d) Multiple bus

Answer: a
Explanation: PCI BUS is used to connect other peripheral devices that require a direct
connection with the processor.
42. ANSI stands for __________
a) American National Standards Institute
b) American National Standard Interface
c) American Network Standard Interfacing
d) American Network Security Interrupt

Answer: a
Explanation: None.
43. Which of these 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 initialised
d) Array is not a data structure

Answer: b
Explanation: Array contains elements only of the same type.
44. How do you initialize an array in C?
a) int arr[3] = (1,2,3);
b) int arr(3) = {1,2,3};
c) int arr[3] = {1,2,3};
d) int arr(3) = (1,2,3);

Answer: c
Explanation: This is the syntax to initialize an array in C.
45. What are the advantages of arrays?
a) Objects of mixed data types can be stored
b) Elements in an array cannot be sorted
c) Index of first element of an array is 1
d) Easier to store elements of same data type

Answer: d
Explanation: Arrays store elements of the same data type and present in continuous
memory locations.
46. What are the disadvantages 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

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: b
Explanation: Arrays are of fixed size. If we insert elements less than the allocated size,
unoccupied positions can’t be used again. Wastage will occur in memory.
47. Assuming int is of 4bytes, what is the size of int arr[15];?
a) 15
b) 19
c) 11
d) 60

Answer: d
Explanation: Since there are 15 int elements and each int is of 4bytes, we get 15*4 =
60bytes.
48. In general, the index of the first element in an array is __________
a) 0
b) -1
c) 2
d) 1

Answer: a
Explanation: In general, Array Indexing starts from 0. Thus, the index of the first element
in an array is 0.
49. Elements in an array are accessed _____________
a) randomly
b) sequentially
c) exponentially
d) logarithmically

Answer: a
Explanation: Elements in an array are accessed randomly. In Linked lists, elements are
accessed sequentially.
50. Process of inserting an element in stack is called ____________
a) Create
b) Push
c) Evaluation
d) Pop

Answer: b
Explanation: Push operation allows users to insert elements in the stack. If the stack is
filled completely and trying to perform push operation stack – overflow can happen.
51. Process of removing an element from stack is called __________
a) Create
b) Push
c) Evaluation
d) Pop

Answer: d
Explanation: Elements in the stack are removed using pop operation. Pop operation
removes the top most element in the stack i.e. last entered element.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

52. In a stack, if a user tries to remove an element from an empty stack it is called
_________
a) Underflow
b) Empty collection
c) Overflow
d) Garbage Collection

Answer: a
Explanation: Underflow occurs when the user performs a pop operation on an empty
stack. Overflow occurs when the stack is full and the user performs a push operation.
Garbage Collection is used to recover the memory occupied by objects that are no
longer used.
53. What is a computer network?
a) A device used to display information on a computer screen
b) A collection of interconnected computers and devices that can communicate and
share resources
c) A type of software used to create documents and presentations
d) The physical casing that protects a computer’s internal components

Answer: b
Explanation: A computer network refers to a collection of computers and devices linked
together to share information, resources, and services. This interconnection enables
communication, data sharing, and collaboration among the devices within the network.
54. What is internet?
a) A network of interconnected local area networks
b) A collection of unrelated computers
c) Interconnection of wide area networks
d) A single network

Answer: c
Explanation: The internet is a global network formed by connecting wide area networks
(WANs), enabling worldwide communication and data sharing.
55. Which of the following is an example of Bluetooth?
a) wide area network
b) virtual private network
c) local area network
d) personal area network

Answer: d
Explanation: Bluetooth is a wireless technology used to create a wireless personal area
network for data transfer up to a distance of 10 meters. It operates on 2.45 GHz
frequency band for transmission.
56. What is the full form of OSI?
a) optical service implementation
b) open service Internet
c) open system interconnection
d) operating system interface

Answer: c
Explanation: OSI is the abbreviation for Open System Interconnection. OSI model

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

provides a structured plan on how applications communicate over a network, which also
helps us to have a structured plan for troubleshooting. It is recognized by the ISO as the
generalized model for computer network i.e. it can be modified to design any kind of
computer network.
57. How many layers are there in the ISO OSI reference model?
a) 7
b) 5
c) 4
d) 6

Answer: a
Explanation: The seven layers in ISO OSI reference model is Application, Presentation,
Session, Transport, Network, Data link and Physical layer. OSI stands for Open System
Interconnect and it is a generalized model.
58. What are nodes in a computer network?
a) the computer that routes the data
b) the computer that terminates the data
c) the computer that originates the data
d) all of the mentioned

Answer: d
Explanation: In a computer network, a node can be anything that is capable of sending
data or receiving data or even routing the data to its destination. Routers, Computers
and Smartphones are some examples of network nodes.
59. Which one of the following is not a function of network layer?
a) congestion control
b) error control
c) routing
d) inter-networking

Answer: b
Explanation: In the OSI model, network layer is the third layer and it provides data
routing paths for network communications. Error control is a function of the data link
layer and the transport layer.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

STET 2023 (COMPUTER SCIENCE) Mock Test-3


1. Which of the following is a correct identifier in C++?
a) VAR_1234
b) $var_name
c) 7VARNAME
d) 7var_name

Answer: a
Explanation: The rules for writing an identifier is as follows:
i) may contain lowercase/uppercase letters, digits or underscore(_) only
ii) should start with a non-digit character
iii) should not contain any special characters like @, $, etc.
2. Which of the following is not a type of Constructor in C++?
a) Default constructor
b) Parameterized constructor
c) Copy constructor
d) Friend constructor

Answer: d
Explanation: Friend function is not a constructor whereas others are a type of
constructor used for object initialization.
3. Pick the incorrect statement about inline functions in C++?
a) Saves overhead of a return call from a function
b) They are generally very large and complicated function
c) These functions are inserted/substituted at the point of call
d) They reduce function call overheads

Answer: b
Explanation: Inline are functions that are expanded when it is called. The whole code of
the inline function gets inserted/substituted at the point of call. In this, they help in
reducing the function call overheads. Also they save overhead of a return call from a
function. Inline functions are generally kept small.
4. What is abstract class in C++?
a) Any Class in C++ is an abstract class
b) Class from which any class is derived
c) Class specifically used as a base class with atleast one virtual functions
d) Class specifically used as a base class with atleast one pure virtual functions

Answer: d
Explanation: An abstract class is defined as a class which is specifically used as a base
class. An abstract class should have atleast one pure virtual function.
5. Which concept allows you to reuse the written code in C++?
a) Inheritance
b) Polymorphism
c) Abstraction
d) Encapsulation

Answer: a
Explanation: Inheritance allows you to reuse your already written code by inheriting the

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

properties of written code into other parts of the code, hence allowing you to reuse the
already written code.
6. What is the other name used for functions inside a class?
a) Member variables
b) Member functions
c) Class functions
d) Class variables

Answer: b
Explanation: Functions of a class are also known as member functions of a class.
7. Which of the following cannot be a friend?
a) Function
b) Class
c) Object
d) Operator function

Answer: c
Explanation: Objects of any class cannot be made a friend of any other or same class
whereas functions, classes and operator functions can be made a friend.
8. What is the size of a boolean variable in C++?
a) 1 bit
b) 1 byte
c) 4 bytes
d) 2 bytes

Answer: a
Explanation: Boolean uses only 1 bit as it stores only truth values which can be true(1)
or false(0).
9. Which of the following is C++ equivalent for scanf()?
a) cin
b) cout
c) print
d) input

Answer: a
Explanation: C++ uses cin to read input form uses. However C++ also uses scanf().
10. Which of the following is C++ equivalent for printf()?
a) cin
b) cout
c) print
d) input

Answer: b
Explanation: C++ uses cout to print output to console. However C++ also uses printf().
11. Which of the following is an exit-controlled loop?
a) for
b) while
c) do-while

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) all of the mentioned

Answer: c
Explanation: do-while is called exit controlled loop because in do-while termination
condition is checked when we have executed the body of the loop i.e. we are exiting the
body and then checking the condition, therefore, it is called exit controlled loop.
12. Which of the following is an entry-controlled loop?
a) for
b) while
c) do-while
d) both while and for

Answer: d
Explanation: Both while and for loops are called entry controlled loop because in both of
them the termination condition is checked before we enter the body of the loop hence
they are called entry controlled loop.
13. Which of the following are physical devices of a computer?
a) Hardware
b) Software
c) System Software
d) Package

Answer: a
Explanation: Hardware refers to the physical devices of a computer system. Software
refers to a collection of programs. A program is a sequence of instructions.
14. Which of the following devices provides the communication between a
computer and the outer world?
a) Compact
b) I/O
c) Drivers
d) Storage

Answer: b
Explanation: The I/O i.e. the input/output devices provide a means of communication
between the computer and the outer world. They are often referred to as peripheral
devices sometimes.
15. Which of the following is a technique that marked the beginning of computer
communications?
a) User Environment
b) Batch Environment
c) Time Sharing
d) Message passing

Answer: c
Explanation: The answer is time-sharing. In time-sharing, Users were able to interact
with the computer and could share its information processing resources.
16. Which of the following service allows a user to log in to another computer
somewhere on the Internet?
a) e-mail

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) UseNet
c) Telnet
d) FTP

Answer: c
Explanation: Telnet is the answer. It is a service that enables the user to log into another
computer somewhere on the Internet.
17. Which of the following is not a type of computer on the basis of operation?
a) Digital
b) Analog
c) Hybrid
d) Remote

Answer: d
Explanation: There are three types of computers basically on the basis of operation:
Analog, Digital, and Hybrid.
18. A relational database consists of a collection of
a) Tables
b) Fields
c) Records
d) Keys

Answer: a
Explanation: Fields are the column of the relation or tables. Records are each row in a
relation. Keys are the constraints in a relation.
19. A ________ in a table represents a relationship among a set of values.
a) Column
b) Key
c) Row
d) Entry

Answer: c
Explanation: Column has only one set of values. Keys are constraints and row is one
whole set of attributes. Entry is just a piece of data.
20. The term _______ is used to refer to a row.
a) Attribute
b) Tuple
c) Field
d) Instance

Answer: b
Explanation: Tuple is one entry of the relation with several attributes which are fields.
21. The term attribute refers to a ___________ of a table.
a) Record
b) Column
c) Tuple
d) Key

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: b
Explanation: Attribute is a specific domain in the relation which has entries of all tuples.
22. For each attribute of a relation, there is a set of permitted values, called the
________ of that attribute.
a) Domain
b) Relation
c) Set
d) Schema

Answer: a
Explanation: The values of the attribute should be present in the domain. Domain is a
set of values permitted.
23. Database __________ which is the logical design of the database, and the
database _______ which is a snapshot of the data in the database at a given
instant in time.
a) Instance, Schema
b) Relation, Schema
c) Relation, Domain
d) Schema, Instance

Answer: d
Explanation: Instance is an instance of time and schema is a representation.
24. Course(course_id,sec_id,semester)
Here the course_id,sec_id and semester are __________ and course is a
_________
a) Relations, Attribute
b) Attributes, Relation
c) Tuple, Relation
d) Tuple, Attributes

Answer: b
Explanation: The relation course has a set of attributes course_id,sec_id,semester .
25. The tuples of the relations can be of ________ order.
a) Any
b) Same
c) Sorted
d) Constant

Answer: a
Explanation: The values only count. The order of the tuples does not matter.
26. During the execution of the instructions, a copy of the instructions is placed in
the ______
a) Register
b) RAM
c) System heap
d) Cache

Answer: d
Explanation: None.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

27. When Performing a looping operation, the instruction gets stored in the
______
a) Registers
b) Cache
c) System Heap
d) System stack

Answer: b
Explanation: When a looping or branching operation is carried out the offset value is
stored in the cache along with the data.
28. CISC stands for _______
a) Complete Instruction Sequential Compilation
b) Computer Integrated Sequential Compiler
c) Complex Instruction Set Computer
d) Complex Instruction Sequential Compilation

Answer: c
Explanation: CISC is a type of system architecture where complex instructions are
grouped together and executed to improve system performance.
29. The addressing mode, where you directly specify the operand value is _______
a) Immediate
b) Direct
c) Definite
d) Relative

Answer: a
Explanation: None.
30. The register used to store the flags is called as _________
a) Flag register
b) Status register
c) Test register
d) Log register

Answer: b
Explanation: The status register stores the condition codes of the system.
31. HTML stands for __________
a) HyperText Markup Language
b) HyperText Machine Language
c) HyperText Marking Language
d) HighText Marking Language

Answer: a
Explanation: HTML stands for “HyperText Markup Language”. HTML is the standard
markup language mainly used to design and create web pages and web applications.
32. What is the correct syntax of doctype in HTML5?
a) </doctype html>
b) <doctype html>
c) <doctype html!>

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) <!doctype html>

Answer: d
Explanation: The correct syntax of HTML5 doctype is <!doctype html>, doctype is the
very first thing to write in HTML5. <!doctype html> or <!DOCTYPE HTML> both are
same because ‘doctype’ keyword is not case sensitive.
33. Which of the following is used to read an HTML page and render it?
a) Web server
b) Web network
c) Web browser
d) Web matrix

Answer: c
Explanation: A web browser (commonly referred to as a browser) is a software
application for retrieving, presenting and traversing information resources on the World
Wide Web. A web server process, store and display output to the client as per their
request. Web matrix is a discontinued cloud-connected website builder and HTML editor
for Windows.
34. Which of the following tag is used for inserting the largest heading in HTML?
a) head
b) <h1>
c) <h6>
d) heading

Answer: b
Explanation: Headings in HTML starts from <h1> to <h6> in which <h1> heading is the
largest one and <h6> is smallest one among those. The heading tags are <h1> <h2>
<h3> <h4> <h5> and <h6> that are used for the creations of headings.
35. In which part of the HTML metadata is contained?
a) head tag
b) title tag
c) html tag
d) body tag

Answer: a
Explanation: Metadata is information about data. The meta tag provides metadata/meta
information about the HTML document. Metadata will not be displayed on the page.
Metadata is present in head. The body tag defines document’s body. A title tag is an
HTML element which specifies the title of a web page.
36. How many two input AND gates and two input OR gates are required to realize
Y = BD + CE + AB?
a) 3, 2
b) 4, 2
c) 1, 1
d) 2, 3

Answer: a
Explanation: There are three product terms. So, three AND gates of two inputs are
required. As only two input OR gates are available, so two OR gates are required to get
the logical sum of three product terms.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

37. Which of the following are known as universal gates?


a) NAND & NOR
b) AND & OR
c) XOR & OR
d) EX-NOR & XOR

Answer: a
Explanation: The NAND & NOR gates are known as universal gates because any digital
circuit can be realized completely by using either of these two gates, and also they can
generate the 3 basic gates AND, OR and NOT.
38. A single transistor can be used to build which of the following digital logic
gates?
a) AND gates
b) OR gates
c) NOT gates
d) NAND gates

Answer: c
Explanation: A transistor can be used as a switch. That is when base is low collector is
high (input zero, output one) and base is high collector is low (input 1, output 0).
39. How many truth table entries are necessary for a four-input circuit?
a) 4
b) 8
c) 12
d) 16

Answer: d
Explanation: For 4 inputs: 24 = 16 truth table entries are necessary.
40. The basic logic gate whose output is the complement of the input is the
___________
a) OR gate
b) AND gate
c) INVERTER gate
d) XOR gate

Answer: c
Explanation: It is also called NOT gate and it simply inverts the input, such that 1
becomes 0 and 0 becomes 1.
41. SSI refers to ___________
a) Small Scale Integration
b) Short Scale Integration
c) Small Set Integration
d) Short Set Integration

Answer: a
Explanation: SSI refers to Small Scale Integration.
42. MSI means ___________
a) Merged Scale Integration
b) Main Scale Integration

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

c) Medium Scale Integration


d) Main Set Integration

Answer: c
Explanation: MSI means Medium Scale Integration.
43. The result “X + XY = X” follows which of these laws?
a) Consensus law
b) Distributive law
c) Duality law
d) Absorption law

Answer: d
44. The decimal equivalent of the octal number (645)8 is ______
a) (450)10
b) (451)10
c) (421)10
d) (501)10

Answer: c
Explanation: Octal to Decimal conversion is obtained by multiplying 8 to the power of
base index along with the value at that index position.
The decimal equivalent of the octal number (645)8 is 6 * 82 + 4 * 81 + 5 * 80 = 6 * 64 + 4 *
8 + 5 = 384 + 32 + 5 = (421)10.
45. The largest two digit hexadecimal number is ________
a) (FE)16
b) (FD)16
c) (FF)16
d) (EF)16

Answer: c
46. The octal equivalent of the decimal number (417)10 is _____
a) (641)8
b) (619)8
c) (640)8
d) (598)8

Answer: a
47. What layer in the TCP/IP stack is equivalent to the Transport layer of the OSI
model?
a) Application
b) Host to host
c) Internet
d) Network Access

Answer: b
48. Which of the following protocols uses both TCP and UDP?
a) FTP
b) SMTP
c) Telnet

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) DNS

Answer: d
49. Virtual terminal protocol is an example of _________
a) Network layer
b) Application layer
c) Transport layer
d) Physical layer

Answer: b
Explanation: In open systems, a virtual terminal (VT) is an application service. It allows
host terminals on a multi-user network to interact with other hosts regardless of terminal
type and characteristics.
50. TCP/IP is related to __________
a) ARPANET
b) OSI
c) DECNET
d) ALOHA

Answer: a
51. A device operating at network layer is called __________
a) Router
b) Equalizer
c) Bridge
d) Repeater

Answer: a

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

STET 2023 (COMPUTER SCIENCE) Mock Test-4

1. What happens if the following C++ statement is compiled and executed?

int *ptr = NULL;


delete ptr;

a) The program is not semantically correct


b) The program is compiled and executed successfully
c) The program gives a compile-time error
d) The program compiled successfully but throws an error during run-time

Answer: b
2. Which of the following type is provided by C++ but not C?
a) double
b) float
c) int
d) bool

Answer: d
Explanation: C++ provides the boolean type to handle true and false values whereas no
such type is provided in C.
3. Which of the following escape sequence represents carriage return?
a) \r
b) \n
c) \n\r
d) \c

Answer: a
Explanation: \r is used to represent carriage return which means move the cursor to the
beginning of the next line.
4. Which of the following escape sequence represents tab?
a) \t
b) \t\r
c) \b
d) \a

Answer: a
Explanation: \t is used to represent tab which means a set of blank spaces in a line.
5. Which of the following is called insertion/put to operator?
a) <<
b) >>
c) >
d) <

Answer: a
Explanation: << operator is called insertion or put to operator i.e. insert/put things to
console/files.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

6. Which of the following provides a programmer with the facility of using object
of a class inside other classes?
a) Inheritance
b) Composition
c) Abstraction
d) Encapsulation

Answer: b
Explanation: The concept of using objects of one class into another class is known as
Composition.
7. How many types of polymorphism are there in C++?
a) 1
b) 2
c) 3
d) 4

Answer: b
Explanation: There are two types of polymorphism in C++ namely run-time and compile-
time polymorphisms.
8. In which part of the for loop termination condition is checked?
for(I;II;III)
{IV}
a) I
b) II
c) III
d) IV

Answer: b
Explanation: In II part the termination condition of the for loop is checked.
9. Which of the following is the scope resolution operator?
a) .
b) *
c) ::
d) ~

Answer: c
Explanation: :: operator is called scope resolution operator used for accessing a global
variable from a function which is having the same name as the variable declared in the
function.
10. Which of the following operator is used with this pointer to access members of
a class?
a) .
b) !
c) ->
d) ~

Answer: c
Explanation: this pointer is a type of pointer and as we know pointer object uses the
arrow(->) operator to access the members of the class, therefore, this pointer uses ->
operator.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

11. What is the other name of compile-time polymorphism?


a) Static polymorphism
b) Dynamic polymorphism
c) Executing polymorphism
d) Non-executing polymorphism

Answer: a
Explanation: Compile-time polymorphism is also known as static polymorphism as it is
implemented during the compile-time.
12. What is the other name of run-time polymorphism?
a) Static polymorphism
b) Dynamic polymorphism
c) Executing polymorphism
d) Non-executing polymorphism

Answer: b
Explanation: Run-time polymorphism is also known as dynamic polymorphism as it is
implemented during the run-time of the program.
13. Which of the following computers are lower than mainframe computers in
terms of speed and storage capacity?
a) Mainframes
b) Hybrid
c) Mini
d) Super

Answer: c
Explanation: The answer is a. Mini computers are compared to mainframe computers in
terms of:
1. speed and, 2. storage capacity.
14. Which unit is responsible for converting the data received from the user into a
computer understandable format?
a) Memory Unit
b) Arithmetic & Logic Unit
c) Input Unit
d) Output Unit

Answer: c
15. The smallest unit of data in computer is ________________
a) Byte
b) Nibble
c) Bit
d) KB

Answer: c
16. One nibble is equivalent to how many bits?
a) 2
b) 4
c) 8

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) 1

Answer: b
17. VDU stands for __________
a) Virtual Display Unit
b) Visual Display Unit
c) Virtual Detection Unit
d) Visual Detection Unit

Answer: b
18. The devices that used to give single or multiple colored images and drawings
are ____________
a) Monitors
b) Printers
c) Plotters
d) VDUs

Answer: c
19. PCI stands for _________
a) Peripheral Component Interconnect
b) Partial Component Interconnect
c) Peripheral Component Interaction
d) Partial Component Interaction

Answer: a
Explanation: PCI is a high-bandwidth bus that can function as a peripheral bus.
Compared with others, it delivers better system performance.
20. Which one of the following is a set of one or more attributes taken collectively
to uniquely identify a record?
a) Candidate key
b) Sub key
c) Super key
d) Foreign key

Answer: c
Explanation: Super key is the superset of all the keys in a relation.
21. Consider attributes ID, CITY and NAME. Which one of this can be considered
as a super key?
a) NAME
b) ID
c) CITY
d) CITY, ID

Answer: b
Explanation: Here the id is the only attribute which can be taken as a key. Other
attributes are not uniquely identified.
22. A _____ is a property of the entire relation, rather than of the individual tuples
in which each tuple is unique.
a) Rows

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) Key
c) Attribute
d) Fields

Answer: b
Explanation: Key is the constraint which specifies uniqueness.
23.

SELECT * FROM employee

What type of statement is this?


a) DML
b) DDL
c) View
d) Integrity constraint

Answer: a
Explanation: Select operation just shows the required fields of the relation. So it forms a
DML.
24. The basic data type char(n) is a _____ length character string and varchar(n) is
_____ length character.
a) Fixed, equal
b) Equal, variable
c) Fixed, variable
d) Variable, equal

Answer: c
Explanation: Varchar changes its length accordingly whereas char has a specific length
which has to be filled by either letters or spaces.
25. To remove a relation from an SQL database, we use the ______ command.
a) Delete
b) Purge
c) Remove
d) Drop table

Answer: d
Explanation: Drop table deletes the whole structure of the relation .purge removes the
table which cannot be obtained again.
26.

DELETE FROM r; //r - relation

This command performs which of the following action?


a) Remove relation
b) Clear relation entries
c) Delete fields
d) Delete rows

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: b
Explanation: Delete command removes the entries in the table.
27.

INSERT INTO instructor VALUES (10211, ’Smith’, ’Biology’, 66000);


What type of statement is this?
a) Query
b) DML
c) Relational
d) DDL

Answer: b
Explanation: The values are manipulated. So it is a DML.
28. Here which of the following displays the unique values of the column?

SELECT ……………… dept_name


FROM instructor;
a) All
b) From
c) Distinct
d) Name

Answer: c
Explanation: Distinct keyword selects only the entries that are unique.
29. The ________ clause is used to list the attributes desired in the result of a
query.
a) Where
b) Select
c) From
d) Distinct

Answer: b
Explanation: None
30. The smallest entity of memory is called _______
a) Cell
b) Block
c) Instance
d) Unit

Answer: a
Explanation: Each data is made up of a number of units.
31. The collection of the above mentioned entities where data is stored is called
______
a) Block
b) Set
c) Word

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) Byte

Answer: c
Explanation: Each readable part of the data is called blocks.
32. To get the physical address from the logical address generated by CPU we use
____________
a) MAR
b) MMU
c) Overlays
d) TLB

Answer: b
Explanation: Memory Management Unit, is used to add the offset to the logical address
generated by the CPU to get the physical address.
33. During the transfer of data between the processor and memory we use ______
a) Cache
b) TLB
c) Buffers
d) Registers

Answer: d
Explanation: None.
34. Physical memory is divided into sets of finite size called as ______
a) Frames
b) Pages
c) Blocks
d) Vectors

Answer: a
Explanation: None.
35. The BOOT sector files of the system are stored in ___________
a) Harddisk
b) ROM
c) RAM
d) Fast solid state chips in the motherboard

Answer: b
Explanation: The files which are required for the starting up of a system are stored on
the ROM.
36. Which HTML tag is used for making character appearance bold?
a) <u>content</u>
b) <b>content</b>
c) <br>content</br>
d) <i>content</i>

Answer: b
Explanation: By enclosing words in the tags <b>and</b> we can make characters
appear bold. <i> element is for content in italics, <u> is for underlined content, <br> is for
vertical breaking.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

37. Which HTML tag is used to insert an image?


a) <img url=”htmllogo.jpg” />
b) <img alt=”htmllogo.jpg” />
c) <img src=”htmllogo.jpg” />
d) <img link=”htmllogo.jpg” />

Answer: c
Explanation: In HTML, <img> tag is used to insert an image in HTML page. Image tag
has two attributes (src and Alt).
–> Src attribute is used to specify the image path.
–> Alt attribute is used to specify the alternate text for the image.
38. HTML is a subset of ___________
a) SGMT
b) SGML
c) SGME
d) XHTML

Answer: b
Explanation: HTML is a subset of SGML. SGML (Standard Generalized Markup
Language) is a standard for specifying a document markup language or tag set.
39. Which character is used to represent when a tag is closed in HTML?
a) #
b) !
c) /
d) \

Answer: c
Explanation: The forward-slash (/) is used to indicate the closure of a tag within HTML.
40. Among the following, which is the HTML paragraph tag?
a) <p>
b) <pre>
c) <hr>
d) <a>

Answer: a
Explanation: <p> tag is used for paragraph in HTML.
41. Which of the following HTML tag is used to create an unordered list?
a) <ol>
b) <ul>
c) <li>
d) <ll>

Answer: b
Explanation: <ul> tag is used to create the unordered list items in an HTML document.
By default, unordered list items will display in a bulleted format.
Different types of unordered list Attribute Values are:
 Disc
 Circle
 Square
 None

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Syntax: <ul> Unordered List Items </ul>


42. Convert the hexadecimal number (1E2)16 to decimal.
a) 480
b) 483
c) 482
d) 484

Answer: c
Explanation: Hexadecimal to Decimal conversion is obtained by multiplying 16 to the
power of base index along with the value at that index position.
(1E2)16 = 1 * 162 + 14 * 161 + 2 * 160 (Since, E = 14)
= 256 + 224 + 2 = (482)10.
43. (170)10 is equivalent to ____________
a) (FD)16
b) (DF)16
c) (AA)16
d) (AF)16

Answer: c
44. Convert (214)8 into decimal.
a) (140)10
b) (141)10
c) (142)10
d) (130)10

Answer: a
45. Octal to binary conversion: (24)8 =?
a) (111101)2
b) (010100)2
c) (111100)2
d) (101010)2

Answer: b
Explanation: Each digit of the octal number is expressed in terms of group of 3 bits.
Thus, the binary equivalent of the octal number is obtained.
(24)8 = (010100)2.
46. Convert binary to octal: (110110001010)2 =?
a) (5512)8
b) (6612)8
c) (4532)8
d) (6745)8

Answer: b
47. OSI stands for __________
a) open system interconnection
b) operating system interface
c) optical service implementation
d) open service Internet

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: a
Explanation: OSI is the abbreviation for Open System Interconnection. OSI model
provides a structured plan on how applications communicate over a network, which also
helps us to have a structured plan for troubleshooting. It is recognized by the ISO as the
generalized model for computer network i.e. it can be modified to design any kind of
computer network.
48. The number of layers in ISO OSI reference model is __________
a) 4
b) 5
c) 6
d) 7

Answer: d
Explanation: In OSI reference model, there are 7 layers namely Application,
Presentation, Session, Transport, Network, Data Link and Physical layer. Each layer
uses a protocol to perform its designated function, for example, the data link layer uses
error detection protocols for error control functions.
49. TCP/IP model does not have ______ layer but OSI model have this layer.
a) session layer
b) transport layer
c) application layer
d) network layer

Answer: a
Explanation: In OSI reference model, there are two layers which are not present in
TCP/IP model. They are Presentation and Session layer. The functions of Presentation
and Session layer in the OSI model are handled by the transport layer itself in TCP/IP.
50. Which 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
Explanation: Physical, data link and network layers are network support layers and
session, presentation and application layers are user support layers. The transport layer
links these layers by segmenting and rearranging the data. It uses protocols like TCP
and UDP.
51. Which address is used on the internet for employing the TCP/IP protocols?
a) physical address and logical address
b) port address
c) specific address
d) all of the mentioned

Answer: d
Explanation: The physical, logical, port and specific addresses are used in TCP/IP
protocol. All the addressing schemes, that is physical (MAC) and logical address, port
address and specific address are employed in both TCP/IP model and OSI model. In

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

TCP/IP, the addresses are more focused on the internet implementation of these
addresses.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

STET 2023 (COMPUTER SCIENCE) Mock Test-5

1. By default, all the files in C++ are opened in _________ mode.


a) Binary
b) VTC
c) Text
d) ISCII

Answer: c
Explanation: By default, all the files in C++ are opened in text mode. They read the file
as normal text.
2. Which of the following correctly declares an array in C++?
a) array{10};
b) array array[10];
c) int array;
d) int array[10];

Answer: d
Explanation: Because array variable and values need to be declared after the datatype
only.
3. Which of the following is called extraction/get from operator?
a) <<
b) >>
c) >
d) <

Answer: b
Explanation: >> operator is called extraction or get from operator i.e. extract/get things
from console/files.
4. A language which has the capability to generate new data types are called
________________
a) Extensible
b) Overloaded
c) Encapsulated
d) Reprehensible

Answer: a
Explanation: Languages that can produce/generate new data types are called extensible
languages as they have the ability to handle new data types.
5. Wrapping data and its related functionality into a single entity is known as
_____________
a) Abstraction
b) Encapsulation
c) Polymorphism
d) Modularity

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: b
Explanation: In OOPs, the property of enclosing data and its related functions into a
single entity(in C++ we call them classes) is called encapsulation.
6. How run-time polymorphisms are implemented in C++?
a) Using Inheritance
b) Using Virtual functions
c) Using Templates
d) Using Inheritance and Virtual functions

Answer: d
Explanation: Run-time polymorphism is implemented using Inheritance and virtual in
which object decides which function to call.
7. Which of the following is an abstract data type?
a) int
b) float
c) class
d) string

Answer: c
Explanation: Class is used as an abstract data type as it can be used to give
implementation independent view whereas no other data type can be used to provide
this.
8. Pick the odd one out.
a) array type
b) character type
c) boolean type
d) integer type

Answer: a
Explanation: Array type is not the basic type and it is constructed using the basic type.
9. Which data type is used to represent the absence of parameters?
a) int
b) short
c) void
d) float

Answer: c
Explanation: Because void specifies an empty set of values/parameters.
10. Which type is best suited to represent the logical values?
a) integer
b) boolean
c) character
d) float

Answer: b
Explanation: Logical values can be either true or false, so the boolean type is suited for
it.
11. Identify the user-defined types from the following?
a) enumeration

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) classes
c) both enumeration and classes
d) int

Answer: c
Explanation: They must be defined by the users before use, unlike the other types which
are readily available.
12. The value 132.54 can be represented using which data type?
a) double
b) void
c) int
d) bool

Answer: a
Explanation: The given value is with decimal points, so float or double can be used.
13. Components that provide internal storage to the CPU are ______
a) Registers
b) Program Counters
c) Controllers
d) Internal chips

Answer: a
Explanation: The Registers are the fast storage units. They are responsible for storing
intermediate computational results in the CPU. The registers can be user accessible or
inaccessible.
14. Which of the following is used to hold running program instructions?
a) Primary Storage
b) Virtual Storage
c) Internal Storage
d) Minor Devices

Answer: a
Explanation: The primary storage is responsible for holding the data, intermediate results
and the results of ongoing processes or jobs. Virtual storage is the main memory storage
required for saving a large amount of data for future reference. The other options are
invalid.
15. Which of the following is non-volatile storage?
a) Backup
b) Secondary
c) Primary
d) Cache

Answer: b
Explanation: The secondary storage is the non-volatile storage unit because the data is
not lost when the power supply is dissipated. Primary memory is the volatile memory.
16. Which of the following is used in main memory?
a) SRAM
b) DRAM
c) PRAM

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) DDR

Answer: b
Explanation: DRAM stands for dynamic random access memory. It is denser than
SDRAM (Static) and therefore it is used in the main memory. They are in the form of
semiconductor RAMs.
17. Which of the following are types of ROMs?
a) SROM & DROM
b) PROM & EPROM
c) Only one type there is no further classification
d) PROM & EROM

Answer: b
Explanation: There are four types of Read Only Memories: MROM, PROM, EPROM,
and EEPROM.
 MROM stands for Mask ROM
 PROM stands for Programmable ROM
 EPROM stands for Erasable Programmable ROM
 EEPROM stands for Electrically Erasable Programmable ROM

18. Which of the following is not a bitwise operator?


a) |
b) ^
c) .
d) <<

Answer: c
Explanation: All except the dot(.) operator are bitwise operators.
| : Bitwise OR
^ : Bitwise XOR
<< : Shift Left

19. The bitwise complement of 0 is ___________


a) 00000001
b) 10000000
c) 11111111
d) 11111110

Answer: c
Explanation: Bitwise complement is basically used to convert all the 0 digits to 1 and the
1s to 0s.
So, for 0 = 00000000(in 8-bits) ::: 11111111(1s complement). The bitwise complement is
often referred to as the 1s complement.

20. Which one of the following cannot be taken as a primary key?


a) Id
b) Register number
c) Dept_id
d) Street

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: d
Explanation: Street is the only attribute which can occur more than once.
21. An attribute in a relation is a foreign key if the _______ key from one relation is
used as an attribute in that relation.
a) Candidate
b) Primary
c) Super
d) Sub

Answer: b
Explanation: The primary key has to be referred in the other relation to form a foreign
key in that relation.
22. The relation with the attribute which is the primary key is referenced in another
relation. The relation which has the attribute as a primary key is called
______________
a) Referential relation
b) Referencing relation
c) Referenced relation
d) Referred relation

Answer: c
Explanation: None.
23. Using which language can a user request information from a database?
a) Query
b) Relational
c) Structural
d) Compiler

Answer: a
Explanation: Query language is a method through which the database entries can be
accessed.
24. Student(ID, name, dept name, tot_cred)
In this query which attributes form the primary key?
a) Name
b) Dept
c) Tot_cred
d) ID

Answer: d
Explanation: The attributes name, dept and tot_cred can have same values unlike ID.
25. The_____ operation 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
Explanation: Join finds the common tuple in the relations and combines it.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

26. Which one of the following is used to define the structure of the relation,
deleting relations and relating schemas?
a) DML(Data Manipulation Langauge)
b) DDL(Data Definition Langauge)
c) Query
d) Relational Schema

Answer: b
Explanation: Data Definition language is the language which performs all the operation
in defining structure of relation.
27. Which one of the following provides the ability to query information from the
database and to insert tuples into, delete tuples from, and modify tuples in the
database?
a) DML(Data Manipulation Langauge)
b) DDL(Data Definition Langauge)
c) Query
d) Relational Schema

Answer: a
Explanation: DML performs the change in the values of the relation.
28. What type of statement is this?
CREATE TABLE employee (name VARCHAR, id INTEGER)

a) DML
b) DDL
c) View
d) Integrity constraint

Answer: b
Explanation: Data Definition language is the language which performs all the operation
in defining structure of relation.
29. Which of the following is the fullform of CISC?
a) Complex Instruction Sequential Compilation
b) Complete Instruction Sequential Compilation
c) Computer Integrated Sequential Compiler
d) Complex Instruction Set Computer

Answer: d
Explanation: The CISC machines are well adept at handling multiple BUS organisation.
30. The drawback of building a large memory with DRAM is ______________
a) The large cost factor
b) The inefficient memory organisation
c) The Slow speed of operation
d) All of the mentioned

Answer: c
Explanation: The DRAM’s were used for large memory modules for a long time until a
substitute was found.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

31. The fastest data access is provided using _______


a) Caches
b) DRAM’s
c) SRAM’s
d) Registers

Answer: d
Explanation: The fastest data access is provided using registers as these memory
locations are situated inside the processor.
32. The bit used to signify that the cache location is updated is ________
a) Dirty bit
b) Update bit
c) Reference bit
d) Flag bit

Answer: a
Explanation: When the cache location is updated in order to signal to the processor this
bit is used.
33. Which of the following HTML tag is used to add a row in a table?
a) <th>
b) <td>
c) <tr>
d) <tt>

Answer: c
Explanation: In HTML, <tr> tag is used to create a row in the table. <th> tag is used to
set the header cell of a table.
34. Which tag is used to create a numbered list in HTML?
a) <ol>
b) <ul>
c) <li>
d) <ll>

Answer: a
Explanation: <ol> tag is used to create the numbered list or ordered list items in an
HTML document. An ordered list can be numerical or alphabetical order. <li> tag is used
to define each list item.
Syntax: <ol> Ordered List Items </ol>
35. How to create a checkbox in HTML Form?
a) <input type=”text”>
b) <input type=”textarea”>
c) <input type=”checkbox”>
d) <input type=”button”>

Answer: c
Explanation: <input type=”checkbox”> is used to create a checkbox in HTML Form.
Checkboxes allow a user to select one or more options of a limited number of choices.
36. Which works similar to <b> element?
a) <blockquote>

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) <strong>
c) <em>
d) <i>

Answer: b
Explanation: The words are written inside <strong> can be said with strong emphasis.
Browser shows contents written inside <strong> element in bold.
37. Each cell of the table can be represented by using __________
a) <tr>
b) <td>
c) <th>
d) <thead>

Answer: b
Explanation: td stands for table data, we can represent each cell of the table by using
<td>, at the end we used </td> tag. But some browsers by default draw the lines around
table. <tr> is used to indicate start of every row i.e. it stands for table row. The header
information is present in <th> tag. <thead> tag contains the group of header.
38. For heading we can use ____________
a) <td>
b) <tr>
c) <thead>
d) <th>

Answer: d
39. For adding caption to the table we use ____________
a) <caption>
b) <thead>
c) <th>
d) <tr>

Answer: a
40. The code where all successive numbers differ from their preceding number by
single bit is __________
a) Alphanumeric Code
b) BCD
c) Excess 3
d) Gray

Answer: d
41. How many AND gates are required to realize Y = CD + EF + G?
a) 4
b) 5
c) 3
d) 2

Answer: d
42. How many two-input AND and OR gates are required to realize Y = CD+EF+G?
a) 2, 2

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b) 2, 3
c) 3, 3
d) 3, 2

Answer: a
Explanation: Y = CD + EF + G
The number of two input AND gate = 2
The number of two input OR gate = 2.
43. A universal logic gate is one which can be used to generate any logic function.
Which of the following is a universal logic gate?
a) OR
b) AND
c) XOR
d) NAND

Answer: d
Explanation: An Universal Logic Gate is one which can generate any logic function and
also the three basic gates: AND, OR and NOT. Thus, NOR and NAND can generate any
logic function and are thus Universal Logic Gates.
44. A full adder logic circuit will have __________
a) Two inputs and one output
b) Three inputs and three outputs
c) Two inputs and two outputs
d) Three inputs and two outputs

Answer: d
Explanation: A full adder circuit will add two bits and it will also accounts the carry input
generated in the previous stage. Thus three inputs and two outputs (Sum and Carry) are
there. In case of half adder circuit, there are only two inputs bits and two outputs (SUM
and CARRY).
45. TCP/IP model was developed _____ the OSI model.
a) prior to
b) after
c) simultaneous to
d) with no link to
Answer: a

46. Which layer is responsible for process to process delivery in a general


network model?
a) network layer
b) transport layer
c) session layer
d) data link layer

Answer: b
Explanation: The role of Transport layer (Layer 4) is to establish a logical end to end
connection between two systems in a network. The protocols used in Transport layer is
TCP and UDP. The transport layer is responsible for segmentation of the data. It uses
ports for the implementation of process-to-process delivery.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

47. Which 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

Answer: c
Explanation: A port number is a way to identify a specific process to which an Internet or
other network message is to be forwarded when it arrives at a server. Some examples of
port numbers are port 20 which is used for FTP data, port 22 which is used for SSH
remote login ,and port 23 which is used for TELNET.
48. Which layer provides the services to user?
a) application layer
b) session layer
c) presentation layer
d) physical layer

Answer: a
Explanation: In networking, a user mainly interacts with application layer to create and
send information to other computer or network. Application layer provides the interface
between applications and the network. It is the top-most layer in both the TCP/IP and the
OSI model.
49. Transmission data rate is decided by ____________
a) network layer
b) physical layer
c) data link layer
d) transport layer

Answer: b
Explanation: Physical layer is a layer 1 device which deals with network cables or the
standards in use like connectors, pins, electric current used etc. Basically the
transmission speed is determined by the cables and connectors used. Hence it is
physical layer that determines the transmission speed in network. Some of the cables
used for high speed data transmission are optical fiber cables and twisted pair cables.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

STET 2023 (COMPUTER SCIENCE) Mock Test-6

1. What is the full form of IoT?


a) Internet of Technology
b) Incorporate of Things
c) Internet of Things
d) Incorporate of Technology

Answer: c
Explanation: The full form of IoT is the “Internet of Things”. IoT means accessing and
controlling equipment and devices that are used daily through the Internet.
2. What is IoT?
a) network of physical objects embedded with sensors
b) network of virtual objects
c) network of objects in the ring structure
d) network of sensors

Answer: a
Explanation: The Internet of Things (IoT) is a network of physical objects embedded with
sensors, software, and other technologies for exchanging data with other devices over
the internet.
3. Who coined the term “Internet of Things”?
a) Kevin Aston
b) John Wright
c) Edward Jameson
d) George Garton

Answer: a
Explanation: Kevin invented coined the term “Internet of Things” in 1999 during his work
at Procter & Gamble to describe the network connecting objects in the physical world
with the Internet.
4. When was the actual term “Internet of Things” coined?
a) 1998
b) 1999
c) 2000
d) 2002

Answer: b
Explanation: The actual term “Internet of Things” was coined in 1999 by technologist
Kevin Aston during his work at Procter & Gamble while giving a presentation about
technology and the internet.
5. Which of the following is not an IoT device?
a) Table
b) Laptop
c) Arduino
d) Tablet

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: a
Explanation: IoT devices are embedded with sensors, microprocessors, actuators, etc.
Laptop, Arduino, and Tablet are embedded systems and they can be operated with the
internet, thus they are IoT devices.
6. Communication between a computer and a keyboard involves ______________
transmission.
a) Automatic
b) Half-duplex
c) Full-duplex
d) Simplex

Answer: d
Explanation: In simplex transmission, data flows in single direction which in this case
refers to the data flowing from the keyboard to the computer. Another example would be
of the mouse where the data flows from the mouse to the computer only.
7. The first Network was called ________
a) CNNET
b) NSFNET
c) ASAPNET
d) ARPANET

Answer: d
Explanation: ARPANET stands for Advanced Research Projects Agency Networks. It
was the first network to be implemented which used the TCP/IP protocol in the year
1969.
8. A _______ is the physical path over which a message travels.
a) Path
b) Medium
c) Protocol
d) Route

Answer: b
Explanation: Messages travel from sender to receiver via a physical path called the
medium using a set of methods/rules called protocol. Mediums can be guided (wired) or
unguided (wireless).
9. Which of this is not a network edge device?
a) PC
b) Smartphones
c) Servers
d) Switch

Answer: d
Explanation: Network edge devices refer to host systems, which can host applications
like web browser. A switch can’t operate as a host, but as a central device which can be
used to manage network communication.
10. A _________ set of rules that governs data communication.
a) Protocols
b) Standards
c) RFCs

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) Servers

Answer: a
Explanation: In communications, a protocol refers to a set of rules and regulations that
allow a network of nodes to transmit and receive information. Each layer in the network
model has a protocol set, for example, the transport layer has TCP and UDP protocols.
11. Three or more devices share a link in ________ connection.
a) Unipoint
b) Multipoint
c) Point to point
d) Simplex

Answer: b
Explanation: A multipoint communication is established when three or many network
nodes are connected to each other. Frame relay, Ethernet and ATM are some examples
of multipoint connections.
12. RAD stands for
a) Relative Application Development
b) Rapid Application Development
c) Rapid Application Document
d) None of the mentioned

Answer: b
Explanation: None.
13. Which one of the following models is not suitable for accommodating any
change?
a) Build & Fix Model
b) Prototyping Model
c) RAD Model
d) Waterfall Model

Answer: d
Explanation: Real projects rarely follow the sequential flow that the Waterfall Model
proposes.
14. Which one of the following is not a phase of Prototyping Model?
a) Quick Design
b) Coding
c) Prototype Refinement
d) Engineer Product

Answer: b
Explanation: A prototyping model generates only a working model of a system.
15. SDLC stands for
a) Software Development Life Cycle
b) System Development Life cycle
c) Software Design Life Cycle
d) System Design Life Cycle

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: a
Explanation: None.
16. Which model can be selected if user is involved in all the phases of SDLC?
a) Waterfall Model
b) Prototyping Model
c) RAD Model
d) both Prototyping Model & RAD Model

Answer: c
Explanation: None.
17. The spiral model has two dimensions namely _____________ and
____________
a) diagonal, angular
b) radial, perpendicular
c) radial, angular
d) diagonal, perpendicular

Answer: c
Explanation: The radial dimension of the model represents the cumulative costs and the
angular dimension represents the progress made in completing each cycle. Each loop of
the spiral from X-axis clockwise through 360o represents one phase.
18. Which of the following life cycle model can be chosen if the development team
has less experience on similar projects?
a) Spiral
b) Waterfall
c) RAD
d) Iterative Enhancement Model

Answer: a
Explanation: Relying on risk assessment/analysis provides more flexibility than required
for many applications which overcomes the criteria of less experienced developers.
19. If you were a lead developer of a software company and you are asked to
submit a project/product within a stipulated time-frame with no cost barriers,
which model would you select?
a) Waterfall
b) Spiral
c) RAD
d) Incremental

Answer: c
Explanation: RAD model is inapplicable to develop cheaper products/software/projects
as the cost of modeling, hiring highly skilled developers/designers and automated code
generation is very high.But here the cost is not an issue, so one can select this model as
it reduces development time.
20. Which two of the following models will not be able to give the desired outcome
if user’s participation is not involved?
a) Waterfall & Spiral
b) RAD & Spiral
c) RAD & Waterfall

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) RAD & Prototyping

Answer: d
Explanation: Active Participation of user is involved in all the four phases of RAD model
and in case of the Prototyping model we need user’s presence/involvement every time a
new prototype is build or designed.
21. What is the full form of “AI”?
a) Artificially Intelligent
b) Artificial Intelligence
c) Artificially Intelligence
d) Advanced Intelligence

Answer: b
Explanation: AI is abbreviated as Artificial Intelligence. It is used to create systems or
build machines to think and work like humans.
22. What is Artificial Intelligence?
a) Artificial Intelligence is a field that aims to make humans more intelligent
b) Artificial Intelligence is a field that aims to improve the security
c) Artificial Intelligence is a field that aims to develop intelligent machines
d) Artificial Intelligence is a field that aims to mine the data

Answer: c
Explanation: Artificial Intelligence is the development of intelligent systems that work and
react in the same way that humans do. Intelligence is a process or a component of the
ability to achieve goals in the world. People, animals, and a few machines all have
different types and degrees of intelligence.
23. Who is the inventor of Artificial Intelligence?
a) Geoffrey Hinton
b) Andrew Ng
c) John McCarthy
d) Jürgen Schmidhuber

Answer: c
Explanation: John McCarthy was a pioneer in Artificial Intelligence research, helping to
name the field and spending decades teaching computers to grasp concepts that are
intuitive to humans.
24. Which of the following is the branch of Artificial Intelligence?
a) Machine Learning
b) Cyber forensics
c) Full-Stack Developer
d) Network Design

Answer: a
Explanation: Machine learning is one of the important sub-areas of Artificial Intelligence
likewise Neural Networks, Computer Vision, Robotics, and NLP are also the sub-areas.
In machine learning, we build or train ML models to do certain tasks.
25. Which of the following is an application of Artificial Intelligence?
a) It helps to exploit vulnerabilities to secure the firm
b) Language understanding and problem-solving (Text analytics and NLP)

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

c) Easy to create a website


d) It helps to deploy applications on the cloud

Answer: b
Explanation: Language understanding and problem-solving come under the NLP and
Text Analysis area which involves text recognition and sentiment analysis of the text.
NLP ML model is trained to mainly do the task which processes human language’s
speech or text. For example voice assistant.
26. Each ___ represents a particular colour.
a. Frame
b. Character
c. Pixel value
d. None of the above
Answer: C
27. A photograph is an analog image and a ___ can convert it into a digital image.
a. Printer
b. Scanner
c. Webcam
d. Camera
Answer: B
28. Sound is a result of ___.
a. Vibration
b. Talking
c. Light
d. Action
Answer: A
29. ___ signals are digitized using pulse code modulation.
a. Video
b. Radio
c. Audio
d. Digital
Answer: C
30. Digital samples of sound are generated using a -----------.
a. Scanner
b. Digitizer
c. Synthesizer
d. Modifier
Answer: C
31. The ___ is performed at the decoder.
a. Decompression
b. Compression
c. Depression
d. Encoding
Answer: A

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

32. Lossless compression algorithm is said to be ___.


a. Irreversible
b. Reversible
c. Fixed
d. None of the above
Answer: B
33. ___ is the process that groups data and procedures into an entity called
objects.
a. Object development methodology
b. Linear programming
c. Structured programming
d. Object oriented system development
Answer: D
34. ___ identifies the same data structure and behaviour, and groups them into a
class.
a. Polymorphism
b. Identity
c. Classification
d. Inheritance
Answer: C
35. We classify different objects of the program with the same properties into a
class using ___.
a. Categorization
b. Instantiation
c. Decomposition
d. Generalization
Answer: A
36. A ___ is defined as a group of objects with the same structure and behaviour.
a. Association
b. Polymorphism
c. Class
d. Method
Answer: C
37. Wrapping data and its related functionality into a single entity is known as
_____________
a) Abstraction
b) Encapsulation
c) Polymorphism
d) Modularity

Answer: b
Explanation: In OOPs, the property of enclosing data and its related functions into a
single entity(in C++ we call them classes) is called encapsulation.
38. What does polymorphism in OOPs mean?
a) Concept of allowing overloading of functions
b) Concept of hiding data

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

c) Concept of keeping things in different modules/files


d) Concept of wrapping things into a single unit

Answer: a
Explanation: In OOPs, Polymorphism is the concept of allowing a user to overloading
functions either by changing the types or number of parameters passed.
39. How access specifiers in Class helps in Abstraction?
a) They does not helps in any way
b) They allows us to show only required things to outer world
c) They help in keeping things together
d) Abstraction concept is not used in classes

Answer: b
Explanation: Abstraction is the concept of hiding things from the outer world and
showing only the required things to the world, which is where access specifiers private,
protected and public helps in keeping our knowledge hidden from the world.
40. What does modularity mean?
a) Hiding part of program
b) Subdividing program into small independent parts
c) Overriding parts of program
d) Wrapping things into single unit

Answer: b
Explanation: Modularity means dividing a program into independent sub programs so
that it can be invoked from other parts of the same program or any other program.
41. Which of the following feature of OOPs is not used in the following C++ code?

class A
{
int i;
public:
void print()
{cout<<"hello"<<i;}
}

class B: public A
{
int j;
public:
void assign(int a)
{j = a;}
}

a) Abstraction
b) Encapsulation
c) Inheritance
d) Polymorphism

Answer: d
Explanation: As i and j members are private i.e. they are hidden from outer world
therefore we have used the concept of abstraction. Next data members and there
related functions are put together into single class therefore encapsulation is used. Also

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

as class B is derived from A therefore Inheritance concept is used. But as no function is


overloaded in any of the classes therefore, the concept of polymorphism is missing here.
42. Actual instructions in flowcharting are represented in __________
a) Circles
b) Boxes
c) Arrows
d) Lines

Answer: b
Explanation: The actual instructions are written in boxes. Boxes are connected by using
arrows to indicate the exact flow of a flowchart and the order in which they are to be
executed.
43. The following box denotes?

a) Decision
b) Initiation
c) Initialization
d) I/O

Answer: a
Explanation: A diamond shape box denotes the decision making statements. It jumps to
a truth value or a false value.
44. A detailed flowchart is called ______
a) Stack
b) Macro
c) Micro
d) Union

Answer: c
Explanation: A detailed flowchart or a flowchart with more details is called as micro
flowchart. It represents all the components of the algorithm that is followed.
45. The number of min terms for an expression comprising of 3 variables?
a) 8
b) 3
c) 0
d) 1

Answer: a
Explanation: If any expression comprises of n variables, its corresponding min terms are
given by 2n.
Here, n=3 since there are 3 variables therefore, min terms=2 3=8.
46. The gate which is used to reverse the output obtained is _____
a) NOR
b) NAND
c) EXOR
d) NOT

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: d
Explanation: NOT gate is used to reverse the output from 0 to 1 and vice-versa.
The Boolean expression for NOT gate is Y=A’.
Therefore, it gives the complement of the result obtained.
47. Which concept means the addition of new components to a program as it
runs?
a) Data hiding
b) Dynamic binding
c) Dynamic loading
d) Dynamic typing

Answer: c
Explanation: Dynamic loading is the concept of adding new components to a program as
it runs.
48. Which reference modifier is used to define the reference variable?
a) &
b) $
c) #
d) @

Answer: a
Explanation: & aka ‘ampersand’ used to define a reference variable.
49. What does a reference provide?
a) Alternate name for the class
b) Alternate name for the variable
c) Alternate name for the pointer
d) Alternate name for the object

Answer: b
Explanation: Because we are pointing memory address using the temp variable.
50. What will be used when terminating a structure?
a) :
b) }
c) ;
d) ;;

Answer: c
Explanation: While terminating a structure, a semicolon is used to end this up.
51. Which of the following accesses a variable in structure *b?
a) b->var;
b) b.var;
c) b-var;
d) b>var;

Answer: a
Explanation: Because arrow operator(->) is used to access members of structure pointer
whereas dot operator(.) is used to access normal structure variables.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

STET 2023 (COMPUTER SCIENCE) Mock Test-7

1. Which of the following is false about IoT devices?


a) IoT devices use the internet for collecting and sharing data
b) IoT devices need microcontrollers
c) IoT devices use wireless technology
d) IoT devices are completely safe

Answer: d
Explanation: IoT devices are wireless devices and they use the internet for collecting
and sharing data. They are not completely safe because they store data and sometimes
hackers access them.
2. Which of the following is not an IoT platform?
a) Amazon Web Services
b) Microsoft Azure
c) Salesforce
d) Flipkart

Answer: d
Explanation: Amazon Web Services, Microsoft Azure, and Salesforce provide cloud
computing IoT services. But Flipkart is an e-commerce website that provides marketing
facilities.
3 Which of the following is not an application of IoT?
a) BMP280
b) Smart home
c) Smart city
d) Self-driven cars

Answer: a
Explanation: Smart homes, smart cities, and self-driven cars are applications of IoT.
BMP280 is a sensor that is used to measure air pressure. It is a component of IoT
devices.
4. Which of the following is not a fundamental component of an IoT system?
a) Sensors
b) Connectivity and data processing
c) User interface
d) Transformer

Answer: d
Explanation: Sensors are required to collect data, network connectivity is required for
data processing and to interface with the user. Transformers are not required as they are
used for voltage transformation.
5. What is the full form of IIOT?
a) Index Internet of Things
b) Incorporate Internet of Things
c) Industrial Internet of Things
d) Intense Internet of Things

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: c
Explanation: The full form of IIOT is the “Industrial Internet of Things”. It is for industry-
oriented applications and communication transportation is done through both wired and
wireless devices.
6. Two devices are in network if __________
a) a process in one device is able to exchange information with a process in another
device
b) a process is running on both devices
c) PIDs of the processes running of different devices are same
d) a process is active and another is inactive

Answer: a
Explanation: A computer network, or data network, is a digital telecommunications
network which allows nodes to share resources. In computer networks, computing
devices exchange data with each other using connections between nodes. The nodes
have certain processes which enable them to share a specific type of data using a
distinct protocol.
7. Which of the following computer networks is built on the top of another
network?
a) prior network
b) chief network
c) prime network
d) overlay network

Answer: d
Explanation: An overlay network is a computer network that is built on top of another
network. Some examples of an overlay network are Virtual Private Networks (VPN) and
Peer-to-Peer Networks (P2P).
8. In computer network nodes are _________
a) the computer that originates the data
b) the computer that routes the data
c) the computer that terminates the data
d) all of the mentioned

Answer: d
Explanation: In a computer network, a node can be anything that is capable of sending
data or receiving data or even routing the data to its destination. Routers, Computers
and Smartphones are some examples of network nodes.
9. Communication channel is shared by all the machines on the network in
________
a) broadcast network
b) unicast network
c) multicast network
d) anycast network

Answer: a
Explanation: In a broadcast network, information is sent to all stations in a network
whereas in a multicast network the data or information is sent to a group of stations in
the network. In unicast network, information is sent to only one specific station. The
broadcast address of the network is the last assigned address of the network.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

10. Bluetooth is an example of __________


a) personal area network
b) local area network
c) virtual private network
d) wide area network

Answer: a
Explanation: Bluetooth is a wireless technology used to create a wireless personal area
network for data transfer up to a distance of 10 meters. It operates on 2.45 GHz
frequency band for transmission.
11. A __________ is a device that forwards packets between networks by
processing the routing information included in the packet.
a) bridge
b) firewall
c) router
d) hub

Answer: c
Explanation: A router is a networking device that forwards data packets between
computer networks. Routers perform the traffic directing functions on the Internet. They
make use of routing protocols like RIP to find the cheapest path to the destination.
12. A list of protocols used by a system, one protocol per layer, is called ________
a) protocol architecture
b) protocol stack
c) protocol suite
d) protocol system

Answer: b
Explanation: A protocol stack refers to a group of protocols that are running concurrently
that are employed for the implementation of network protocol suite. Each layer in the
network model has to use one specific protocol from the protocol stack.
13. A company is developing an advance version of their current software
available in the market, what model approach would they prefer?
a) RAD
b) Iterative Enhancement
c) Both RAD & Iterative Enhancement
d) Spiral

Answer: c
Explanation: None.
14. Which one of the following is not a software process quality?
a) Productivity
b) Portability
c) Timeliness
d) Visibility

Answer: b
Explanation: Portability is a software product quality which means software can run on
different hardware platforms or software environments.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

15. _____________&_____________ are two kinds of software products.


a) CAD, CAM
b) Firmware, Embedded
c) Generic, Customised
d) None of the mentioned

Answer: c
Explanation: rest all are sub categories/applications of option c.
16. In how many categories process of Artificial Intelligence is categorized?
a) categorized into 5 categories
b) processes are categorized based on the input provided
c) categorized into 3 categories
d) process is not categorized

Answer: c
Explanation: It is categorized into 3 steps Sensing, Reasoning, Acting
i) Sensing: Through the sensor taking in the data about the world
ii) Reasoning: Reasoning is thinking or processing the data sensed by the sensor.
iii) Action: On the basis of input and reasoning, acting is generating and controlling
actions in the environment.
17. Based on which of the following parameter Artificial Intelligence is
categorized?
a) Based on functionally only
b) Based on capabilities only
c) Based on capabilities and functionally
d) It is not categorized

Answer: c
Explanation: The two main categorizations of AI are based on the capability and
functionality. Based on capability it is divided into Artificial Narrow Intelligence (ANI),
Artificial General Intelligence (AGI), and Artificial Super Intelligence (ASI). Based on
functionality it is divided into reactive machines, limited memory, theory of mind, and
self-awareness.
18. Which of the following is a component of Artificial Intelligence?
a) Learning
b) Training
c) Designing
d) Puzzling

Answer: a
Explanation: Intelligence is intangible and is composed of mainly five techniques.
Learning is the process of gaining knowledge by understanding, practicing, being taught,
or experiencing one thing. Learning enhances the awareness of any topic, hence
learning is one of the important components.
19. What is the function of an Artificial Intelligence “Agent”?
a) Mapping of goal sequence to an action
b) Work without the direct interference of the people
c) Mapping of precept sequence to an action
d) Mapping of environment sequence to an action

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

Answer: c
Explanation: A math function that converts a collection of perceptions into actions is
known as the agent function. The function is implemented using agent software. An
agent is responsible for the actions performed by the machine once it senses the
environment.
20. Which of the following is not the commonly used programming language for
Artificial Intelligence?
a) Perl
b) Java
c) PROLOG
d) LISP

Answer: a
Explanation: Perl is a scripting language. Whereas other programming languages are
used to program AI machines.
21. The quality of ___ remains unchanged even if the size is increased or
decreased.
a. Vector graphics
b. Illustrations
c. Photographs
d. Line images
Answer: A
22. The number of still pictures/frames displayed per ___ is called the frame rate.
a. Second
b. Minute
c. Hour
d. Day
Answer: A
23. Which of these describes the dimensions of video screens. and video picture
elements.
a. Picture ratio
b. Aspect ratio
c. Video ratio
d. Pixel ratio
Answer: B
24. The memory address of the first element of an array is called
a. floor address
b. foundation address
c. first address
d. base address
Answer :- d
25. The term “push” and “pop” is related to the
a. array

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

b. lists
c. stacks
d. all of above
Answer :- c

26. Two dimensional arrays are also called


a. tables arrays
b. matrix arrays
c. both of above
d. none of above
Answer :- c

27. When new data are to be inserted into a data structure, but there is no
available space; this situation is usually called
a. underflow
b. overflow
c. housefull
d. saturated
Answer :- b

28. The situation when in a linked list START=NULL is


a. underflow
b. overflow
c. housefull
d. saturated
Answer :- a

29. A data structure where elements can be added or removed at either end but
not in the middle
a. Linked lists
b. Stacks
c. Queues
d. Deque
Answer :- d
Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe
Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

30. What is CSS?


a) CSS is a style sheet language
b) CSS is designed to separate the presentation and content, including layout, colors,
and fonts
c) CSS is the language used to style the HTML documents
d) All of the mentioned

Answer: d
Explanation: CSS is a style sheet language that stands for Cascading Style Sheet and is
used to style HTML documents. CSS is mainly designed to separate the presentation
and content, including layout, colors, and fonts.
31. Which of the following tag is used to embed css in html page?
a) <css>
b) <!DOCTYPE html>
c) <script>
d) <style>

Answer: d
Explanation: <style> </style> tag is used to embed CSS in HTML page, while <script>
</script> is used to embed JS in HTML. <!DOCTYPE html> is HTML5 declaration.
32. Which of the following CSS selectors are used to specify a group of elements?
a) tag
b) id
c) class
d) both class and tag

Answer: c
Explanation: Class selectors are used to specify a group of elements. Id selector
specifies a particular unique element.
33. In Operating Systems, which of the following is/are CPU scheduling
algorithms?
a) Priority
b) Round Robin
c) Shortest Job First
d) All of the mentioned

Answer: d
Explanation: In Operating Systems, CPU scheduling algorithms are:
i) First Come First Served scheduling
ii) Shortest Job First scheduling
iii) Priority scheduling
iv) Round Robin scheduling
v) Multilevel Queue scheduling
vi) Multilevel Feedback Queue scheduling
All of these scheduling algorithms have their own advantages and disadvantages.
34. In operating system, each process has its own __________
a) open files
b) pending alarms, signals, and signal handlers
c) address space and global variables

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

d) all of the mentioned

Answer: d
Explanation: In Operating Systems, each process has its own address space which
contains code, data, stack, and heap segments or sections. Each process also has a list
of files that is opened by the process as well as all pending alarms, signals, and various
signal handlers.
35. If a process fails, most operating system write the error information to a
______
a) new file
b) another running process
c) log file
d) none of the mentioned

Answer: c
Explanation: If a process fails, most operating systems write the error information to a
log file. Log file is examined by the debugger, to find out what is the actual cause of that
particular problem. Log file is useful for system programmers for correcting errors.
36. Which one of the following is not a real time operating system?
a) RTLinux
b) Palm OS
c) QNX
d) VxWorks

Answer: b
Explanation: VxWorks, QNX & RTLinux are real-time operating systems. Palm OS is a
mobile operating system. Palm OS is developed for Personal Digital Assistants (PDAs).
37. When a process is in a “Blocked” state waiting for some I/O service. When the
service is completed, it goes to the __________
a) Terminated state
b) Suspended state
c) Running state
d) Ready state

Answer: d
Explanation: Suppose that a process is in “Blocked” state waiting for some I/O service.
When the service is completed, it goes to the ready state. Process never goes directly to
the running state from the waiting state. Only processes which are in ready state go to
the running state whenever CPU allocated by operating system.
38. The operator used for dereferencing or indirection is ____
a) *
b) &
c) ->
d) –>>

Answer: a
Explanation: * is used as dereferencing operator, used to read value stored at the
pointed address.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

39. Which of the following accesses the seventh element stored in array?
a) array[6];
b) array[7];
c) array(7);
d) array;

Answer: a
Explanation: The array location starts from zero, So it can accessed by array[6].
40 What will be the output of the following C++ code?

1. #include <stdio.h>
2. #include <iostream>
3. using namespace std;
4. int main()
5. {
6. char str[5] = "ABC";
7. cout << str[3];
8. cout << str;
9. return 0;
10. }

a) ABC
b) ABCD
c) AB
d) AC

Answer: a
Explanation: We are just printing the values of first 3 values.
41. You want to implement a mechanism that automates the IP configuration,
including IP address, subnet mask, default gateway, and DNS information. Which
protocol will you use to accomplish this?
a) SMTP
b) SNMP
c) DHCP
d) ARP

Answer: c
Explanation: Dynamic Host Configuration Protocol (DHCP) is used to provide IP
information to hosts on your network. DHCP can provide a lot of information, but the
most common is the IP address, subnet mask, default gateway, and DNS information.
42. TCP/IP layer is equivalent to combined Session, Presentation and _________
a) Network layer
b) Application layer
c) Transport layer
d) Physical layer

Answer: b
Explanation: TCP/IP network model is a hierarchical protocol made up of interactive
modules, each of which provides a specific functionality; however, the modules are not
necessarily interdependent. It is equivalent to combined session, presentation and
application layer.

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

43. A device operating at physical layer is called __________


a) Router
b) Equalizer
c) Bridge
d) Repeater

Answer: d
Explanation: A repeater connects two segments of your network cable. It retimes and
regenerates the signals to proper amplitudes and sends them to the other segments.
Repeaters work only at the physical layer of the OSI network model.
44. Which of the following data structure is linear data structure?
a. Trees
b. Graphs
c. Arrays
d. None of above
Answer: c
45. Which of the following data structure is not linear data structure?
a. Arrays
b. Linked lists
c. Both of above
d. None of above
Answer: d
46. Which of the following case does not exist in complexity theory
a. Best case
b. Worst case
c. Average case
d. Null case
Answer: d
47. Which of the following tag can’t go inside <head> element?
a. Headings
b. Titles
c. Meta Data
d. Scripts
Answer: a
48. Which of the following devices have a limitation that we can only store
information to it but cannot erase or modify it?
A) Floppy Disk
B) Hard Disk
C) Tape Drive
D) CDROM
Answer: d

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe

49. Daisy wheel printer is a type of


A) Matrix printer
B) Impact printer
C) Laser printer
D) Manual printer
Answer: b
50. The actual execution of instructions happens in
A) ALU
B) CU
C) Memory
D) None of above
Answer: a

Programming Learning Center Search on Youtube:- @plc_sd Like and Subscribe


Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
1. What is the full form of NIC?
Network ID card
Network interface card
National interface card
New interface card

2. The ____ topology is designed such that all stations are linked by a single cable
known as a backbone cable.
1.
Ring
2. Tree
3. Mesh
4. Bus

3. What is the full form of CSMA?


1.
Carrier senses marginal access
2. Carrier system multiple access
3. Carrier sense multiple access
4. Carrier sense mostly access

4. Mesh topology can be created using which of the following formula?


1.
Number of cables = (n*(n-1))/2
2. Number of cables = (n*(n-1))*2
3. Number of cables = (n*(n+1))/2
4. Number of cables = (n*(n+1))*2

5. The transmission node is defined in which layer?


1.
Physical layer
2. Data link layer
3. Transport layer
4. Session layer

6. Which of the following is the example of Half duplex mode?


1.
Keyboard
2. Television
3. Mouse
4. Walkie talkie

7. Which of the following layer finds the optimum path to transport data from the source
to the destination depending on network circumstances, service priority, and other
considerations?
1.
Transport Layer
2. Session Layer
3. Data link Layer
4. Network Layer

8. Which of the following is the network layer protocol?


1.
IP Protocol
2. ARP
3. ICMP
4. All of the above

9. Multiplexing is done in a ____ manner.


1.
One-to-one
2. One-to-many
3. Many-to-many
4. Many-to-one

10. Class A IP address have ____ bits long Host ID.


1.
16
2. 8
3. 24
4. 32

11. In Dynamic Routing, which protocols are utilized to discover new routes?
1.
RIP
2. OSPF
3. Both
4. None
12. What is SNMP?
1.
Social Network Management Protocol.
2. Strict Network Management Protocol.
3. Simple Network Management Protocol.
4. Soft Network Management Protocol.

13. Which of the following is not a valid keyword in C++ language?


1.
while
2. for
3. switch
4. do-while

14. Stream is ___.


1.
Group of non-printable character
2. Sequence of bytes
3. Set of errors
4. The flow of invalid characters
15. The cin, cout are ___.
1.
Library functions
2. structures
3. Pointers
4. objects

16. The endl is a ___.


1.
Macro
2. object
3. Pointers
4. function

17. Which of the following are types of datatypes in C++?


1.
Basic Datatype
2. Derived Datatype
3. Enumeration data type
4. User Defined datatype
Options:
1.
1 and 2
2. 1, 2, and 4
3. 1, 2, and 3
4. All, 1, 2, 3, 4

18. If we use value "3.14"then what will be the data type of the given value?
1.
float
2. double
3. long double
4. none of the above

19. Which of the following is a feature of the database?


a) No-backup for the data stored
b) User interface provided
c) Lack of Authentication
d) Store data in multiple locations
20. Which of the following is not a function of the database?
a) Managing stored data
b) Manipulating data
c) Security for stored data
d) Analysing code
21. What does an RDBMS consist of?
a) Collection of Records
b) Collection of Keys
c) Collection of Tables
d) Collection of Fields
22. Which of the following set should be associated with weak entity set for weak entity
to
be meaningful?
a) Neighbour set
b) Strong entity set
c) Owner set
d) Identifying set
23. Which of the following command is correct to delete the values in the relation
teaches?
a) Delete from teaches;
b) Delete from teaches where Id =Null;
c) Remove table teaches;
d) Drop table teaches;
24. The traditional storage of data organized by the customer, stored in separate folders
in filing cabinets is an example of ______________ type of databasemanagement system.
a) Object-oriented database management system
b) Relational database management system
c) Network database management system
d) Hierarchical database management system
25. Which of the following is not the utility of DBMS?
a) Backup
b) Data Loading
c) Process Organization
d) File organization
26. Which of the following is correct according to the technology deployed by DBMS?
a) Pointers are used to maintain transactional integrity and consistency
b) Cursors are used to maintain transactional integrity and consistency
c) Locks are used to maintain transactional integrity and consistency
d) Triggers are used to maintain transactional integrity and consistency
27. ______ resembles Create view.
a) Create table . . . as
b) Create view as
c) Create table . . .like
d) With data
28. Which of the following is the best way to represent the attributes in a large db?
a) Dot representation
b) Concatenation
c) Relational-and
d) All of the mentioned
29. Which of the following establishes a top-to-bottom relationship among the items?
a) Relational schema
b) Network schema
c) Hierarchical schema
d) All of the mentioned
30. This Query can be replaced by which one of the following?
SELECT name, course_id
FROM instructor, teaches
WHERE instructor_ID= teaches_ID;

a) Select name,course_id from teaches,instructor where instructor_id=course_id;


b) Select name, course_id from instructor natural join teaches;
c) Select name, course_id from instructor;
d) Select course_id from instructor join teaches;
31.
Employee_id. Name Salary
1001 Annie 6000
1009 Ross 4500
1018 Zeith 7000
This is Employee table.
Which of the following employee_id will be displayed for the given query?
SELECT * FROM employee WHERE employee_id>1009;

a) 1009, 1001, 1018


b) 1009, 1018
c) 1001
d) 1018
32. Which of the following statements contains an error?
a) Select * from emp where empid = 10003;
b) Select empid from emp where empid = 10006;
c) Select empid from emp;
d) Select empid where empid = 1009 and lastname = GELLER;
33.
SELECT * FROM employee WHERE dept_name="Comp Sci";
In the SQL given above there is an error . Identify the error.
a) Dept_name
b) Employee
c) Comp Sci
d) From
34.
SELECT *
FROM instructor
ORDER BY salary ____, name ___;
To display the salary from greater to smaller and name in ascending order which of the
following options should be used?
a) Ascending, Descending
b) Asc, Desc
c) Desc, Asc
d) Descending, Ascending
35. In SQL the spaces at the end of the string are removed by _______ function.
a) Upper
b) String
c) Trim
d) Lower
36. _____ operator is used for appending two strings.
a) &
b) %
c) ||
d) _
37. The sizeof() is a?
1.
Unary Operator
2. Binary Operator
3. Ternary Operator
4. None of the above
38. Which of the following statement is correct about default arguments?
1.
Arguments that cannot be passed to the function
2. Arguments with a default value that is not mandatory to be passed into the
function
3. Arguments that always take the same data value
4. None of the above
39. Which of the following function can be called without any arguments?
1.
int print(int count, char ch='*')
2. int print(char ch='*')
3. int print(char ch='*',int count)
4. int print(char ch)
40. Which of the following is an exit control loop?
1.
While Loop
2. Do While loop
3. For loop
4. None of the above
41. Which of the following is the correct syntax of the "do-while"loop?
1.
do{ //Body of the loop }while(condition);
2. dowhile(condition){ //Body of the loop };
3. do while(condition){ //Body of the loop };
4. do{ //Body of the loop }while(condition)
42. Which of the following is a more effective way to call a function with arguments?
1.
Call by value
2. Call by reference
3. Call by address
4. None of the above
43. What is the lifetime of a static variable declared in a user-defined function?
1.
Within the function only
2. Within the main function only
3. Whole program
4. None of the above
44. Which of the following is invalid?
1.
string str, *ptr=0;
2. int a, float *f = &a;
3. int *ptr;
4. None of the above
45. What will be the output of the following program?

#include <iostream>
using namespace std;
int main()
{
int x = 50, y = 20;
int *p1 = &x, *p2 = &y;
p1 = p2;

cout <<*p1;

return 0;
}
Options:
1.
50
2. 20
3. Address
4. Error
46. On failure, the "new"operator returns?
1.
NULL
2. -1
3. bad_alloc exception
4. None of these
47 . Which of the following is a valid way to allocate dynamic memory for an integer
variable?
1.
int *ptr = new int(111);
2. int *ptr = NULL;ptr = new int; *ptr=111;
3. int *ptr;ptr = new int; *ptr=111;
4. All the above
48. Which of the following symbol is used to define member functions outside the class?
1.
Colon.
2. Semicolon.
3. Scope Resolution operator.
4. None of the above
49. Which of the following is an incorrect type of constructor in C++?
1.
Copy constructor
2. Move constructor
3. Default constructor
4. Parameterized constructor
50. When does a destructor gets called?
1.
When an object gets created
2. When an object gets destroyed
3. After calling constructor
4. None of the above
51. Which data structure is used to perform level-order traversal on a binary tree?

(a) Stack

(b) Linked List

(c) Queue

(d) Hash Table


52. Which data structure is used to check a palindrome?

(a) Linked List

(b) Stack

(c) Queue

(d) Tree
53. Which of the following is the application of data structures?

(a) Image processing

(b) Decision making

(c) Blockchain

(d) All of the above

54. Which matrix among the following has lots of zero elements?

(a) Identity matrix

(b) Zero matrix

(c) Unit matrix

(d) Sparse matrix


55. What condition should be checked before the deletion operation from the Queue?

(a) Front value

(b) Rear value

(c) Underflow

(d) Overflow
56. Which among the following sorting algorithm is the most optimal one to sort a random linked list?

(a) Merge sort

(b) Insertion sort

(c) Quick sort

(d) Heap sort


57. How many edges are present in the complete graph of n vertices?

(a) n(n-1)/2

(b) n(n+1)/2

(c) n

(d) n/2
58. What is the time complexity of performing the enqueue operation in the Queue?

(a) O(1)

(b) O(log(n))

(c) O(n)

(d) O(n*n)
59. What is the maximum depth of a trie with n strings of length m?

(a) n

(b) log2 n

(c) m

(d) log2 m
60. What is the condition of the overflow of a linear queue implemented using an array?

(a) Rear = front + 1

(b) Rear = front

(c) Rear = MAX_SIZE

(d) Rear = MAX_SIZE - 1


61. Which of the following is the postfix of the expression A+B/C*(D-A)?

(a) ABC/DA-*+

(b) +A/B*C-DA

(c) ABCDA/-*+

(d) +*-/ABCDA
62. What output does the following code give?
#include<iostream>
using namespace std;
int main()
{
int arr[5]={1,2,3,4,5};
printf("%d", arr[5]);
return 0;
}

(a) Garbage Value

(b) 5

(c) 1

(d) Error
63) ______ are used to overcome the difference in data transfer speeds of various devices.
a) Speed enhancing circuitory b) Bridge circuits c) Multiple Buses d) Buffer registers

64) The bus used to connect the monitor to the CPU is ______
a) PCI bus b) SCSI bus c) Memory bus d) Rambus

65) In multiple Bus organization, the registers are collectively placed and referred as ______
a) Set registers b) Register file c) Register Block d) Map registers

66) The main advantage of multiple bus organization over a single bus is _____
a) Reduction in the number of cycles for execution b) Increase in size of the registers
c) Better Connectivity d) None of the mentioned

67) Write through technique is used in which memory for updating the data
a) Virtual Memory b) Auxiliary memory c) Main memory d) Cache memory

68) The main memory in a personal computer is made of


a) Static RAM b) Both c and d c) Cache memory d) Dynamic RAM

69) The operation executed on data stored in registers is called


a) Micro operation b) Bit operation c) macro operation d) Byte operation

70) The time interval between adjacent bits is called the


a) Word time b) Turnaround time c) Bit time d) slice time

71) The method of accessing the I/O devices by repeatedly checking the status flags is ___________
a) Program-controlled I/ b) Memory-mapped I/O c) I/O mapped d) None of the mentioned

72) The method of synchronizing the processor with the I/O device in which the device sends a signal
when it is ready is?
a) Exceptions b) Signal handling c) Interrupts d) DMA

73) The method which offers higher speeds of I/O transfers is ___________
a) interrupts b) Memory mapping c) Program-controlled I/O d) DMA

74) Which of the following operations is/are performed by the ALU?


a) Data manipulation b) Exponential c) Square root d) All of the above

75) Which of the following format is used to store data?


a) Decimal b) Octal c) BCD d) Hexadecimal
76) Which of the following memory of the computer is used to speed up the computer processing?
a) Cache memory b) RAM c) ROM d) none of the above

77) Computer address bus is -


a) Multidirectional b) Bidirectional c) Unidirectional d).None of the above

78) Which of the following circuit is used to store one bit of data?
a) Flip Flop b) Decoder c) Encoder d) Register

79) Which of the following is a way in which the components of a computer are connected to each other?
a) Computer parts b) Computer architecture c) Computer hardware d) None of the above

80) Which of the following computer memory is fastest?


a) Register b) Hard disk c) RAM d) None of the above
TRE 3.0 and TRE 4.0 Mock Test-1
1. __________ converts the programs written in assembly language into machine
instructions.
a) Machine compiler
b) Interpreter
c) Assembler
d) Converter

2. The instructions like MOV or ADD are called as ______


a) OP-Code
b) Operators
c) Commands
d) None of the mentioned

3. The alternate way of writing the instruction, ADD #5,R1 is ______


a) ADD [5],[R1];
b) ADDI 5,R1;
c) ADDIME 5,[R1];
d) There is no other way

4. _____ directive specifies the end of execution of a program.


a) End
b) Return
c) Stop
d) Terminate

5. Which memory device is generally made of semiconductors?


a) RAM
b) Hard-disk
c) Floppy disk
d) Cd disk

6. The small extremely fast, RAM’s are called as _______


a) Cache
b) Heaps
c) Accumulators
d) Stacks

7. The ALU makes use of _______ to store the intermediate results.


a) Accumulators
b) Registers
c) Heap
d) Stack

8. The I/O interface required to connect the I/O device to the bus consists of
______
a) Address decoder and registers
b) Control circuits
c) Address decoder, registers and Control circuits
d) Only Control circuits

9. The fastest data access is provided using _______


a) Caches
b) DRAM’s
c) SRAM’s
d) Registers

10. During a write operation if the required block is not present in the cache then
______ occurs.
a) Write miss
b) Write latency
c) Write hit
d) Write delay

11. The bit used to signify that the cache location is updated is ________
a) Flag bit
b) Reference bit
c) Update bit
d) Dirty bit

12. The program is divided into operable parts called as _________


a) Frames
b) Segments
c) Pages
d) Sheets

13. The techniques which move the program blocks to or from the physical
memory is called as ______
a) Paging
b) Virtual memory organisation
c) Overlays
d) Framing

14. The main aim of virtual memory organisation is ________


a) To provide effective memory access
b) To provide better memory transfer
c) To improve the execution of the program
d) All of the mentioned

15. The expression for Absorption law is given by _________


a) A + AB = A
b) A + AB = B
c) AB + AA’ = A
d) A + B = B + A

16. According to boolean law: A + 1 = ?


a) 1
b) A
c) 0
d) A’
17. DeMorgan’s theorem states that _________
a) (AB)’ = A’ + B’
b) (A + B)’ = A’ * B
c) A’ + B’ = A’B’
d) (AB)’ = A’ + B

18. (A + B)(A’ * B’) = ?


a) 1
b) 0
c) AB
d) AB’

19. Complement of the expression A’B + CD’ is _________


a) (A’ + B)(C’ + D)
b) (A + B’)(C’ + D)
c) (A’ + B)(C’ + D)
d) (A + B’)(C + D’)

20. Simplify Y = AB’ + (A’ + B)C.


a) AB’ + C
b) AB + AC
c) A’B + AC’
d) AB + A

21. The expression Y=AB+BC+AC shows the _________ operation.


a) EX-OR
b) SOP
c) POS
d) NOR

22. The expression Y=(A+B)(B+C)(C+A) shows the _________ operation.


a) AND
b) POS
c) SOP
d) NAND

23. Canonical form is a unique way of representing ____________


a) SOP
b) Minterm
c) Boolean Expressions
d) POS

24. Which of the following is not a fundamental data type in C++?


A) int
B) float
C) string
D) char
25. What is the output of the following code snippet?
#include <iostream>
using namespace std;
int main()
{
int x = 10;
int &y = x;
y = 20;
cout << x << endl;
return 0;
}
A) 10
B) 20
C) Compilation Error
D) Undefined Behavior
26. What is the result of the following code snippet?
#include <iostream>
using namespace std;
int main()
{
int arr[5] = {1, 2, 3, 4, 5};
int *ptr = arr;
cout << *(ptr + 2) << endl;
return 0;
}
A) 1
B) 2
C) 3
D) 4
27. Which operator is used for dynamic memory allocation in C++?
A) new
B) malloc
C) alloc
D) alloc_mem
28. What is the output of the following code snippet?
#include <iostream>
using namespace std;
class Base
{
public:
virtual void display()
{
cout << “Base Display” << endl;
}
};
class Derived : public Base
{
public:
void display() override
{
cout << “Derived Display” << endl;
}
};
int main() {
Base *ptr = new Derived();
ptr->display();
return 0;
}
A) Base Display
B) Derived Display
C) Compilation Error
D) Undefined Behavior
29. Which statement is true about C++ references?
A) References cannot be null.
B) References can be re-assigned to refer to different variables after initialization.
C) References occupy additional memory space compared to pointers.
D) References are used for dynamic memory allocation.
30. What does the following code snippet output?
#include <iostream>
using namespace std;
int main()
{
int x = 5;
int *ptr = &x;
cout << *ptr << endl;
*ptr = 10;
cout << x << endl;
return 0;
}
A) 5, 10
B) 10, 10
C) 5, 5
D) 10, 5
31. What is the purpose of the ‘friend’ keyword in C++?
A) It signifies a function or class that can access private and protected members of
another class.
B) It is used to declare a function or class inside another class.
C) It denotes a function or class that is inherited from a base class.
D) It specifies a function or class that cannot be overridden.
32. What is a pure virtual function in C++?
A) A function that has no definition in the class declaration.
B) A function that cannot be overridden by derived classes.
C) A function that is defined in a base class and overridden in derived classes.
D) A function that can be called only by the base class.
33. Which operator is used to access the member functions and variables of a
class through a pointer in C++?
A) . (dot operator)
B) -> (arrow operator)
C) :: (scope resolution operator)
D) : (colon operator)
34. What is the purpose of the ‘const’ keyword in C++?
A) It declares a constant variable that cannot be modified after initialization.
B) It specifies a function that doesn’t change the state of an object.
C) It denotes a class that cannot be inherited.
D) It creates a copy of an object for use in a function.
35. What will be the output of the following code snippet?
#include <iostream>
using namespace std;
int main() {
int arr[] = {1, 2, 3, 4, 5};
int *ptr = arr;
cout << ptr[3] << endl;
return 0;
}
A) 1
B) 2
C) 3
D) 4
36. What will be the output of the following code snippet?
#include <iostream>
using namespace std;
class Base {
public:
Base() {
cout << “Base Constructor” << endl;
}
~Base() {
cout << “Base Destructor” << endl;
}
};
int main() {
Base* ptr = new Base();
delete ptr;
return 0;
}
A) Base Constructor
B) Base Destructor
C) Base Constructor, Base Destructor
D) Base Destructor, Base Constructor
37. What does the ‘static’ keyword signify in C++?
A) It specifies a function that is shared among all objects of a class.
B) It declares a variable that cannot be modified after initialization.
C) It defines a variable that retains its value across function calls.
D) It indicates a function or variable accessible only within the same source file.
38. What is the purpose of the ‘new’ operator in C++?
A) To deallocate memory dynamically.
B) To allocate memory for an object or variable dynamically.
C) To initialize a variable with a default value.
D) To declare a constant variable.
39. What is the function of the following command?
Delete from r where P;
a) Clears entries from relation
b) Deletes relation
c) Deletes particular tuple from relation
d) All of the mentioned

40. __________ command is used in SQL to issue multiple CREATE TABLE,


CREATE VIEW and GRANT statements in a single transaction.
a) CREATE CLUSTER
b) CREATE PACKAGE
c) CREATE SCHEMA
d) All of the mentioned

41. Which of the following key is required in to handle the data when the
encryption is applied to the data so that the unauthorised user cannot access the
data?
a) Primary key
b) Authorised key
c) Encryption key
d) Decryption key

42. Which of the following establishes a top-to-bottom relationship among the


items?
a) Relational schema
b) Network schema
c) Hierarchical schema
d) All of the mentioned

43. What happens if a piece of data is stored in two places in the db?
a) Storage space is wasted & Changing the data in one spot will cause data
inconsistency
b) In can be more easily accessed
c) Changing the data in one spot will cause data inconsistency
d) Storage space is wasted

44. The logical design, and the snapshot of the data at a given instant in time is
known as?
a) Instance & Relation
b) Relation & Schema
c) Domain & Schema
d) Schema & Instance

45. Which one of the following is used to define the structure of the relation,
deleting relations and relating schemas?
a) DML(Data Manipulation Langauge)
b) DDL(Data Definition Langauge)
c) Query
d) Relational Schema

46. Which one of the following provides the ability to query information from the
database and to insert tuples into, delete tuples from, and modify tuples in the
database?
a) DML(Data Manipulation Langauge)
b) DDL(Data Definition Langauge)
c) Query
d) Relational Schema

47.
SELECT * FROM employee
What type of statement is this?
a) DML
b) DDL
c) View
d) Integrity constraint

48. To remove a relation from an SQL database, we use the ______ command.
a) Delete
b) Purge
c) Remove
d) Drop table

49.
DELETE FROM r; //r - relation
This command performs which of the following action?
a) Remove relation
b) Clear relation entries
c) Delete fields
d) Delete rows

50. Here which of the following displays the unique values of the column?
SELECT ________ dept_name
FROM instructor;
a) All
b) From
c) Distinct
d) Name

51. The ________ clause is used to list the attributes desired in the result of a
query.
a) Where
b) Select
c) From
d) Distinct

52. In the given query which of the keyword has to be inserted?


INSERT INTO employee _____ (1002,Joey,2000);
a) Table
b) Values
c) Relation
d) Field

53. What is the need for a circular queue?


a) easier computations
b) implement LIFO principle in queues
c) effective usage of memory
d) to delete elements based on priority
54. What is an AVL tree?
a) a tree which is unbalanced and is a height balanced tree
b) a tree which is balanced and is a height balanced tree
c) a tree with atmost 3 children
d) a tree with three children

55. Which is the most appropriate data structure for reversing a word?
a) stack
b) queue
c) graph
d) tree

56. In simple chaining, what data structure is appropriate?


a) Doubly linked list
b) Circular linked list
c) Singly linked list
d) Binary trees

57. Consider the following operation performed on a stack of size 5.

Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the number of elements present in stack is?
a) 1
b) 2
c) 3
d) 4

58. The type of expression in which operator succeeds its operands is?
a) Infix Expression
b) Prefix Expression
c) Postfix Expression
d) Both Prefix and Postfix Expressions

59. If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one
at a time, what is the order of removal?
a) ABCD
b) DCBA
c) DCAB
d) ABDC

60. A linear list of elements in which deletion can be done from one end (front)
and insertion can take place only at the other end (rear) is known as
_____________
a) Queue
b) Stack
c) Tree
d) Linked list

61. Circular Queue is also known as ________


a) Ring Buffer
b) Square Buffer
c) Rectangle Buffer
d) Curve Buffer

62. FDDI used which type of physical topology?


A) Bus
B) Ring
C) Star
D) Tree
63. Which is the main function of transport layer?
A) Node to node delivery
B) End to end delivery
C) Synchronization
d) Updating and maintaining routing tables
64. In mesh topology, relationship between one device and another is ..............
A) Primary to peer
B) Peer to primary
C) Primary to secondary
D) Peer to Peer
65. The performance of data communications network depends on ..............
A) Number of users
B) The hardware and software
C) The transmission
D) All of the above
66. Find out the OSI layer, which performs token management.
A) Network Layer
B) Transport Layer
C) Session Layer
D) Presentation Layer
67. Physical or logical arrangement of network is __________
a) Topology
b) Routing
c) Networking
d) Control

68. Data communication system spanning states, countries, or the whole world is
________
a) LAN
b) WAN
c) MAN
d) PAN
69. Bluetooth uses __________
a) frequency hopping spread spectrum
b) orthogonal frequency division multiplexing
c) time division multiplexing
d) channel division multiplexing

70. WiMAX stands for ___________


a) wireless maximum communication
b) worldwide interoperability for microwave access
c) worldwide international standard for microwave access
d) wireless internet maximum communication

71. Which of the following is not an application of symmetric encryption


algorithms.
a) Data security
b) Cloud storage
c) User privacy
d) Bitcoin’s block chain

72. Which of the following is a type of cyber security?


a) Cloud Security
b) Network Security
c) Application Security
d) All of the above

73. Which of the following is a type of cyber attack?


a) Phishing
b) SQL Injections
c) Password Attack
d) All of the above

74. What is the existence of weakness in a system or network is known as?


a) Attack
b) Exploit
c) Vulnerability
d) Threat

75. Which of the following is not a step followed by cyber-criminals in data


breaching?
a) Exfiltration
b) Research and info-gathering
c) Attack the system
d) Fixing the bugs

76. The full form of Malware is ________


a) Malfunctioned Software
b) Multipurpose Software
c) Malicious Software
d) Malfunctioning of Security

77. These are a collective term for malicious spying programs used for secretly
monitoring someone’s activity and actions over a digital medium.
a) Malware
b) Remote Access Trojans
c) Keyloggers
d) Spyware

78. Which type of topology is best suited for large businesses which must
carefully control and coordinate the operation of distributed branch outlets?
a) Ring
b) Local area
c) Hierarchical
d) Star
79. "Parity bits" are used for which of the following purposes?
a) Encryption of data
b) To transmit faster
c) To detect errors
d) To identify the user
80. What kind of transmission medium is most appropriate to carry data in a
computer network that is exposed to electrical interferences?
a) Unshielded twisted pair
b) Optical fiber
c) Coaxial cable
d) Microwave
TRE 3 & 4 Mock Test-3
1. The first Network was called ____
a) CNNET
b) NSFNET
c) ASAPNET
d) ARPANET

2. A ___ is the physical path over which a message travels.


a) Path
b) Medium
c) Protocol
d) Route

3. Three or more devices share a link in ____ connection.


a) Unipoint
b) Multipoint
c) Point to point
d) Simplex

4. When collection of various computers seems a single coherent system to its client,
then it is called ___
a) computer network
b) distributed system
c) networking system
d) mail system

5. Communication channel is shared by all the machines on the network in ____


a) broadcast network
b) unicast network
c) multicast network
d) anycast network

6. DSL telcos provide which of the following services?


a) Wired phone access
b) ISP
c) Wired phone access and ISP
d) Network routing and ISP

7. Which of the following layers 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
8. Application layer is implemented in ____
a) End system
b) NIC
c) Ethernet
d) Packet transport

9. Which 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

10. Which of these is not applicable for IP protocol?


a) Connectionless
b) Offer reliable service
c) Offer unreliable service
d) Does not offer error reporting

11. Which of the following demerits does Fragmentation have?


a) Complicates routers
b) Open to DOS attack
c) Overlapping of fragments
d) All of the mentioned

12. Which of this is not a class of IP address?


a) Class E
b) Class C
c) Class D
d) Class F

13. The size of an IP address in IPv6 is ___


a) 4 bytes
b) 128 bits
c) 8 bytes
d) 100 bits

14. Which among the following features is present in IPv6 but not in IPv4?
a) Fragmentation
b) Header checksum
c) Options
d) Anycast address

15. The process of error checking and dropping of the header, delivering messages to
appropriate process based on port number is called as ___
a) Delivery of packets
b) Error correction
c) Multiplexing
d) Demultiplexing

16. Internet Control Message Protocol (ICMP) has been designed to compensate ___
a) Error-reporting
b) Error-correction
c) Host and management queries
d) All of the mentioned

17. Which of the following can’t be a feature of hub?


a) Filtering the data
b) Half duplex transmission
c) No software association
d) Star topology architecture

18. Datagram networks mainly refers to ___


a) Connection oriented networks
b) Connection less networks
c) Telephone networks
d) Internetwork

19. Which of the following remains same in the header of the packet in a datagram
network during the entire journey of the packet?
a) Destination address
b) Source address
c) Checksum
d) Padding

20. Which of the following is a type of cloud computing service?


a) Service-as-a-Software (SaaS)
b) Software-and-a-Server (SaaS)
c) Software-as-a-Service (SaaS)
d) Software-as-a-Server (SaaS)

21. Applications and services that run on a distributed network using virtualized
resources is known as ___________
a) Parallel computing
b) Soft computing
c) Distributed computing
d) Cloud computing

22. The data structure required to check whether an expression contains a balanced
parenthesis is?
a) Queue
b) Stack
c) Tree
d) Array

23. Which of the following is not the application of stack?


a) Data Transfer between two asynchronous process
b) Compiler Syntax Analyzer
c) Tracking of local variables at run time
d) A parentheses balancing program

24. Which algorithm is used in the top tree data structure?


a) Backtracking
b) Divide and Conquer
c) Branch
d) Greedy

25. What is a dequeue?


a) A queue implemented with both singly and doubly linked lists
b) A queue with insert/delete defined for front side of the queue
c) A queue with insert/delete defined for both front and rear ends of the queue
d) A queue implemented with a doubly linked list

26. The operation of processing each element in the list is known as ……


A. sorting
B. merging
C. inserting
D. traversal

27. The situation when in a linked list START=NULL is ….


A. Underflow
B. Overflow
C. Houseful
D. Saturated

28. A linear collection of 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

29. Linked lists are not suitable for the implementation of ___________
a) Insertion sort
b) Radix sort
c) Polynomial manipulation
d) Binary search

30. Linked list is considered as an example of ___________ type of memory allocation.


a) Dynamic
b) Static
c) Compile time
d) Heap

31. What does the following function do for a given Linked List with first node as head?
void fun1(struct node* head)
{
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}

a) Prints all nodes of linked lists


b) Prints all nodes of linked list in reverse order
c) Prints alternate nodes of Linked List
d) Prints alternate nodes in reverse order

32. How many stacks are required for evaluation of prefix expression?
a) one
b) two
c) three
d) four

33. Find the output of the following prefix expression.

*+2-2 1/-4 2+-5 3 1

a) 2
b) 12
c) 10
d) 4

Explanation: The given prefix expression is evaluated using two stacks and the value is
given by (2+2-1)*(4-2)/(5-3+1)= 2.
34. What is the other name for a postfix expression?
a) Normal polish Notation
b) Reverse polish Notation
c) Warsaw notation
d) Infix notation

35. Which of these operators have the highest order of precedence?


a) ‘(‘ and ‘)’
b) ‘*’ and ‘/’
c) ‘~’ and ‘^’
d) ‘+’ and ‘-‘

36. Evaluate the postfix expression ab + cd/- where a=5, b=4, c=9, d=3.
a) 23
b) 15
c) 6
d) 10

37. The matrix contains m rows and n columns. The matrix is called Sparse Matrix if
________
a) Total number of Zero elements > (m*n)/2
b) Total number of Zero elements = m + n
c) Total number of Zero elements = m/n
d) Total number of Zero elements = m-n
38. What must be the ideal size of array if the height of tree is ‘l’?
a) 2l-1
b) l-1
c) l
d) 2l

39. Which of the following is not a characteristic of a computer?


a) Versatility
b) Accuracy
c) Diligence
d) I.Q.

40. Which of the following unit is responsible for converting the data received from the
user into a computer understandable format?
a) Output Unit
b) Input Unit
c) Memory Unit
d) Arithmetic & Logic Unit

41. Which of the following is not a type of computer code?


a) EDIC
b) ASCII
c) BCD
d) EBCDIC

42. Which of the following defines the assigned ordering among the characters used by
the computer?
a) Accumulation
b) Sorting
c) Collating Sequence
d) Unicode

43. Which of the following are the input devices that enable direct data entry into a
computer system from source documents?
a) System Access devices
b) Data acquiring devices
c) Data retrieving devices
d) Data Scanning devices

44. Which of the following is a type of technique in which dumb terminals are connected
to a central computer system?
a) Time Sharing
b) Message passing
c) Batch environment
d) User environment

45. The maximum number of bits sufficient to represent an octal number in binary is
_______
a) 4
b) 3
c) 7
d) 8

46. The octal equivalent of the binary number (0010010100) 2 is ______________


a) 422
b) 242
c) 224
d) 226

47. Convert (5401)8 to hexadecimal.


a) A01
b) A02
c) B01
d) C01

48. Hexadecimal Addition of (3A5)16 and (1B2)16 will give :


a) 557
b) 185
c) 815
d) 516

49. The weights used in Binary coded decimal code are:


a) 4,2,1
b) 8,4,2,1
c) 6,4,2,1
d) 2,1

50. Perform BCD addition of (23)BCD + (20)BCD .


a) 00110100
b) 01000011
c) 10011
d) 11100

51. The 9’s complement of 45 is _____________


a) 45
b) 54
c) 64
d) 46

52. The 10’s complement of 455 is _________


a) 543
b) 544
c) 545
d) 546

.
53. The Excess-3 representation of (0100)BCD is __________
a) 0110
b) 1110
c) 0111
d) 1100
54. Boolean Function is of the form of ________
a) Truth values
b) K=f(X,Y,X)
c) Algebraic Expression
d) Truth Table

55. The complement term for X’.Y’.Z + X.Y will be _____________


a) XYZ’+X’Y’
b) (X+Y+Z’)(X’+Y’)
c) (X+Y+Z’)(X’+Y)
d) (X+Y+Z’)(X’+Y)

56. Which of the following is an incorrect SOP expression?


a) x+x.y
b) (x+y)(x+z)
c) x
d) x+y

57. The number of cells in a K-map with n-variables.


a) 2n
b) n2
c) 2n
d) n

58. When logic gates are connected to form a gating/logic network it is called as a
______________ logic circuit.
a) combinational
b) sequential
c) systematic
d) hardwired

59. Which one of the following provides the ability to query information from the database
and to insert tuples into, delete tuples from, and modify tuples in the database?
a) DML(Data Manipulation Langauge)
b) DDL(Data Definition Langauge)
c) Query
d) Relational Schema

60. An attribute A of datatype varchar(20) has the value “Avi”. The attribute B of datatype
char(20) has value ”Reed”. Here attribute A has __ spaces and attribute B has __ spaces.
a) 3, 20
b) 20, 4
c) 20, 20
d) 3, 4

61. The ____ clause is used to list the attributes desired in the result of a query.
a) Where
b) Select
c) From
d) Distinct

62.

SELECT * FROM employee WHERE salary>10000 AND dept_id=101;


Which of the following fields are displayed as output?
a) Salary, dept_id
b) Employee
c) Salary
d) All the field of employee relation

63.

SELECT name __ instructor name, course id


FROM instructor, teaches
WHERE instructor.ID= teaches.ID;
Which keyword must be used here to rename the field name?
a) From
b) Rename
c) As
d) Join

64. ’_ _ _ ’ matches any string of __ three characters. ’_ _ _ %’ matches any string of at __


three characters.
a) Atleast, Exactly
b) Exactly, Atleast
c) Atleast, All
d) All, Exactly

65.

SELECT name
FROM instructor
WHERE dept name = ’Physics’
ORDER BY name;
By default, the order by clause lists items in __ order.
a) Descending
b) Any
c) Same
d) Ascending

66. The intersection operator is used to get the ___ tuples.


a) Different
b) Common
c) All
d) Repeating

67. The number of attributes in relation is called as its


a) Cardinality
b) Degree
c) Tuples
d) Entity

68. ___ clause is an additional filter that is applied to the result.


a) Select
b) Group-by
c) Having
d) Order by

69. A ___ indicates an absent value that may exist but be unknown or that may not exist at
all.
a) Empty tuple
b) New value
c) Null value
d) Old value

70. Using the __ clause retains only one copy of such identical tuples.
a) Null
b) Unique
c) Not null
d) Distinct

71. The primary key must be


a) Unique
b) Not null
c) Both Unique and Not null
d) Either Unique or Not null

72.

SELECT ____
FROM instructor
WHERE dept name= ’Comp. Sci.’;
Which of the following should be used to find the mean of the salary ?
a) Mean(salary)
b) Avg(salary)
c) Sum(salary)
d) Count(salary)
73.
SELECT COUNT (__ ID)
FROM teaches
WHERE semester = ’Spring’ AND YEAR = 2010;

If we do want to eliminate duplicates, we use the keyword ____in the aggregate expression.
a) Distinct
b) Count
c) Avg
d) Primary key

74. SQL applies predicates in the ___ clause after groups have been formed, so aggregate
functions may be used.
a) Group by
b) With
c) Where
d) Having

75. Aggregate functions can be used in the select list or the____clause of a select statement
or subquery. They cannot be used in a ___ clause.
a) Where, having
b) Having, where
c) Group by, having
d) Group by, where

76. Which of the following is a correct identifier in C++?


a) 7var_name
b) 7VARNAME
c) VAR_1234
d) $var_name

77. What are the 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

78. By default, all the files in C++ are opened in _________ mode.
a) Text
b) Binary
c) ISCII
d) VTC
79. Which of the following is the default mode of the opening using the ofstream class?
a) ios::in
b) ios::out
c) ios::app
d) ios::trunc

80. Which function is used to reposition the file pointer?


a) moveg()
b) seekg()
c) changep()
d) go_p()
TRE 3.0 & 4.0 Mock Test-4

1. What happens if the following program is executed in C and C++?


#include <stdio.h>
void func(void)
{
printf("Hello");
}
void main()
{
func();
func(2);
}
a) Outputs Hello twice in both C and C++
b) Error in C and successful execution in C++
c) Error in C++ and successful execution in C
d) Error in both C and C++

2. Which of the following is correct about this pointer in C++?


a) this pointer is passed as a hidden argument in all static variables of a class
b) this pointer is passed as a hidden argument in all the functions of a class
c) this pointer is passed as a hidden argument in all non-static functions of a class
d) this pointer is passed as a hidden argument in all static functions of a class

3. Which of the following type is provided by C++ but not C?


a) double
b) float
c) int
d) bool

4. Which is more effective while calling the C++ functions?


a) call by object
b) call by pointer
c) call by value
d) call by reference

5. What will be the output of the following C++ code?


1. #include <iostream>
2. using namespace std;
3. int main()
4. {
5. char c = 74;
6. cout << c;
7. return 0;
8. }
a) I
b) J
c) A
d) N

6. Which keyword is used to define the macros in c++?


a) #macro
b) #define
c) macro
d) define

7. What is the correct syntax of accessing a static member of a class in C++?


---------------------------
Example class:
class A
{
public:
static int value;
}
---------------------------
a) A->value
b) A^value
c) A.value
d) A::value

8. What is Inheritance in C++?


a) Deriving new classes from existing classes
b) Overloading of classes
c) Classes with same names
d) Wrapping of data into a single class

9. What is the benefit of C++ input and output over c input and output?
a) Both Type safety & Exception
b) Sequence container
c) Exception
d) Type safety

10. What will be the output of the following C++ code snippet?
1. #include <stdio.h>
2. #include<iostream>
3. using namespace std;
4. int main ()
5. {
6. int array[] = {0, 2, 4, 6, 7, 5, 3};
7. int n, result = 0;
8. for (n = 0; n < 8; n++)
9. {
10. result += array[n];
11. }
12. cout << result;
13. return 0;
14. }
a) 21
b) 27
c) 26
d) 25

11. Wrapping data and its related functionality into a single entity is known as
_____________
a) Abstraction
b) Encapsulation
c) Polymorphism
d) Modularity

12. What does polymorphism in OOPs mean?


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

13. Which of the following shows multiple inheritances?


a) A->B->C
b) A->B; A->C
c) A,B->C
d) B->A

14. How access specifiers in Class helps in Abstraction?


a) They does not helps in any way
b) They allows us to show only required things to outer world
c) They help in keeping things together
d) Abstraction concept is not used in classes

15. C++ is ______________


a) procedural programming language
b) object oriented programming language
c) functional programming language
d) both procedural and object oriented programming language

16. Which operator is overloaded for a cout object?


a) >>
b) <<
c) <
d) >

Explanation: cout in C++ uses << operator to print anything so << operator is
overloaded for a cout object.

17. Which of the following cannot be used with the virtual keyword?
a) Class
b) Member functions
c) Constructors
d) Destructors

Explanation: Virtual keyword cannot be used with constructors as constructors are


defined to initialized an object of particular class hence no other class needs constructor
of other class.

18. Which concept is used to implement late binding?


a) Virtual functions
b) Operator functions
c) Constant functions
d) Static functions
19. Which of the following 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

20. Which of the following 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

21. Which of the following is a static polymorphism mechanism?


a) Function overloading
b) Operator overloading
c) Templates
d) All of the mentioned

22. Which of the following is true?

I) All operators in C++ can be overloaded.

II) The basic meaning of an operator can be changed.


a) I only
b) II only
c) Both I and II
d) Neither I nor II

23. Which of the following is not a type of inheritance?


a) Multiple
b) Multilevel
c) Distributive
d) Hierarchical

24. A data structure in which elements can be inserted or deleted at/from both ends but
not in the middle is?
a) Priority queue
b) Dequeue
c) Circular queue
d) Queue

25. How do you initialize an array in C?


a) int arr[3] = (1,2,3);
b) int arr(3) = {1,2,3};
c) int arr[3] = {1,2,3};
d) int arr(3) = (1,2,3);

26. When does the ArrayIndexOutOfBoundsException occur?


a) Compile-time
b) Run-time
c) Not an error
d) Not an exception at all

27. Process of removing an element from stack is called __________


a) Create
b) Push
c) Evaluation
d) Pop

28. The postfix form of the expression (A+ B)*(C*D- E)*F / G is?
a) AB+ CD*E – FG /**
b) AB + CD* E – F **G /
c) AB + CD* E – *F *G /
d) AB + CDE * – * F *G /

29. The process of accessing data stored in a serial access memory is similar to
manipulating data on a ________
a) Heap
b) Binary Tree
c) Array
d) Stack

30. The prefix form of an infix expression (p + q) – (r * t) is?


a) + pq – *rt
b) – +pqr * t
c) – +pq * rt
d) – + * pqrt

31. A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
a) Rear = MAX_SIZE – 1
b) Front = (rear + 1)mod MAX_SIZE
c) Front = rear + 1
d) Rear = front

32. Queues serve major role in ______________


a) Simulation of recursion
b) Simulation of arbitrary linked list
c) Simulation of limited resource allocation
d) Simulation of heap sort

33. In linked list each node contains a minimum of two fields. One field is data field to
store the data second field is?
a) Pointer to character
b) Pointer to integer
c) Pointer to node
d) Node

34. Consider the following definition in c programming language.


struct node
{
int data;
struct node * next;
}
typedef struct node NODE;
NODE *ptr;

Which of the following c code is used to create new node?


a) ptr = (NODE*)malloc(sizeof(NODE));
b) ptr = (NODE*)malloc(NODE);
c) ptr = (NODE*)malloc(sizeof(NODE*));
d) ptr = (NODE)malloc(sizeof(NODE));

35. Linked list is considered as an example of ___________ type of memory allocation.


a) Dynamic
b) Static
c) Compile time
d) Heap

36. Which of the following sorting algorithms can be used to sort a random linked list
with minimum time complexity?
a) Insertion Sort
b) Quick Sort
c) Heap Sort
d) Merge Sort

37. A binary search tree contains values 7, 8, 13, 26, 35, 40, 70, 75. Which one of the
following is a valid post-order sequence of the tree provided the pre-order sequence as
35, 13, 7, 8, 26, 70, 40 and 75?
a) 7, 8, 26, 13, 75, 40, 70, 35
b) 26, 13, 7, 8, 70, 75, 40, 35
c) 7, 8, 13, 26, 35, 40, 70, 75
d) 8, 7, 26, 13, 40, 75, 70, 35

38. A full binary tree can be generated using ______


a) post-order and pre-order traversal
b) pre-order traversal
c) post-order traversal
d) in-order traversal

39. Which of the architecture is power efficient?


a) RISC
b) ISA
c) IANA
d) CISC

40. If an exception is raised and the succeeding instructions are executed completely,
then the processor is said to have ______
a) Generation word
b) Exception handling
c) Imprecise exceptions
d) None of the mentioned

41. The small extremely fast, RAM’s all called as ________


a) Heaps
b) Accumulators
c) Stacks
d) Cache

42. The memory devices which are similar to EEPROM but differ in the cost
effectiveness is ______
a) CMOS
b) Memory sticks
c) Blue-ray devices
d) Flash memory

43. The usual BUS structure used to connect the I/O devices is ___________
a) Star BUS structure
b) Multiple BUS structure
c) Single BUS structure
d) Node to Node BUS structure

44. The advantage of I/O mapped devices to memory mapped is ___________


a) The former offers faster transfer of data
b) The devices connected using I/O mapping have a bigger buffer space
c) The devices have to deal with fewer address lines
d) No advantage as such

45. The signal sent to the device from the processor to the device after receiving an
interrupt is ___________
a) Interrupt-acknowledge
b) Return signal
c) Service signal
d) Permission signal

46. The program used to find out errors is called __________


a) Debugger
b) Compiler
c) Assembler
d) Scanner

47. _____ is/are types of exceptions.


a) Trap
b) Interrupt
c) System calls
d) All of the mentioned

48. The fastest data access is provided using _______


a) Caches
b) DRAM’s
c) SRAM’s
d) Registers

49. The memory which is used to store the copy of data or instructions stored in larger
memories, inside the CPU is called _______
a) Level 1 cache
b) Level 2 cache
c) Registers
d) TLB

50. The reason for the implementation of the cache memory is ________
a) To increase the internal memory of the system
b) The difference in speeds of operation of the processor and memory
c) To reduce the memory access and cycle time
d) All of the mentioned

51. What are nodes in a computer network?


a) the computer that routes the data
b) the computer that terminates the data
c) the computer that originates the data
d) all of the mentioned

52. Which of the following devices forwards packets between networks by processing
the routing information included in the packet?
a) firewall
b) bridge
c) hub
d) router
53. How do two devices become part of a network?
a) PIDs of the processes running of different devices are same
b) a process in one device is able to exchange information with a process in another
device
c) a process is active and another is inactive
d) a process is running on both devices

54. Which of this is not a network edge device?


a) Switch
b) PC
c) Smartphones
d) Servers

55. Which of the following allows LAN users to share computer programs and data?
a) File server
b) Network
c) Communication server
d) Print server

56. Which of the following is used in an attempt to render a computer resource


unavailable to its intended users?
a) botnet process
b) worms attack
c) virus attack
d) denial-of-service attack

57. Bluetooth is an example of __________


a) personal area network
b) local area network
c) virtual private network
d) wide area network

58. Network congestion occurs _________


a) in case of traffic overloading
b) when a system terminates
c) when connection between two nodes terminates
d) in case of transfer failure

59. Which of the following networks extends a private network across public networks?
a) local area network
b) virtual private network
c) enterprise private network
d) storage area network

60. The functionalities of the presentation layer include ____________


a) Data compression
b) Data encryption
c) Data description
d) All of the mentioned

61. Delimiting and synchronization of data exchange is provided by __________


a) Application layer
b) Session layer
c) Transport layer
d) Link layer

62. TCP/IP model was developed _____ the OSI model.


a) prior to
b) after
c) simultaneous to
d) with no link to

63. If you have to send multimedia data over SMTP it has to be encoded into _______
a) Binary
b) Signal
c) ASCII
d) Hash

64. Choose the statement which is wrong incase of SMTP?


a) It requires message to be in 7bit ASCII format
b) It is a pull protocol
c) It transfers files from one mail server to another mail server
d) SMTP is responsible for the transmission of the mail through the internet

65. SMTP uses which of the following TCP port?


a) 22
b) 23
c) 21
d) 25
66. Which of the following is a feature of the database?
a) No-backup for the data stored
b) User interface provided
c) Lack of Authentication
d) Store data in multiple locations

67. _________________ operations do not preserve non-matched tuples.


a) Left outer join
b) Inner join
c) Natural join
d) Right outer join

68. Which of the following is not the utility of DBMS?


a) Backup
b) Data Loading
c) Process Organization
d) File organization

69. Which of the following is the subset of SQL commands used to manipulate Oracle
Structures, including tables?
a) Data Described Language
b) Data Retrieval Language
c) Data Manipulation Language
d) Data Definition Language

70. The oldest DB model is _______________


a) Network
b) Physical
c) Hierarchical
d) Relational

71. In the __________ normal form, a composite attribute is converted to individual


attributes.
a) First
b) Second
c) Third
d) Fourth

72. Tables in second normal form (2NF):


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

73. There are two functional dependencies with the same set of attributes on the left
side of the arrow:
A->BC
A->B
This can be combined as
a) A->BC
b) A->B
c) B->C
d) None of the mentioned

74. A relation is in ____________ if an attribute of a composite key is dependent on an


attribute of other composite key.
a) 2NF
b) 3NF
c) BCNF
d) 1NF

75. ____________ is a combination of two of more attributes used as a primary key


a) Composite Key
b) Alternate Key
c) Candidate Key
d) Foreign Key

76. ____________ is a special type of stored procedure that is automatically invoked


whenever the data in the table is modified.
a) Procedure
b) Trigger
c) Curser
d) None of the Mentioned

77. ______________ requires that data should be made available to only authorized
users.
a) Data integrity
b) Privacy
c) Security
d) None of the Mentioned
78. Some of the utilities of DBMS are _____________
i) Loading ii) Backup iii) File organization iv) Process Organization
a) i, ii, and iv only
b) i, ii and iii only
c) ii, iii and iv only
d) All i, ii, iii, and iv

79.
SELECT *
FROM instructor
ORDER BY salary ____, name ___;

To display the salary from greater to smaller and name in ascending order which of the
following options should be used?
a) Ascending, Descending
b) Asc, Desc
c) Desc, Asc
d) Descending, Ascending

80. The query given below will not give an error. Which one of the following has to be
replaced to get the desired output?

SELECT ID, name, dept_name, salary * 1.1


WHERE instructor;
a) Salary*1.1
b) ID
c) Where
d) Instructor

You might also like