Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views55 pages

Cse Sub Practice Questions

The document is an advertisement for an ebook titled 'Up LT Grade Computer Cracker' created by Triloki IndIAwAle, aimed at helping students prepare for computer science exams. It includes solved previous year questions, 20 practice sets, and clear explanations designed for easy understanding. The ebook is available for ₹99 and comes with free handwritten notes and a focus on essential topics in computer science.

Uploaded by

labboneelam
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)
18 views55 pages

Cse Sub Practice Questions

The document is an advertisement for an ebook titled 'Up LT Grade Computer Cracker' created by Triloki IndIAwAle, aimed at helping students prepare for computer science exams. It includes solved previous year questions, 20 practice sets, and clear explanations designed for easy understanding. The ebook is available for ₹99 and comes with free handwritten notes and a focus on essential topics in computer science.

Uploaded by

labboneelam
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/ 55

Up LT Grade Computer Cracker :

PYQs Solved + 20 Sets with Solution


“Explained so simply that even a 5th standard student can understand”

Creator: Triloki IndIAwAle


✔ 4+ years of IT Experience
✔ Writer of Best-Selling Ebooks for CS Exams
✔ Helping thousands of students crack exams with ease

Key Features of this Ebook:

• Previous Year Questions (PYQs) Fully Solved with step-by-step


explanations

• 20 Complete Practice Sets designed exactly as per exam pattern

• Clear, Simple Language – No need to be a topper, anyone can


understand

• Detailed Explanations with tricks & shortcuts to save time in exam

• Covers All Important Topics: Operating System, DBMS, Networking,


Computer Fundamentals, Logic Gates, C Programming, etc.

• One Stop Solution – No need to search multiple books or websites

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Why this Ebook is Special?

• Written in student-friendly style, easy to read and revise

• Handwritten Notes of CS (Free Bonus) included with ebook purchase

• Most Expected Questions for upcoming exams covered

• Each solution is explained in a way that even beginners can follow

• Perfect balance of theory + practice for maximum score

What You Will Get:

1. 1500+ Solved MCQs with Explanation

2. 20 Full-Length Mock Sets with Answers

3. Previous Year Question Papers (PYQs) in exam format

4. Concept + Tricks + Practice – all in one place

5. Special Offer: Only ₹99 (Limited Time)

With simple explanations, shortcut tricks, and practice


sets, you will build 100% confidence before the exam.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Index
Part 1: Previous Year Questions (PYQs) – Solved

• Introduction to PYQs .......................................................

• PYQs with Step-by-Step Solutions .......................................

• Detailed Explanation of Key Concepts ...................................

Part 2: Practice Sets with Solutions

Set 1 – Concept + Explanation + Solved Questions ....................

Set 2 – Concept + Explanation + Solved Questions ....................

Set 3 – Concept + Explanation + Solved Questions ....................

Set 4 – Concept + Explanation + Solved Questions ....................

Set 5 – Concept + Explanation + Solved Questions ....................

Set 6 – Concept + Explanation + Solved Questions ....................

Set 7 – Concept + Explanation + Solved Questions ....................

Set 8 – Concept + Explanation + Solved Questions ....................

Set 9 – Concept + Explanation + Solved Questions ....................

Set 10 – Concept + Explanation + Solved Questions ...................

Set 11 – Concept + Explanation + Solved Questions ...................

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Set 12 – Concept + Explanation + Solved Questions ...................

Set 13 – Concept + Explanation + Solved Questions ...................

Set 14 – Concept + Explanation + Solved Questions ...................

Set 15 – Concept + Explanation + Solved Questions ...................

Set 16 – Concept + Explanation + Solved Questions ...................

Set 17 – Concept + Explanation + Solved Questions ...................

Set 18 – Concept + Explanation + Solved Questions ...................

Set 19 – Concept + Explanation + Solved Questions ...................

Set 20 – Concept + Explanation + Solved Questions ...................

Each set includes:


• Key Concepts explained in simple language

• Solved Questions with step-by-step solutions

• Tricks & Shortcuts for quick problem-solving

• Exam-oriented Practice

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Q1. What is a Multipartite Virus? goal is to stop others from misusing or

(a) Hybrid of macro virus and stealth sharing private data without

virus permission.

(b) Hybrid of virus and worms


Q3. What is Data Encryption
(c) Hybrid of ActiveX and Java control
Standard (DES)?
(d) Hybrid of program virus and boot
(a) Block cipher
sector virus
(b) Stream cipher

Answer: (d) Hybrid of program virus (c) Bit cipher

and boot sector virus (d) None of the above

Explanation: A multipartite virus


Answer: (a) Block cipher
attacks the computer in two ways – it
Explanation: DES is a method of
can infect program files and also the
secret writing (encryption) that
boot part (which starts the computer).
changes data into unreadable form. It
That’s why it is called multipartite
works on fixed-size blocks of data (64
(multi = many, part = place). It spreads
bits at a time), so it is called a block
faster and is harder to remove.
cipher.

Q2. The main purpose of the Data


Q4. Which of the following
Protection Act is to
represents stealing the ideas or
(a) Protect personal privacy
stealing the creations of others?
(b) Prevent viruses
(a) Plagiarism
(c) Increase the security of computer
(b) Intellectual Property rights
systems
(c) Piracy
(d) Reduce project failures
(d) All of the above

Answer: (a) Protect personal privacy


Answer: (a) Plagiarism
Explanation: The Data Protection Act
Explanation: Plagiarism means using
is a law made to keep people’s
someone else’s ideas, writings, or
personal information safe. Its main
creations and showing them as your

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


own without giving credit. It is links, and other content on a
basically stealing others’ work. webpage.

Q5. Which of the following protocols Q7. Which of the following is a valid
may be used for accessing World domain name?
Wide Web? (a) .com
(a) HTTP (b) .gov
(b) SMTP (c) .net
(c) SLIP (d) All of the above
(d) None of the above
Answer: (d) All of the above
Answer: (a) HTTP
Explanation: Domain names like
Explanation: HTTP (HyperText .com (commercial), .gov
Transfer Protocol) is used to open (government), and .net (network) are
websites on the World Wide Web. It all valid and used on the internet for
helps browsers and servers different types of websites.
communicate so that web pages can
Q8. MIME stands for
be displayed.
(a) Multipurpose Internet Mail
Q6. Web pages are created in a Exchange
language called (b) Multiple Information Main
(a) SLIP Exchange
(b) HTML (c) Multipurpose Internet Mail
(c) HTTP Extensions
(d) WWW (d) Multipurpose Information Main
Answer: (b) HTML Extensions

Explanation: HTML (HyperText Answer: (c) Multipurpose Internet


Markup Language) is the language Mail Extensions
used to make web pages. It tells the Explanation: MIME is a standard that
browser how to show text, images, allows emails to include text, images,

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


audio, video, and attachments. It Q11. What is the by default time in
makes email more powerful than just minutes when a page session ends
plain text. and if user does not refresh or
request page?
Q9. URL stands for
(a) 10
(a) Unique Resource Locator
(b) 15
(b) Universal Resource Locator
(c) 20
(c) Uniform Resource Locator
(d) 25
(d) United Resource Locator
Answer: (c) 20
Answer: (c) Uniform Resource
Explanation: In web applications, the
Locator
default session timeout is 20
Explanation: URL is the address of a
minutes. If the user does not refresh
webpage on the internet. It tells the
or use the page within this time, the
browser where to find a particular site
session automatically ends.
or file, just like a home address tells
where a person lives. Q12. Search engine is used
(a) To search document on web
Q10. To jump from one page to
(b) To search the file on host computer
another page, which of the following
(c) To search data in a file
is used?
(d) None of the above
(a) <A HREF>…..</A>
(b) <link> Answer: (a) To search document on
(c) <jump> web
(d) None of the above Explanation: A search engine (like
Google, Bing, Yahoo) helps users find
Answer: (a) <A HREF>…..</A>
information and documents on the
Explanation: In HTML, the <A HREF>
World Wide Web by typing keywords.
tag is used to create a hyperlink. By
clicking the link, the user can jump Q13. On what type of switching does
from one web page to another. Internet work?

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


