Mock Test-3 (Stet 2023)
Mock Test-3 (Stet 2023)
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
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
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
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
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.
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!>
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.
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
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
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