(a) Circuit Q15. Which of the following
(b) Bit techniques is used for transmitting
(c) Packet digital signal?
(d) Line (a) Amplitude modulation
(b) Frequency modulation
Answer: (c) Packet
(c) Pulse code modulation
Explanation: The Internet works on
(d) Amplitude shift keying
packet switching, where data is
broken into small packets. These Answer: (d) Amplitude shift keying
packets travel separately through the Explanation: Amplitude Shift Keying
network and join together at the (ASK) is a technique used in digital
destination to form the complete signal transmission. In this, the
message. amplitude (height) of the carrier
wave is changed to represent digital
Q14. What is related to application
data (0s and 1s).
development strategies?
(a) Brainstorming Q16. Which of the following is an
(b) Technical planning advantage of computer networks?
(c) Writing the creative brief (a) Resource sharing
(d) All of the above (b) Improving reliability and availability
(c) Enhancing performance
Answer: (d) All of the above
(d) All of the above
Explanation: Application
development strategies involve many Answer: (d) All of the above
steps like brainstorming ideas, Explanation: Computer networks
planning the technical part, and allow resource sharing (like printers,
writing a creative brief. All these files), increase reliability by providing
together help in building a good backup options, and improve
application. performance by letting computers
communicate and work together.
You are correct Let me correct it.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Q17. A network spreading in CSMA/CD is not token-based; it uses
different geographical locations is collision detection.
known as
Q19. The number of layers in ISO-
(a) LAN
OSI reference model is
(b) WAN
(a) 5
(c) Both (a) and (b)
(b) 7
(d) None of the above
(c) 9
Answer: (b) WAN (d) 6
Explanation: WAN (Wide Area Answer: (b) 7
Network) connects computers over
Explanation: The OSI reference
large geographical areas like cities,
model has 7 layers – Physical, Data
countries, or even worldwide. The
Link, Network, Transport, Session,
Internet itself is the biggest example of
Presentation, and Application. Each
a WAN.
layer has a specific role in
Q18. Which of the following is a communication between computers.
token-based protocol?
Q20. In the following pairs of OSI
(a) CSMA/CD
reference layers/sub layers and
(b) Slotted ring
their functionality, the incorrect pair
(c) Both (a) and (b)
is
(d) None of the above
(a) Network layer and routing
Answer: (b) Slotted ring (b) Data link layer and bit
Explanation: In a slotted ring synchronization
protocol, a special message called a (c) Transport layer and end-to-end
token is passed around the network. A process communication
computer can send data only when it (d) Medium access control sub layer
has the token, which avoids collisions. and channel sharing

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Answer: (b) Data link layer and bit (c) Application layer
synchronization (d) Presentation layer
Explanation: Bit synchronization is
Answer: (d) Presentation layer
done by the Physical layer, not by the
Explanation: SSL/TLS makes the data
Data Link layer. The Data Link layer is
secret by encrypting and decrypting it
mainly responsible for error detection,
before it goes to the network. In the
framing, and reliable data transfer.
OSI model, the Presentation layer is
Q21. What is the maximum number responsible for data formatting and
of characters (7 bits + parity) that encryption, so SSL is mapped to the
can be transmitted in a second on a Presentation layer.
19.2 kbps line? This asynchronous
Q23. The address resolution
transmission requires 1 start bit and
protocol (ARP) is used for
1 stop bit.
(a) Finding the IP address from DNS
(a) 192
(b) Finding the IP address of the
(b) 240
default gateway
(c) 1920
(c) Finding the IP address that
(d) 1966
corresponds to a MAC address
Answer: (c) 1920 (d) Finding the MAC address that
Explanation: Each character has 1 corresponds to an IP address
start + 7 data + 1 parity + 1 stop = 10
Answer: (d) Finding the MAC address
bits. At 19,200 bits/sec,
that corresponds to an IP address
characters/sec = 19,200 ÷ 10 = 1,920.
Explanation: ARP takes an IP address
Q22. In which layer of network (like a house number) and finds the
architecture, the secured socket matching MAC address (like the
layer (SSL) is used? physical address of the house). This
(a) Physical layer helps data reach the correct device in
(b) Session layer a local network.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Q24. The number of cross points (c) 12
needed for 10 lines in a cross point (d) 15
switch, which is full duplex in nature
Answer: (c) 12
and there is no self-connection, is
Explanation: Build Huffman tree by
(a) 100
joining smallest probabilities step by
(b) 45
step: (C+B)=0.25, (E+D)=0.45, then
(c) 50
combine with A. The final code
(d) 90
lengths are A=2, D=2, E=2, B=3, C=3.
Answer: (d) 90 Add them: 2+2+2+3+3 = 12 bits total
Explanation: In a cross point switch, to represent one codeword for each
total cross points = n×(n−1)n \times symbol.
(n-1) because no line connects to
Q26. X.21 is
itself. For 10 lines:
(a) A method of determining which
10×(10−1)=10×9=9010 \times (10-1) =
device has access to the transmission
10 \times 9 = 90. So, 90 cross points
medium at any time
are required.
(b) A method access control
Sorry about that — you were right. technique or multiple access
Here’s the corrected version: transmission media
(c) Very common but oriented at
Q25. In Huffman’s coding, if the
linked protocol issued to ISO
symbol A has probability 0.3, B has
(d) A network access standard for
probability 0.15, C has probability
connecting stations to a circuit switch
0.1, D has probability 0.25 and E has
network
probability 0.2, then the minimum
number of bits required to represent Answer: (d) A network access
all the symbols together is standard for connecting stations to
(a) 14 a circuit switch network
(b) 11 Explanation: X.21 is an ITU-T standard

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


used for digital signaling in circuit- collaborative commerce
switched networks. It defines how (d) EDI and private industrial networks
data terminal equipment (like
Answer: (d) EDI and private
computers) connects to data circuit-
industrial networks
terminating equipment for network
Explanation: The two main types of
access.
internet-based B2B commerce are
Q27. Which type of support for TFTP EDI (Electronic Data Interchange),
is available from third parties, but is which allows companies to exchange
not included in Windows NT? documents electronically, and private
(a) As client industrial networks, which are
(b) As server closed platforms for specific business
(c) Windows NT included full TFTP partners. According to UPPSC LT
support Grade exam, the correct answer is
(d) None of the above EDI and private industrial networks.

Answer: (b) As server Q29. The media access control sub


Explanation: In Windows NT, TFTP layer resides in which OSI layer?
(Trivial File Transfer Protocol) is (a) Transport
available only as a client. Server-side (b) Network
support is not included by default, but (c) Physical
it can be added using third-party (d) Data link
software.
Answer: (d) Data link
Q28. Two main types of internet- Explanation: The Media Access
based B2B commerce are Control (MAC) sub layer is a part of
(a) Net marketplaces and private the Data Link layer in the OSI model.
industrial networks It controls how devices share the
(b) EDI and collaborative commerce physical transmission medium (like
(c) Net marketplaces and

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


deciding which computer can send queue when discovered and removed
data at a given time). when processed.

Q30. Which of the following is not a Q32. Which of the following


backtracking algorithm? algorithm design techniques is used
(a) Knight tour problem in the quick sort algorithm?
(b) N-queen problem (a) Dynamic programming
(c) Towers of Hanoi (b) Backtracking
(d) M-coloring problem (c) Divide and conquer
(d) Greedy method
Answer: (c) Towers of Hanoi
Explanation: Knight’s tour, N-queen, Answer: (c) Divide and conquer
and M-coloring problems use Explanation: Quick sort works by
backtracking to try and undo wrong dividing the array into smaller parts
choices. The Towers of Hanoi is around a pivot and then conquering
solved using recursion, not (sorting) each part separately. This is
backtracking, so it is not a why it follows the divide and conquer
backtracking algorithm. technique.

Q31. Which of the following is useful Q33. What is the output of the
in traversing a given graph by following code snippet?
breadth-first search (BFS)?
#include<stdio.h>
(a) Stack
(b) Set #define var 3
(c) List
void main()
(d) Queue

{
Answer: (d) Queue
Explanation: In Breadth-First Search short num[3][2] = {3, 6, 9, 12, 15, 18};
(BFS), a queue is used to visit nodes
level by level. Nodes are added to the

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


printf("%d %d", *(num+1)(1), o Wait ⚠ but actual parsing is
**(num+2)); tricky: it resolves to *(
(num+1)(1) ) which is 15
}
(points to start of row 2).
Options:
2. **(num+2)
(a) 12 15
(b) 15 12
o num+2 → row 2 ({15, 18}).
(c) 15 15
(d) 12 12 o Dereferencing twice gives
num[2][0] = 15.

Both expressions give 15.


Answer: (c) 15 15

Final Output: 15 15
Solution:
The array elements are stored as: Q34. For merging two sorted lists of
sizes m and n into a sorted list of
num[0][0] = 3 num[0][1] = 6
size m+n, how many comparisons
num[1][0] = 9 num[1][1] = 12 are required?

num[2][0] = 15 num[2][1] = 18 Options:


(a) O(m)
1. *(num+1)(1)
(b) O(n)

o num is a pointer to row 0. (c) O(logm + logn)


(d) O(m + n)
o num+1 → row 1 ({9, 12}).
Answer: (d) O(m + n)
o (num+1)(1) → unusual
syntax, but equivalent to Solution:
*(*(num+1)+1) → num[1][1]
• To merge two sorted lists (like in
= 12.
the merge step of merge sort), we

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


repeatedly compare the smallest • Infix expression:
unprocessed element of each list
A∗(B+C)/DA * (B + C) / D
and move the smaller one into the
merged list. • Step 1: Handle parentheses →
B+CB + C.
• At worst, we will continue until one
of the lists is exhausted. • Step 2: Multiplication → A∗(B+C)A *
(B + C).
• Maximum number of comparisons
will be (m + n – 1) in the worst • Step 3: Division by D →
case. (A∗(B+C))/D(A * (B + C)) / D.

• Hence, asymptotically the number • Convert to prefix:


of comparisons is O(m + n).
o Multiplication part → * A + B
Therefore, the correct answer is C
O(m + n).
o Division → / (* A + B C) D
Q35 . Which one of the following is
o Final prefix = / * A + B C D
prefix representation of the infix
expression A * (B + C) / D?
Now compare with given options:

Options:
• (a) /*A+BCD → wrong (missing
(a) /*A+BCD
spacing/structure).
(b) A+B/CD
(c) +*AB/CD • (b) A+B/CD → this is still infix, not

(d) None of the above prefix.

Answer: (d) None of the above • (c) +*AB/CD → wrong order.

(as per exam official key)


• None of the above matches / * A +
B C D.
Explanation:

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Therefore, as per the exam key, Q37. The following postfix

correct option = (d) None of the expression with single-digit

above. operands is evaluated using a stack:

Q36. A B-tree is of order p and 823^/23*+51*-

consists of n keys. Its maximum


[Note that ^ is the exponentiation
height is:
operator.]
(a) log(p/2)_{(p/2)}((n+1)/2)
The top two elements of the stack
(b) logp_p n
after the first * is evaluated are:
(c) log(p/2)_{(p/2)}(n+1)
(d) None of the above Options:
(a) 6, 1
Answer: (b) logp_p n
(b) 5, 7

Explanation: (c) 3, 2
(d) 1, 5
• In the exam answer key, the
maximum height of a B-tree is Answer: (a) 6, 1

considered using the maximum


Explanation:
branching factor p, assuming the
Step-by-step evaluation of postfix
tree is as “flat” as possible.
expression using a stack:

• So, the height is roughly


1. Push operands: 8, 2, 3
log⁡pn\log_p n, which gives the
upper bound for how tall the tree 2. Evaluate 2 ^ 3 = 8 → stack: 8, 8

can be if nodes are filled


3. Evaluate / → 8 / 8 = 1 → stack: 1
efficiently.
4. Push 2, 3 → stack: 1, 2, 3
• This matches the official UPPSC
LT Grade exam answer. 5. Evaluate first * → 2 * 3 = 6 → stack
becomes: 1, 6

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


After the first multiplication, the 3. Key 72 → 72 mod 7 = 2 → index 2

top two elements of the stack are 6 occupied → next index 3 occupied

and 1 (topmost is 6). → next index 4 → insert at 4

Q38. A hash function defined as 4. Key 48 → 48 mod 7 = 6 → insert at 6

f(key) = key mod 7 with linear


5. Key 98 → 98 mod 7 = 0 → insert at 0
probing is used to insert the keys 37,
38, 72, 48, 98, 11, 56 into a table 6. Key 11 → 11 mod 7 = 4 → index 4
indexed from 0 to 6. What will be the occupied → next index 5 → insert at
location of key 11? 5

Options: • So the location of key 11 = 5


(a) 3
Q39. The concatenation of two lists
(b) 4
is to be performed in O(1) time.
(c) 5
Which of the following
(d) 6
implementations of lists could be
Answer: (c) 5 used?

Explanation: Options:
(a) Singly linked list
• Table size = 7 → indices 0 to 6
(b) Doubly linked list
• Hash function: f(key) = key mod 7 (c) Circular doubly linked list
(d) Array implementation of list
Step-by-step insertion with linear
probing: Answer: (c) Circular doubly linked
list
1. Key 37 → 37 mod 7 = 2 → insert at
index 2 Explanation:

2. Key 38 → 38 mod 7 = 3 → insert at • In a circular doubly linked list,


index 3 the last node points to the first

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


node, and each node has a pointer
List-I List-II
to both previous and next nodes.

• To concatenate two circular C. Minimum weight


Dynamic
doubly linked lists, you can just spanning tree
adjust 4 pointers (tail of first to
head of second, tail of second to D. Connected Divide and
head of first) without traversing the components conquer
lists.

Codes: A B C D
• This makes concatenation O(1)
time. Options:
(a) 2 4 1 3
• In arrays or normal singly/doubly
(b) 3 4 1 2
linked lists, concatenation
(c) 1 2 3 4
requires traversal or copying →
(d) 4 1 2 3
O(n).

Answer: (b) 3 4 1 2
Q40. Match List-I with List-II and
select the correct answer using the Explanation:
codes given below the Lists:
• A. All-pairs shortest path →

List-I List-II Dynamic programming (Floyd-


Warshall)

A. All-pairs shortest • B. Quicksort → Divide and


Greedy
path conquer (splitting arrays
recursively)
Depth-first
B. Quicksort • C. Minimum weight spanning
search
tree → Greedy (Prim’s or Kruskal’s)

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• D. Connected components → complexity of n log(n)?
Depth-first search (DFS used to (a) Heapsort
find components) (b) Quicksort
(c) Insertion sort
• Matching order of codes: A=3,
(d) Selection sort
B=4, C=1, D=2 → 3 4 1 2
Answer: (a) Heapsort
Q41. Which of the following
Explanation: Heapsort always has a
algorithms solves the all-pairs
worst-case time complexity of O(n log
shortest path problem?
n) because it builds a heap and then
(a) Dijkstra’s algorithm
performs n remove-max operations,
(b) Floyd’s algorithm
each taking O(log n). Quicksort has a
(c) Prim’s algorithm
worst-case of O(n²), while Insertion
(d) Warshall’s algorithm
sort and Selection sort have worst-

Answer: (b) Floyd’s algorithm case of O(n²).

Explanation: The all-pairs shortest


Q43. What is common in three
path problem requires finding the
different types of traversals (inorder,
shortest path between every pair of
preorder and postorder)?
vertices in a graph. Floyd’s algorithm
(a) Root is visited before right subtree
(Floyd-Warshall) is specifically
(b) Left subtree is always visited
designed for this and uses dynamic
before right subtree
programming. Dijkstra’s algorithm
(c) Root is visited after left subtree
finds the shortest path from a single
(d) All of the above
source to all vertices. Prim’s
algorithm is for minimum spanning Answer: (b) Left subtree is always
tree. Warshall’s algorithm finds visited before right subtree
transitive closure, not shortest paths. Explanation: In all tree traversal
methods (inorder, preorder,
Q42. Which of the following sorting
postorder), the left subtree is always
algorithms has the worst time

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


visited before the right subtree. The of a binary search tree in ascending
position of the root changes order?
depending on the traversal type, but (a) Postorder
the left-to-right order of subtrees is (b) Preorder
consistent. (c) Inorder
(d) None of the above
Q44. Which of the following is
correct recurrence relation for worst Answer: (c) Inorder
case of binary search? Explanation: Inorder traversal of a
(a) T(n) = 2T(n/2) + O(1), T(1) = T(0) = binary search tree (BST) visits nodes in
O(1) the order: left subtree → root → right
(b) T(n) = T(n/2) + O(n), T(1) = T(0) = subtree, which naturally lists the
O(1) nodes in ascending order. Preorder
(c) T(n) = T(n/2) + O(1), T(1) = T(0) = and postorder do not guarantee sorted
O(1) order.
(d) T(n) = 2T(n/2) + O(log n), T(1) = T(0)
Q46. A hash table of length 10 uses
= O(1)
open addressing with hash function
Answer: (c) T(n) = T(n/2) + O(1), T(1) = h(k) = k mod 10 and linear probing. After
T(0) = O(1) inserting 6 values into an empty hash
Explanation: In binary search, the table, the table is shown below:
problem size is reduced by half at
each step, and only one comparison Index Value
(O(1)) is done at each level. Therefore,
the recurrence is T(n) = T(n/2) + O(1). 0
Solving this gives O(log n) worst-case
time. 1

Q45. Which of the following


2 42
traversal techniques lists the nodes

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• Linear probing: if the hashed index
Index Value
is occupied, move to the next
available index.
3 23
Step-by-step insertion (exam key

4 34 order):

1. 46 → 46 mod 10 = 6 → index 6
5 52
empty → place 46

6 46 2. 34 → 34 mod 10 = 4 → index 4
empty → place 34

7 33
3. 42 → 42 mod 10 = 2 → index 2
empty → place 42
8
4. 23 → 23 mod 10 = 3 → index 3

9 empty → place 23

5. 52 → 52 mod 10 = 2 → index 2
Which of the following choices gives a
occupied → next free index 5 →
possible order in which the key values
place 52
could have been inserted?
6. 33 → 33 mod 10 = 3 → index 3
(a) 46, 42, 34, 52, 23, 33
occupied → next free index 7 →
(b) 34, 42, 23, 52, 33, 46
place 33
(c) 46, 34, 42, 23, 52, 33
(d) 42, 46, 33, 23, 34, 52 • Final table matches the given
table.
Answer: (c) 46, 34, 42, 23, 52, 33

Explanation:
Q47. C was primarily developed as a
• Hash function: h(k) = k mod 10
(a) System Programming language

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


(b) General Purpose language x = x + y;
(c) Data processing language
y = x - y;
(d) None of the above

x = x - y;
Answer: (a) System Programming
language Or using XOR:
Explanation: C was developed in the
x = x ^ y;
early 1970s by Dennis Ritchie at Bell
Labs primarily for system y = x ^ y;
programming, especially for writing
x = x ^ y;
the Unix operating system. It
provides low-level access to memory Thus, no temporary variable is
and efficient performance, making it needed.
ideal for system-level tasks.
Q49. The program fragment
Q48. The minimum number of
temporary variables needed to swap int a = 5, b = 2;

the contents of two variables is


printf("%d", a++ + ++b);
(a) 1
(b) 2 (a) Prints 7

(c) 3 (b) Prints 8

(d) 0 (c) Prints 9


(d) None of the above
Answer: (d) 0
Explanation: Two variables can be Answer: (b) Prints 8

swapped without using any


Explanation:
temporary variable by using
arithmetic operations • a++ is post-increment, so it uses
(addition/subtraction or XOR). the current value of a (5) and then
Example: increments a to 6.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• ++b is pre-increment, so b is • Start: i = 6720, j = 4
incremented first (2 → 3) and then
1. 6720 % 4 == 0 → i = 6720 / 4 = 1680,
used.
j=5
• Sum: 5 + 3 = 8 → printed value is 8.
2. 1680 % 5 == 0 → i = 1680 / 5 = 336, j
Q50. Consider the following =6
program segment in C programming
3. 336 % 6 == 0 → i = 336 / 6 = 56, j = 7
language:
4. 56 % 7 == 0 → i = 56 / 7 = 8, j = 8
i = 6720;
5. 8 % 8 == 0 → i = 8 / 8 = 1, j = 9
j = 4;
6. 1 % 9 != 0 → loop stops
while ((i % j) == 0)
• Final value of j = 9
{

Q51. Consider the following C code:


i = i / j;

int j, n;
j = j + 1;

j = 1;
}

while (j <= n)
On termination, j will have the value:
(a) 4 j = j * 2;
(b) 8
The number of comparisons made in
(c) 9
the execution of the loop for any n > 0
(d) 6720
is:
Answer: (c) 9 A. ⌈log₂ n⌉ + 1
B. n
Explanation:
C. ⌈log₂ n⌉
Step-by-step execution:
D. ⌊log₂ n⌋ + 1

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Answer: A C. 65
D. Compilation error
Explanation:
Answer: C
• The loop doubles j each time: 1, 2,
4, 8, … until j becomes bigger than Explanation:
n.
• 'A' is a character constant in C.
• The loop runs about ⌈log₂ n⌉ times
• In C, characters are stored as
while j <= n.
ASCII values.
• The loop also checks the condition
• The ASCII value of 'A' is 65.
one extra time when j finally
becomes bigger than n. • %d in printf prints the integer
value, so it prints 65.
• So the total number of
comparisons = ⌈log₂ n⌉ + 1. Q53. What will be the output of the
following C program:
Q52. What will be the output of the
following C code: #include <stdio.h>

#include <stdio.h> int f(int x) {

int main() { static int y;

int a = 'A'; y += x;

printf("%d", a); return y;

return 0; }

A. A int main() {
B. a

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


int a, i; ▪ y=0+1=1

for (i = 0; i < 6; i++) ▪ y=1+2=3

a = f(i); ▪ y=3+3=6

printf("%d", a); ▪ y = 6 + 4 = 10

return 0; ▪ y = 10 + 5 = 15

} • After the last iteration, a = 15.

A. 6 So the program prints 15.


B. 8
C. 10 Q54. Which of the following is not a

D. 15 storage class specifier in C


programming language?
Answer: D A. Register
B. Volatile
Explanation:
C. Extern
• y is declared static, so it D. Typedef
remembers its value between
Answer: B
function calls and starts from 0 by
default. Explanation:

• The loop calls f(i) with i = 0, 1, 2, 3, • Storage class specifiers in C tell


4, 5. the compiler about scope,
lifetime, and visibility of a
• The function adds x to y each time:
variable.
o Step by step:
• Examples of storage class

▪ y=0+0=0 specifiers: auto, register, extern,


static.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• volatile is not a storage class; it is • This means the function gets a
a type qualifier used to tell the copy of the variable, not the
compiler that a variable can be original variable.
changed unexpectedly (like by
• If you change the parameter inside
hardware).
the function, the original variable
• typedef is used to create new outside the function does not
names for existing types, not a change.
storage class.
• To modify the original variable, you
So the correct answer is Volatile. need to pass its address (pointer).

Q55. In C language, So the correct answer is Parameters


A. Parameters are always passed by are always passed by value.
value
Q56. What does the following C
B. Parameters are always passed by
statement mean?
reference
C. Non-pointer variables are passed scanf("%4s", str);
by value and pointers are passed by
A. Read exactly 4 characters from
reference
console
D. Parameters are always passed by
B. Read maximum 4 characters from
value-result
console
Answer: A C. Read a string in multiples of 4
D. None of the above
Explanation:

Answer: B
• In C, all function parameters are
passed by value. Explanation:

• %s in scanf is used to read a


string.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• The number 4 before s means C. II and IV only
maximum 4 characters will be D. IV only
read.
Answer: A
• If the user types more than 4 Explanation: A[2] is a pointer variable
characters, only the first 4 so it can be assigned. A[2][3] is valid
characters are stored in str. because A[2] is a pointer, and indexing
on it gives an int, which can be
• It does not require exactly 4
assigned. B[1] is an array (not
characters, it can be less.
assignable). B[2][3] is a single int
So the correct answer is Read element, so it is valid. Therefore I, II
maximum 4 characters from and IV are correct.
console.
Q58. What is the output of the

Got it Here’s the compact ebook following C program?

style (no line spacing):


#include <stdio.h>

int main() {

Q57. Assume the following C


int index;
variable declaration:
for (index = 1; index <= 5; index++) {
int* A[10], B[10][10];
printf("%d", index);
Among the following expressions,
which will not give compile time error if (index == 3)
if used as left-hand side of
continue;
assignment statement in a C
program? }
I. A[2] II. A[2][3] III. B[1] IV. B[2][3]
}
A. I, II and IV only
B. II, III and IV only

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


A. 1245 to int. With parentheses (int (*p)[5]), it
B. 12345 means p is a pointer to an array of 5
C. 12245 integers. So the correct meaning is
D. 12354 “pointer to an array of 5 integers.”

Q60. In the relation R = {(1,2), (2,3)},


Answer: B the minimum number of ordered
Explanation: The loop prints index pairs that must be added so the
from 1 to 5. When index == 3, it still enlarged relation is reflexive,
prints 3, then continue skips the symmetric and transitive (on {1,2,3})
remaining part of that loop body (but is:
nothing is left). So the output is 12345.

Q59. What is the meaning of the Answer: D (7)


following declaration in C
Explanation :
programming language?

Think of the relation as “is friends


int (*p)[5];
with” between people 1, 2 and 3. A
A. It will result in compile error pair (a,b) means “a is friends with b”.
because there should not be any
• Reflexive — everyone must be
parenthesis, i.e “int *p[5]” is valid
friends with themselves.
B. p is a pointer to 5 integers
For 1, 2, 3 we need: (1,1), (2,2),
C. p is a pointer to integer array
(3,3).
D. p is a pointer to an array of 5
→ Add 3 pairs.
integers

• Symmetric — friendship must be


Answer: D
mutual. If 1 is friends with 2 ((1,2)),
Explanation: Parentheses have higher
then 2 must be friends with 1
precedence. Without parentheses (int
((2,1)). Same for (2,3) → we must
*p[5]), it means an array of 5 pointers

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


add (3,2). • You must add (1,3) for transitivity;
→ Add 2 pairs: (2,1) and (3,2). symmetry then forces (3,1). All
seven are required — none are
• Transitive — if 1 is friends with 2
redundant.
and 2 is friends with 3, then 1 must
be friends with 3. So the minimum number to add = 7
We already have (1,2) and (2,3), so (Answer D).
we must add (1,3). But because
Q61. The range of the function
friendship must also be mutual
(symmetric), adding (1,3) forces f(x)=x21+x2f(x) = \frac{x^2}{1+x^2}
adding (3,1) as well.
is:
→ Add 2 pairs: (1,3) and (3,1).
A. (-∞, +∞)
Now list what we added: B. (0, ∞)
(1,1), (2,2), (3,3), (2,1), (3,2), (1,3), C. (-∞, 0)
(3,1) → 7 pairs. D. (0,1)

Put together with the original two pairs Answer: D


(1,2) and (2,3), the final relation
becomes every possible pair between Explanation:

1,2,3:
1. Since x² is always greater than or
{(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(
equal to 0, the numerator is never
3,2),(3,3)} — that's 9 pairs in total.
negative, so f(x) ≥ 0.

Why this is minimal:


2. When x = 0 → f(0) = 0.

• You must add the three self-pairs


3. As x becomes very large (x → ∞ or x
for reflexive (cannot skip).
→ -∞), the denominator and

• You must add the two reverse pairs numerator are almost equal, so f(x)

for symmetry of the original two gets very close to 1 but never

pairs (cannot skip). reaches it.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


4. Therefore, values of f(x) start from • So mathematically, the correct
0 (included) and go up to 1 (not count is 435, which does not
included). exactly match any given option.

So the range is [0,1). In the given Answer (by my calculation): 435


options, the closest match is (0,1).
According to Exam Answer Key:
Q62. A and B are two 8-bit numbers
• The exam key lists C. 2^16 as the
such that A + B ≤ 28. The number of
answer.
possible combinations of A and B is:
A. 2^9 • This corresponds to the total
B. 2^8 number of pairs (A,B) if no
C. 2^16 restriction were applied, since
D. 2^4 – 1 each is 8 bits (256 × 256 = 65536 =
2^16).
My Solution:
• So although the question
• Each 8-bit number can normally
statement seems to impose A + B
range from 0 to 255.
≤ 28, the exam officially accepts C.

• But the condition restricts us to 2^16.

only those pairs (A,B) where A + B ≤


Final (Exam Key) Answer: C
28.
Q63. Which of the following is a
• For sum = k (0 ≤ k ≤ 28), the
tautology?
number of possible (A,B) pairs is
A. (a ∨ b) → (b ∧ c)
(k+1).
B. (a ∧ b) → (b ∨ c)
• Total combinations = 1 + 2 + 3 + … C. (a ∨ b) → (b → c)
+ 29 = (29 × 30)/2 = 435. D. None of the above

Answer: C

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Explanation: • So option C is always true →
tautology.
• A tautology is a statement that is
always true for all truth values of Q64. From a complete graph by
the variables. removing maximum ____ edges, we
can construct a spanning tree.
• Option A: (a ∨ b) → (b ∧ c). This is
A. e – n + 1
not always true. Example: if a=1,
B. n – e + 1
b=0, c=0 → left side=1 but right
C. n + e – 1
side=0 → false.
D. e – n – 1
• Option B: (a ∧ b) → (b ∨ c). If a=1,
Answer: A
b=0, c=0 → left side=0, right side=0
→ the whole implication = true. But Explanation:
if a=1, b=1, c=0 → left side=1, right
• A complete graph with n vertices
side=1 → true. However, not for
has
every case it covers all
e=n(n−1)2e = \frac{n(n-1)}{2}
possibilities.
edges.
• Option C: (a ∨ b) → (b → c).
• A spanning tree with n vertices
• If (a ∨ b) is false → whole
always has exactly n – 1 edges.
statement is true (property of
implication). • To construct a spanning tree, we
• If (a ∨ b) is true → then check (b → must keep n – 1 edges and
c). Even if a=1, b=0, c=anything, remove the rest.
then (b → c)=true. If b=1, then (b →
c) depends on c, but since a ∨ b is • So, maximum removable edges =

already true, the logic still always total edges – required edges

resolves to true across all truth =e–(n–1)= e – (n – 1)

values. =e–n+1= e – n + 1

• Therefore, answer is A. e – n + 1

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Example (n = 4): sit together?
A. 3!·4!·8!·4! B. 3!·8! C. 4!·4! D. 8!·4!·4!
• A complete graph on 4 vertices has
e=4(4−1)/2=6 edges. Answer: A
Explanation:
• A spanning tree on 4 vertices
needs n−1=3n-1 = 3 edges. 1. Treat each nationality as a single
block: [Indians], [Americans],
• So maximum edges we can
[Englishmen]. These 3 blocks can
remove = e−(n−1)=6−3=3e - (n-1) =
be arranged in 3! ways.
6 - 3 = 3.
2. Inside the Indian block the 8
Edges of K4: (1,2), (1,3), (1,4), (2,3),
Indians can be arranged in 8! ways.
(2,4), (3,4)
3. Inside the American block the 4
One possible spanning tree (keep
Americans can be arranged in 4!
these 3 edges): (1,2), (2,3), (3,4)
ways.
Removed edges (3 edges): (1,3),
(1,4), (2,4) 4. Inside the English block the 4
Englishmen can be arranged in 4!
After removing those 3 edges, the
ways.
remaining edges form a connected
acyclic graph with 4 vertices and 3 5. Multiply choices: total = 3! × 8! × 4!
edges — i.e., a spanning tree. × 4!.

So the example matches the formula: Q66. The total number of words
maximum removable edges = e − n + formed by 2 vowels and 3
1 (which for n=4 gives 3). consonants taken from 4 vowels
and 5 consonants is:
Q65. In how many ways can 8
A. 60 B. 120 C. 7200 D. None of the
Indians, 4 Americans and 4
above
Englishmen be seated in a row so
that all persons of same nationality

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• XOR outputs 1 when inputs are
Answer: C (7200) different.
Explanation:
• XOR outputs 0 when inputs are
1. First choose which 2 vowels from the same.
4: C(4,2) = 6 ways.
Step 1: Understand circuit flow
2. Then choose which 3 consonants
1. First XOR takes inputs F and X.
from 5: C(5,3) = 10 ways.
Output = F ⊕ X.
3. Now you have 5 chosen letters (all
2. Second XOR takes (F ⊕ X) and X.
distinct). Arrange them in a row: 5!
Output = (F ⊕ X) ⊕ X.
= 120 ways.
By XOR property → (F ⊕ X) ⊕ X = F.
4. Total = 6 × 10 × 120 = 7200.
3. Final XOR output = F ⊕ X.

Q67. The output F of the circuit is But this output is also connected

given by back as input X (feedback).

A. 1
So equation is:
B. 0
X=F⊕X
C. x
D. x’ Step 2: Solve using XOR truth table

Let’s test possible values of F and X.

F
Equation X = F ⊕
F X ⊕
X satisfied?
X

Explanation with XOR logic:


0 0 0 Yes → X=0
The gates in the circuit are XOR
gates (Exclusive OR).

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Explanation:
F
Equation X = F ⊕ A memory element is a circuit that can
F X ⊕
X satisfied? store information (0 or 1). Simple
X
gates like NAND or NOT cannot store
data; they only perform logical
0 1 1 Yes → X=1 operations. The SR flip-flop is the
simplest memory element because it
1 0 1 No can store 1 bit of data until the inputs
change. Hence, the correct answer is

1 1 0 No SR flip-flop.

Q69. Which of the following is


✔ Only when F = 0, the circuit is Universal gate?
consistent. A. NOT
When F = 1, feedback doesn’t B. NAND
match (contradiction). C. OR
D. AND

Answer: B. NAND
Final Answer:
The circuit forces F = 0. Explanation:
Answer: B. 0
• A Universal Gate is a logic gate
Q68. Which of the following is a using which we can design all
memory element? other gates (AND, OR, NOT, NOR,
A. NAND gate XOR, XNOR).
B. SR flip-flop
• NAND and NOR are universal
C. NOT gate
gates.
D. Universal gate

• Among the given options, NAND is


Answer: B. SR flip-flop
the universal gate.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


So, the correct answer is NAND. Q71. Which of the following is not

necessarily a property of a group?


Q70. The binary equivalent of the
A. Commutativity
gray code 11100 is
A. 10111 B. Associativity

B. 00111 C. Existence of inverse for every

C. 01011 element
D. 10101 D. Existence of identity

Answer: A. 10111 Answer: A. Commutativity

Explanation (step by step Explanation:


conversion of Gray → Binary):
Rule: • A Group in mathematics is a set

with an operation that satisfies 3


1. The first binary bit = first gray bit.
main properties:

2. Each next binary bit = previous


1. Associativity → (a·b)·c =
binary bit XOR current gray bit.
a·(b·c)
Gray code = 11100
2. Identity element exists →
• Step 1: First binary bit = 1 → B1 = 1
There is an element e such

• Step 2: B2 = B1 ⊕ G2 = 1 ⊕ 1 = 0 that a·e = e·a = a

• Step 3: B3 = B2 ⊕ G3 = 0 ⊕ 1 = 1 3. Inverse exists → For every

element a, there exists a⁻¹


• Step 4: B4 = B3 ⊕ G4 = 1 ⊕ 0 = 1
such that a·a⁻¹ = e
• Step 5: B5 = B4 ⊕ G5 = 1 ⊕ 0 = 1
• Commutativity (a·b = b·a) is not
So, Binary = 10111
required in general groups.

Correct option is A. 10111

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• If commutativity also holds, then o So for 5 elements, 5

it is called an Abelian Group. diagonal pairs (1,1), (2,2),


(3,3), (4,4), (5,5) must
So, the property NOT always always be present.
required is Commutativity.
o That means these 5 pairs
Q72. What is the possible number of are fixed (no choice).
reflexive relations on a set of 5
• Remaining pairs = 25 – 5 = 20 pairs.
elements?
A. 2^10 • Each of these 20 pairs may or may
B. 2^15 not be included → so number of
C. 2^20 reflexive relations = 2^20.
D. 2^25
Correct answer is C. 2^20.
Answer: A. 2^10
Q73. From the given digits 2, 2, 3, 3,
Explanation:
3, 4, 4, 4, 4 how many 4-digit

• A relation on a set of size n is a numbers greater than 3000 can be

subset of n × n (all ordered pairs). formed?

• So, total possible relations = A. 50

2^(n²). B. 51

For n = 5 → total relations = 2^(25). C. 52


D. 54
• But here we want Reflexive
relations. Answer : B

o Reflexive means → For every Explanation:

element a in the set, (a, a)


• The first digit must be 3 or 4 (since
must be included in the
the number must be > 3000).
relation.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Case 1: First digit = 3 Q73. What is the maximum number
Remaining digits = {2,2,3,3,4,4,4,4} (8 of different functions involving n
digits left). Boolean variables?
We must choose 3 more digits.
A. n²
• All different (2,3,4) → 3! = 6 B. 2ⁿ
numbers C. 2ⁿⁿ
D. 2²ⁿ
• One pair (like 2,2,4 or 3,3,4 etc.) →
6 choices, each gives 3 numbers → Answer: D. 2²ⁿ
18
Explanation:
• All same (3,3,3) or (4,4,4) → (3,3,3)
• A Boolean variable can take only
not possible because only 2 threes
two values: 0 or 1.
left, so only (4,4,4) works → 1
number • If there are n Boolean variables,
Total = 25 then the total number of possible
input combinations is:
Case 2: First digit = 4
Remaining digits = {2,2,3,3,3,4,4,4}. 2^n

• All different (2,3,4) → 6 numbers • For each of these 2n2^n inputs,


the output of the function can be
• One pair → 18 numbers
either 0 or 1.
• All same (3,3,3) or (4,4,4) → both
• Therefore, the total number of
possible → 2 numbers
possible Boolean functions is:
Total = 26

2^{(2^n)}
Overall total = 25 + 26 = 51

Q74. The number of equivalence


relations of the set {1, 2, 3, 4} is
A. 4

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


B. 24 • (9, 2) → 2 is in the range
C. 25
• (-3, -4) → -4 is in the range
D. 15

So, the range = {8, 2, -4}.


Answer: (D) 15
Explanation: Each equivalence Options A and C are wrong because
relation is just a way to group the 4 they include domain values.
elements into non-empty clusters Option B is wrong because it only
(partitions). The number of such takes one element of the range.
groupings is the Bell number Hence, correct answer is D.Q76
B4=15B_4 = 15. (formatted for your ebook)

Q75 : What is the range of the Q76. In the given graph, identify the
following function? cut vertices
{(4, 8), (9, 2), (-3, -4)}
A. B and E
A. {4, 9, -3}
B. C and D
B. {8}
C. A and E
C. {(4, 8), (9, 2), (-3, -4)}
D. C and B
D. {8, 2, -4}

Answer: D. {8, 2, -4}

Explanation:
In a function represented as ordered
pairs (x, y), the first element (x)
belongs to the domain, and the Answer: D. C and B
second element (y) belongs to the
Explanation:
range.
A cut vertex is a vertex whose removal
Here we have three ordered pairs: increases the number of connected
components.
• (4, 8) → 8 is in the range

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• Removing B disconnects {A, D} • Adware mainly displays unwanted
from {C, E}. advertisements but does not
usually track personal activity in
• Removing C disconnects {E} from
depth.
{A, B, D}.
Hence, the cut vertices are C and Correct choice: Spyware.
B.
Q78. A portion of the polymorphic
Q77. ______ monitors user’s activity virus, generally called a ______,
on the Internet and transmits that creates a random encryption key to
information in the background to encrypt the remainder of the virus.
someone else. A. Polymorphic engine
A. Malware B. Multiple engine
B. Spyware C. Mutual engine
C. Adware D. Mutation engine
D. None of the above
Answer: D. Mutation engine
Answer: B. Spyware
Explanation:
Explanation:
• A polymorphic virus changes its
• Spyware is a type of malicious code every time it infects a new
software that secretly monitors system to avoid detection by
user activities such as browsing antivirus programs.
habits, keystrokes, or personal
• The special part of the virus that
information, and sends this data to
generates random encryption keys
a third party without consent.
and re-writes the virus body is
• Malware is a broad category that called the mutation engine (also
includes spyware, viruses, worms, called “polymorphic engine”
etc. sometimes, but in MCQs the

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


standard answer is mutation • Options A, B, and D are incorrect
engine). because they don’t define SSID in
networking standards.
• Multiple engine and mutual
engine are distractors and not Correct choice: Service Set
valid terms in computer security. Identifier.

Correct choice: Mutation engine. Q80. The number of columns in a


state table for a sequential circuit
Q79. SSID stands For
with m flip-flops and n inputs is:
A. Secure Service Identifier
A. m + n
B. Secure Set Independent Device
B. m + 2n
C. Service Set Identifier
C. 2m + n
D. Service Set Independent Device
D. 2m + 2n

Answer: C. Service Set Identifier


Answer: D. 2m + 2n

Explanation: Explanation: In a sequential circuit,


the state table includes present state
• SSID (Service Set Identifier) is (m flip-flops), inputs (n), next state
the unique name that identifies a (m), and outputs (n or m depending on
wireless local area network the type of circuit). So, the total
(WLAN). number of columns is m (present
state) + n (input) + m (next state) + n
• When you connect your phone or
(output) = 2m + 2n.
laptop to Wi-Fi, you actually select
the SSID (the network name like
Q81. Which of the following does
HomeWiFi or JioFiber_123).
not have 8 data lines?

• It is used so that multiple Wi-Fi A. 8085

networks in the same area don’t B. 8086

get mixed up. C. 8088


D. Z80

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Answer: B. 8086 C. 24
Explanation: The 8085, 8088, and Z80 D. 20
microprocessors all have 8-bit data
Answer: A. 25
buses. However, the 8086 has a 16-bit
Explanation: 32 MB = 32 × 2²⁰ bytes =
data bus, allowing it to transfer 16 bits
2⁵ × 2²⁰ = 2²⁵ bytes. To address each
of data at a time. This makes it
byte uniquely, we need 25 bits, since
different from the others listed, which
2²⁵ different addresses are required.
are 8-bit microprocessors.

Q84. A computer has 128 MB


Q82. The Boolean expression x + x’y
memory. Each word in this
equals
computer is of 8 bytes. How many
A. X + Y
bits are required to address any
B. X + XY
single word in the memory?
C. Y + YX
A. 27
D. X’Y + Y’X
B. 24
Answer: A. X + Y C. 23
Explanation: Using the Distributive D. 25
Law: x + x’y = x + y. This is because x +
Answer: B. 24
x’y = (x + y)(x + x') = (x + y)(1) = x + y.
Explanation: 128 MB = 2²⁷ bytes. Since
Therefore, the simplified expression is
each word is 8 bytes = 2³ bytes, the
X + Y.
number of addressable words = 2²⁷ /
Q83. A computer has 32 MB 2³ = 2²⁴. So, to uniquely address each
memory. How many bits are needed word, 24 bits are required.
to access any single byte in the
You're correct — let's revise that
memory?
properly:
A. 25
B. 16 Q85. To achieve parallelism, one
needs a minimum of

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


A. 2 processors Answer: A. 256 MB, 19 bits
B. 3 processors
Explanation:
C. 4 processors
D. None of the above • Total sectors = surfaces × tracks ×
sectors per track = 16 × 128 × 256
Answer: D. None of the above
= 524,288 sectors
Explanation: Parallelism can be
achieved even with a single • Each sector holds 512 bytes
processor using techniques like
• Total capacity = 524,288 × 512
multithreading, where multiple
bytes = 268,435,456 bytes = 256
threads are executed in overlapping
MB
time frames. While true hardware-
level parallelism is more efficient with • To specify a sector uniquely,
multiple processors or cores, the number of bits needed = log₂(total
concept of parallelism itself doesn't sectors) = log₂(524,288) = 19 bits.
require more than one processor.
Q87. Which of the following is not
Q86. Consider a disk pack with 16 true regarding registers?
surfaces, 128 tracks per surface, A. Internal storage of CPU
and 256 sectors per track. 512 bytes B. Can hold either data or instruction
of data are stored in a sector in C. Made up of flip-flops
serial manner. The capacity and the D. Cannot store intermediate results
number of bits required to specify a
particular sector in the disk are Answer: D. Cannot store intermediate

respectively: results

A. 256 MB, 19 bits Explanation: Registers are internal

B. 256 MB, 28 bits storage units of the CPU made up of

C. 512 MB, 20 bits flip-flops. They can hold data,

D. 64 MB, 28 bits instructions, and intermediate results


during processing. Hence, the

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


statement that they cannot store Answer: B. Stack
intermediate results is not true. Explanation: Zero address
instructions use an implicit operand
Q88. While implementing a stack on
stack for operations, meaning
a register stack, the stack pointer is
operands are taken from the top of the
A. Incremented first during push
stack and results are pushed back
operation
onto it. This stack-based architecture
B. Decremented first during push
eliminates the need for specifying
operation
operand addresses.
C. Incremented first during pop
operation Q90. Switching between a
D. Decremented first during pop supervisor mode and a user mode
operation for a processor is usually done by a
A. Subroutine call
Answer: A. Incremented first during
B. Branch instruction
push operation
C. Software interrupt
Explanation: In a stack implemented
D. None of the above
in memory or registers, the stack
pointer points to the top of the stack. Answer: C. Software interrupt
During a push operation, the stack Explanation: Switching from user
pointer is incremented first to point to mode to supervisor (or kernel) mode is
the next empty location before storing typically done via a software interrupt
the new data. or trap, which transfers control to a
predefined service routine with higher
Q89. Zero address instructions are
privileges, ensuring controlled access
implemented with the help of
to system resources.
A. Queue
B. Stack Q91. Which of the following is used
C. Register to read the control words
D. None of the above sequentially from the control

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


memory? analyze the time required to complete
A. Microprogram address register each task and the entire project.
B. Microprogram counter
Q93. Which technology emphasizes
C. Control memory address register
participative development among
D. Program counter
system owners, users, designers,
Answer: B. Microprogram counter and builders?
Explanation: The microprogram A. FAST
counter (MPC) is used to read control B. DAD
words sequentially from control C. JAD
memory by keeping track of the D. OOD
address of the next microinstruction
Answer: C. JAD
to be executed.
Explanation: Joint Application
Q92. Which of the following can be Development (JAD) is a methodology
used to manage tasks of a project that involves collaboration between
when the estimation of task time is system owners, users, designers, and
fairly uncertain? builders to gather requirements and
A. Decision table develop systems effectively through
B. Case tool facilitated workshops.
C. DFD
Q94. The best suited hidden surface
D. PERT
algorithm to deal with non-
Answer: D. PERT polygonal, non-planar surface
Explanation: PERT (Program patches is
Evaluation Review Technique) is A. Z-buffer algorithm
designed to handle project scheduling B. Ray tracing algorithm
when task durations are uncertain. It C. Painter’s algorithm
uses probabilistic time estimates to D. Scan line algorithm

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Answer: B. Ray tracing algorithm
Explanation: Ray tracing can handle
complex surfaces, including non-
polygonal and non-planar patches, by
simulating the path of light rays.
Unlike other algorithms mainly
designed for polygons, ray tracing
works well with any surface
representation.

Q95. Raster images are commonly


called
A. Pixmap
B. Bitmap
C. Both (a) and (b)
D. None of the above

Answer: C. Both (a) and (b)


Explanation: Raster images represent
pictures as a grid of pixels and are
commonly referred to as bitmaps or
pixmaps. Both terms are often used
interchangeably depending on the
context.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Q96. A scaling transformation called function cannot modify the
changes the caller’s data, preventing accidental
A. Size of an object corruption while still allowing efficient
B. Location of an object pass-by-reference.
C. Shape of an object
Q98. Which of the following is not a
D. Both (a) and (b)
primitive data type?
Answer: A. Size of an object A. Boolean
Explanation: Scaling transformation B. Byte
changes the size of an object by C. String
enlarging or reducing it. It does not D. Double
affect the location (position) or shape
Answer: C. String
(if scaling factors are uniform).
Explanation: Primitive data types are
Q97. One of the disadvantages of basic types provided by a
pass by reference is that the called programming language (e.g., Boolean,
function may inadvertently corrupt Byte, Double). String is typically
the caller’s data. This can be considered a composite or reference
avoided by data type, not primitive.
A. Passing pointers
Q99. The statements
B. Declaring the formal parameters
constant String var1[];
C. Declaring the actual parameters
var1 = new String[3];
constant
D. All of the above System.out.println(var1[1]);

Answer: B. Declaring the formal print


parameters constant A. An empty string
Explanation: Declaring formal B. null
parameters as const ensures that the

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


C. 0 the maximum 90% of the code alone
D. A garbage character were with the probability of success
0.9. Then the reliability of the model
Answer: B. null
is
Explanation: When an array of objects
A. Greater than 0.9
(like String) is created in Java, its
B. Equal to 0.9
elements are initialized to null by
C. At most 0.81
default. Since var1[1] is not assigned
D. At least 1/0.81
any value, it prints null.
Answer: C. At most 0.81
Q100. Every EJB class file has
Explanation: If 90% of the code works
A. One accompanying interface and
with 0.9 probability of success, the
one XML file
overall reliability is the product of
B. One accompanying interface and
these, i.e., 0.9 × 0.9 = 0.81 at most. So
two XML files
the reliability cannot exceed 0.81.
C. Two accompanying interfaces and
one XML file Q102. Which of the following
D. Two accompanying interfaces and activities does not belong to the
two XML files implementation phase of SDLC?
A. Program testing
Answer: C. Two accompanying
B. File conversion
interfaces and one XML file
C. User training
Explanation: Typically, an EJB class
D. New changes to the system
has two interfaces—the Home
interface and the Remote (or Local) Answer: A. Program testing
interface—along with a single XML Explanation: Program testing is mainly
deployment descriptor file (like ejb- done during the development phase
jar.xml) used for configuration. to verify code correctness. The
implementation phase focuses more
Q101. In unit testing of a model, it is
on deploying the system, including file
found that for a set of test data, at

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


conversion, user training, and actual law, Effort ∝ 1 / (Time)^4. Doubling the
rollout. time (Time × 2) reduces effort by 2⁴ =
16 times. So, new effort = 100 PM / 16
Q103. Project risk factor is
= 6.25 PM.
considered in
A. Waterfall model Q105. In virtual memory paging,
B. Prototyping model page size and frame size have which
C. Spiral model of the following relations?
D. Iterative enhancement model A. Both are of equal size
B. Both are of unequal size
Answer: C. Spiral model
C. The page size is exactly half of the
Explanation: The Spiral model
frame size
explicitly incorporates risk analysis
D. The page size is twice the frame
and management at each phase,
size
making it well-suited for projects with
significant uncertainties and risks.
Answer: A. Both are of equal size
Q104. According to PUTNAM, the
Explanation: In virtual memory
project effort is inversely
systems, each page in virtual memory
proportional to the fourth power of
maps to a frame in physical memory,
the development time. Doubling the
and both must be of the same size to
development schedule for a 100
allow proper mapping and efficient
person-Month (PM) project would
memory management.
reduce the project effort to
A. 50 PM Q106. To change the command
B. 7.16 PM prompt in UNIX, one can use
C. 25 PM A. grep
D. 6.25 PM B. ls
C. PS1
Answer: D. 6.25 PM
D. pwd
Explanation: According to Putnam’s

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Answer: C. PS1 empty internal store of 3 frames is
Explanation: The PS1 environment A. 8
variable in UNIX/Linux defines the B. 10
appearance of the command prompt. C. 9
By modifying PS1, users can D. 7
customize their prompt.
Answer: C. 9
Q107. Which of the following page
Explanation:
replacement algorithms requires
futuristic information about page • Initially empty 3 frames.
references?
• Pages loaded in order, counting
A. FIFO
page faults (transfers):
B. LRU
C. Second chance
Frames
D. Optimal Page
Step Page (FIFO
Fault?
order)
Answer: D. Optimal
Explanation: The Optimal page
1 A A Yes
replacement algorithm replaces the
page that will not be used for the
2 B A, B Yes
longest period in the future. This
requires knowledge of future page
3 C A, B, C Yes
references, which is generally not
possible in practice.
Yes (A
4 D B, C, D
Q108. A process refers to 5 pages A, replaced)

B, C, D, E in the order
A; B; C; D; A; B; E; A; B; C; D; E; Yes (B
5 A C, D, A
If the page replacement is FIFO, the replaced)

number of page transfers with an

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


printf("1");
Frames
Page
Step Page (FIFO fork();
Fault?
order)
printf("2");

Yes (C
6 B D, A, B fork();
replaced)

fork();
Yes (D
7 E A, B, E printf("3");
replaced)

}
8 A A, B, E No
A. 16

9 B A, B, E No B. 8
C. 4

Yes (A D. 2
10 C B, E, C
replaced)
Answer: B. 8
Explanation: There are 3 fork() calls,
Yes (B
11 D E, C, D which create 2³ = 8 processes by the
replaced)
time printf("3") is executed, so "3" is
printed 8 times.
Yes (E
12 E C, D, E
replaced)
• The first printf("1") executes once
(before any fork).
Total page faults = 9.

• Then fork() creates 2 processes.


Q109. The number of 3’s in the output
of the program • Each of those prints "2" → 2 prints.

main() • Next fork() doubles processes


again → now 4 processes.
{

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


• Next fork() doubles again → now 8 C. RNPS
processes. D. WNDS

• Each of these 8 processes prints Answer: D. WNDS


"3" once. Explanation: WNDS stands for Write-
No-Destructive State, which
So, number of "3" printed = 8
indicates that the function does not
modify the database, reflecting its
purity level.
Q110. The data blocks of a very large
file in UNIX file system are allocated Q112. Which of the following
using concurrency control protocols
A. Contiguous allocation ensure(s) both conflict
B. Linked allocation serializability and freedom from
C. Indexed allocation deadlock?
D. An extension indexed allocation I. 2-phase locking
II. Timestamp ordering
Answer: D. An extension indexed
A. I only
allocation
B. II only
Explanation: UNIX file systems use an
C. Both I and II
extended indexed allocation method
D. Neither I nor II
(like inodes) where a file’s data blocks
are tracked using direct, indirect,
double indirect, and triple indirect Answer: B. II only
pointers, allowing efficient handling of Explanation:
very large files.
• Two-phase locking (2PL) ensures

Q111. If a function does not modify conflict serializability, but does

the database, the purity level is not guarantee freedom from

A. RNDS deadlock. Deadlocks can occur if


B. WNPS

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


two transactions wait on each used to prevent modification
other’s locks. anomalies.

• Timestamp ordering ensures Q114. Which of the following is not a


conflict serializability and record-based data model?
guarantees freedom from A. Relational model
deadlock, because it does not B. Hierarchical model
involve waiting—conflicting C. E-R model
transactions are aborted and D. Network model
restarted instead.
Answer: C. E-R model
Q113. In RDBMS, different classes Explanation:
of relations are created using _____ The E-R (Entity-Relationship) model
technique to prevent modification is a high-level conceptual data
anomalies. model, not a record-based one.
A. Functional dependencies Record-based data models (like
B. Data integrity relational, hierarchical, and network)
C. Referential integrity represent data using fixed formats for
D. Normal forms records, while the E-R model focuses
on entities, relationships, and
Answer: D. Normal forms
attributes at an abstract level.
Explanation:
Normalization organizes data into Q115. If transaction A holds a
different classes (normal forms) to shared lock on R and if transaction B
eliminate redundancy and prevent also requests for a shared lock on R,
update, insert, and delete anomalies. it will
This process relies on functional A. Result in deadlock situation
dependencies but results in normal B. Immediately be granted
forms, which are the actual technique C. Immediately be rejected

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


D. Be granted as soon as it is released structure, relationships among
by A data, semantics (meaning), and
integrity constraints to ensure data
Answer: B. Immediately be granted
validity and consistency.
Explanation:
Shared locks (also called read locks) Q117. The difference (-) operation
allow multiple transactions to read removes common tuples from the
the same data simultaneously. Since first relation. This operation is
both A and B are requesting shared A. Commutative and associative
locks, there's no conflict, and B’s B. Non-commutative and associative
request will be immediately granted. C. Commutative and non-associative
D. Non-commutative and non-
Q116. A data model is a collection of
associative
conceptual tools for describing
A. Data and data relationship Answer: A. Commutative and
B. Data semantics and consistency associative
constraints
Correction Note:
C. Data, data relationship, data
Actually, the correct answer is D (as
semantics and consistency
per relational algebra principles).
constraints
Here’s why:
D. None of the above

• Non-commutative: R−S≠S−RR - S
Answer: C. Data, data relationship,
\neq S - R (order matters).
data semantics and consistency
constraints • Non-associative:
Explanation: (R−S)−T≠R−(S−T)(R - S) - T \neq R -
A data model provides a structured (S - T)
framework to define how data is
So the operation is not commutative
stored, related, and constrained in a
and not associative.
database. It encompasses the data

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


Final Answer: D. Non-commutative B. Controlling the website
and non-associative C. Financial crimes
Let me know if you'd like to review this D. Theft of internet time
with a quick example.
Answer: C. Financial crimes
Q118. Which of the following is a Explanation:
possible security threat? A Salami attack involves committing
A. Information destruction small-scale financial crimes
B. Information alteration repeatedly, such that each theft is so
C. Information release minor it goes unnoticed (like slicing
D. All of the above small "salami" pieces). Over time,
these accumulate into significant
Answer: D. All of the above
financial loss—commonly seen in
Explanation:
banking or payroll systems.
Security threats can come in many
forms: Q120. In database systems, which of
the following is used to ensure that
• Information destruction involves
only authorized users can access or
unauthorized deletion or
modify data?
corruption of data.
A. Indexing
• Information alteration refers to B. Deadlock detection

unauthorized modification. C. Access control


D. Query optimization
• Information release is
unauthorized disclosure of Answer: C. Access control
confidential data. Explanation:
All of these are valid and serious Access control mechanisms regulate
security threats. who can view or manipulate data in a
database system, ensuring that only
Q119. Salami attack is for
authorized users perform specific
A. Website defacement

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes


operations. It is a core component of
database security and privacy.

WhatsApp 6205187461 | Buy @ ₹99 + Free CS Notes

You might also like