0% found this document useful (0 votes)
201 views32 pages

MCQs For RGPV CSEIT

The document contains multiple-choice questions (MCQs) covering various topics in the RGPV CSE/IT syllabus, including Programming in C, Data Structures, Algorithms, Operating Systems, Database Management Systems, and Computer Networks. Each question includes options, the correct answer, and an explanation for clarity. This set of questions is designed to prepare students for competitive exams.

Uploaded by

Ritesh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
201 views32 pages

MCQs For RGPV CSEIT

The document contains multiple-choice questions (MCQs) covering various topics in the RGPV CSE/IT syllabus, including Programming in C, Data Structures, Algorithms, Operating Systems, Database Management Systems, and Computer Networks. Each question includes options, the correct answer, and an explanation for clarity. This set of questions is designed to prepare students for competitive exams.

Uploaded by

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

MCQs for RGPV CSE/IT Syllabus (For Competitive Exams)

Set1 – 10 questions

1. Programming in C

Question: What is the output of the following C code?

#include <stdio.h>
int main() {
int x = 5;
printf("%d %d %d", x++, x++, ++x);
return 0;
}

A) 5 6 7
B) 7 6 5
C) 5 5 7
D) Undefined behavior

Answer: D) Undefined behavior

Explanation: The order of evaluation of arguments in a printf statement is not specified in the C
standard. The increments (x++ and ++x) modify x multiple times within the same expression
without an intervening sequence point, leading to undefined behavior. Competitive exams often
test such edge cases.

2. Data Structures

Question: What is the time complexity of inserting an element at the end of a singly linked list,
given only a pointer to the head?

A) O(1)
B) O(n)
C) O(log n)
D) O(n²)
Answer: B) O(n)

Explanation: Without a tail pointer, inserting at the end requires traversing the list from the head
to the last node, which takes O(n) time, where n is the number of nodes. This is a fundamental
concept in RGPV’s Data Structures course and competitive exams like GATE.

3. Algorithms

Question: Which sorting algorithm has the best average-case time complexity among the
following?

A) Bubble Sort
B) Selection Sort
C) Quick Sort
D) Insertion Sort

Answer: C) Quick Sort

Explanation: Quick Sort has an average-case time complexity of O(n log n), while Bubble Sort,
Selection Sort, and Insertion Sort have O(n²). This is a key topic in RGPV’s algorithm syllabus
and a frequent focus in competitive exams.

4. Operating Systems

Question: In a paging system, a logical address is 32 bits, and the page size is 4 KB. How many
bits are required for the page offset? A) 10
B) 12
C) 14
D) 20

Answer:

B) 12
Explanation: Page size = 4 KB = 2¹² bytes. The page offset, which identifies a byte within a
page, requires log₂(4 KB) = 12 bits. This concept from memory management is part of RGPV’s
OS syllabus and is crucial for exams like GATE.

5. Database Management Systems

Question: Which of the following SQL queries retrieves all unique values of a column Dept
from a table Employee? A) SELECT Dept FROM Employee;
B) SELECT DISTINCT Dept FROM Employee;
C) SELECT UNIQUE Dept FROM Employee;
D) SELECT ALL Dept FROM Employee;

Answer: B) SELECT DISTINCT Dept FROM Employee;

Explanation: DISTINCT eliminates duplicate values, while SELECT Dept alone retrieves all
values, including duplicates. UNIQUE is not a valid SQL keyword in this context. This aligns
with RGPV’s DBMS syllabus and competitive exam patterns.

6. Computer Networks

Question: What is the maximum data rate of a noiseless channel with a bandwidth of 3 kHz and
2 signal levels?
A) 3 kbps
B) 6 kbps
C) 9 kbps
D) 12 kbps

Answer: B) 6 kbps

Explanation: For a noiseless channel, Nyquist’s theorem applies: Maximum data rate = 2 ×
Bandwidth × log₂(Number of levels). Here, 2 × 3 kHz × log₂(2) = 6 kbps. This is covered in
RGPV’s networking course and is a staple in competitive exams.

7. Discrete Structures

Question: How many edges are there in a complete graph with 5 vertices? A) 5
B) 10
C) 15
D) 20

Answer: B) 10

Explanation: In a complete graph with n vertices, the number of edges is n(n-1)/2. For n = 5, it’s
5 × 4 / 2 = 10. Discrete mathematics is a core RGPV subject and frequently tested in competitive
exams.

8. Object-Oriented Programming

Question: In C++, which keyword is used to prevent a class from being inherited?
A) static
B) virtual
C) final
D) sealed

Answer: C) final

Explanation: The final keyword in C++ (introduced in C++11) prevents a class from being
subclassed. This is part of RGPV’s OOP syllabus (e.g., with Java or C++) and relevant for
technical assessments.

9. Theory of Computation

Question: Which of the following languages can be recognized by a finite automaton? A) {aⁿbⁿ |
n ≥ 0}
B) {aⁿ | n is a prime number}
C) {aⁿbᵐ | n, m ≥ 0}
D) {ww | w is a string}

Answer: C) {aⁿbᵐ | n, m ≥ 0}

Explanation: A finite automaton recognizes regular languages. {aⁿbᵐ} is regular, while {aⁿbⁿ}
(context-free), {aⁿ | n is prime} (not regular), and {ww} (context-sensitive) are not. This is a key
topic in RGPV’s theoretical foundations.

10. Software Engineering

Question: Which software development model is best suited for projects with well-defined
requirements that are unlikely to change?

A) Waterfall Model
B) Spiral Model
C) Agile Model
D) V-Model
Answer: A) Waterfall Model

Explanation: The Waterfall Model assumes stable requirements and follows a sequential phases
approach, making it ideal for such scenarios. This is taught in RGPV’s Software Engineering
course and tested in competitive exams.

50 MCQs for RGPV CSE/IT Syllabus (Competitive Exams)

Set 2

Programming in C (5 Questions)
1. What is the output of the following C code?

#include <stdio.h>

int main() {

int a = 10, b = 20;

printf("%d", a+++b);

return 0;

A) 30
B) 31
C) 21
D) Compilation error
Answer: A) 30
Explanation: a+++b is parsed as (a++) + b. a++ uses the current value of a (10), then
increments a to 11. So, 10 + 20 = 30.

2. Which of the following is true about pointers in C?

A) A pointer can point to any memory location without type checking


B) Dereferencing a NULL pointer is safe
C) Pointers cannot be used to access array elements
D) A pointer’s size depends on the data type it points to
Answer: None (Correct option missing; intended: "A pointer’s size is fixed for a
system")
Explanation: Pointer size (e.g., 4 bytes on 32-bit systems) is system-dependent, not type-
dependent. A is false (type checking exists), B is false (undefined behavior), C is false
(pointers access arrays).

3. What does the following code return?

int fun(int x) {
return x & (x - 1);

A) Checks if x is even
B) Sets the least significant bit to 0
C) Counts the number of 1s in x
D) Always returns 0
Answer: B) Sets the least significant bit to 0
Explanation: x & (x-1) resets the rightmost 1-bit to 0 in x’s binary form (e.g., 6 (110)
becomes 4 (100)).

4. What is the scope of a variable declared with static inside a function?

A) Local to the function, lifetime till function ends


B) Local to the function, lifetime till program ends
C) Global to the program, lifetime till function ends
D) Global to the program, lifetime till program ends
Answer: B) Local to the function, lifetime till program ends
Explanation: A static variable retains its value between calls and persists throughout the
program.

5. What does sizeof(int *) return on a 64-bit system?

A) 4 bytes
B) 8 bytes
C) Depends on the compiler
D) Size of int
Answer: B) 8 bytes
Explanation: On a 64-bit system, pointers are typically 8 bytes, regardless of the data
type they point to.

Data Structures (5 Questions)

6. What is the time complexity of searching in a binary search tree (BST) with n nodes,
if it is balanced?
A) O(n)
B) O(log n)
C) O(n log n)
D) O(1)
Answer: B) O(log n)
Explanation: A balanced BST has a height of log n, making search time logarithmic.

7. Which data structure is used to implement a priority queue efficiently?

A) Array
B) Linked List
C) Heap
D) Stack
Answer: C) Heap
Explanation: A binary heap (min or max) provides O(log n) insertion and deletion, ideal
for priority queues.

8. In a circular queue with size 5, if front = 4 and rear = 3, how many elements are
present?

A) 4
B) 5
C) 3
D) 2
Answer: A) 4
Explanation: In a circular queue, when rear < front, elements wrap around. Formula:
(rear - front + size) % size + 1 = (3 - 4 + 5) % 5 + 1 = 4.

9. What is the minimum number of stacks needed to implement a queue?

A) 1
B) 2
C) 3
D) 4
Answer: B) 2
Explanation: Two stacks can simulate a queue: one for enqueue (push), one for dequeue
(pop after transferring).
10. Which traversal of a binary tree requires a stack explicitly when implemented
iteratively?

A) Inorder
B) Preorder
C) Postorder
D) All of the above
Answer: D) All of the above
Explanation: Iterative tree traversals (inorder, preorder, postorder) use a stack to track
nodes, unlike recursive versions.

Algorithms (5 Questions)

11. What is the worst-case time complexity of Merge Sort?

A) O(n)
B) O(n log n)
C) O(n²)
D) O(log n)
Answer: B) O(n log n)
Explanation: Merge Sort divides the array into halves (log n) and merges them (n),
consistently O(n log n).

12. Which algorithm is used for finding the shortest path in a weighted graph with
negative edges?

A) Dijkstra’s
B) Bellman-Ford
C) Floyd-Warshall
D) Prim’s
Answer: B) Bellman-Ford
Explanation: Bellman-Ford handles negative weights, unlike Dijkstra’s, which assumes
non-negative weights.

13. What is the space complexity of a recursive factorial function with n as input? A)
O(1)
B) O(n)
C) O(log n)
D) O(n²)
Answer: B) O(n)
Explanation: Recursion uses O(n) stack space due to n recursive calls.

14. Which of the following is a stable sorting algorithm?

A) Quick Sort
B) Heap Sort
C) Bubble Sort
D) Selection Sort
Answer: C) Bubble Sort
Explanation: Bubble Sort preserves the relative order of equal elements, making it
stable.

15. What is the time complexity of the best-case scenario for Binary Search?

A) O(1)
B) O(log n)
C) O(n)
D) O(n log n)
Answer: A) O(1)
Explanation: In the best case, the target is at the root of the search space, found in one
comparison.

Operating Systems (5 Questions)

16. Which scheduling algorithm may lead to starvation?

A) Round Robin
B) Shortest Job First (SJF)
C) First Come First Serve (FCFS)
D) Multilevel Queue
Answer: B) Shortest Job First (SJF)
Explanation: In SJF, long jobs may wait indefinitely if short jobs keep arriving.
17. What is the size of a page table entry if the physical address is 32 bits and page size
is 4 KB?

A) 20 bits
B) 22 bits
C) 32 bits
D) 12 bits
Answer: A) 20 bits
Explanation: Page size = 4 KB = 2¹² bytes, so offset = 12 bits. Frame number = 32 - 12
= 20 bits.

18. Which of the following is a deadlock prevention technique?

A) Resource allocation graph


B) Banker’s algorithm
C) Hold and wait elimination
D) Deadlock detection
Answer: C) Hold and wait elimination
Explanation: Eliminating "hold and wait" (e.g., requiring all resources at once) prevents
deadlocks.

19. In which memory management scheme does external fragmentation occur?

A) Paging
B) Segmentation
C) Fixed Partitioning
D) Both B and C
Answer: B) Segmentation
Explanation: Segmentation allocates variable-sized blocks, leading to external
fragmentation; paging uses fixed-size pages.

20. What does the ‘fork()’ system call return to the parent process?

A) 0
B) Child’s PID
C) -1
D) Parent’s PID
Answer: B) Child’s PID
Explanation: fork() returns the child’s process ID to the parent and 0 to the child.
Database Management Systems (5 Questions)

21. Which normal form ensures no transitive dependencies exist?

A) 1NF
B) 2NF
C) 3NF
D) BCNF
Answer: C) 3NF
Explanation: 3NF eliminates transitive dependencies (non-key attributes depending on
other non-key attributes).

22. What does the SQL clause GROUP BY do?

A) Sorts the result set


B) Filters rows based on a condition
C) Aggregates rows into groups
D) Joins multiple tables
Answer: C) Aggregates rows into groups
Explanation: GROUP BY groups rows with the same values for aggregation (e.g., SUM,
COUNT).

23. Which join returns all rows from the left table and matching rows from the right
table?

A) INNER JOIN
B) LEFT JOIN
C) RIGHT JOIN
D) FULL JOIN
Answer: B) LEFT JOIN
Explanation: LEFT JOIN includes all rows from the left table, with NULLs for non-
matching right table rows.

24. What is the primary key’s role in a relational database?


A) Ensures data redundancy
B) Uniquely identifies each row
C) Links tables together
D) Stores duplicate values
Answer: B) Uniquely identifies each row
Explanation: A primary key ensures each record is unique.

25. Which of the following is a DDL command?

A) SELECT
B) INSERT
C) CREATE
D) UPDATE
Answer: C) CREATE
Explanation: Data Definition Language (DDL) commands like CREATE define
database structures.

Computer Networks (5 Questions)

26. What is the size of an IPv4 header without options?

A) 20 bytes
B) 24 bytes
C) 32 bytes
D) 16 bytes
Answer: A) 20 bytes
Explanation: IPv4 header is 20 bytes (5 words of 32 bits each) without options.

27. Which layer of the OSI model handles error detection and correction?

A) Physical
B) Data Link
C) Network
D) Transport
Answer: B) Data Link
Explanation: The Data Link layer uses CRC or parity for error detection/correction.
28. What is the default subnet mask for a Class C IP address?

A) 255.0.0.0
B) 255.255.0.0
C) 255.255.255.0
D) 255.255.255.255
Answer: C) 255.255.255.0
Explanation: Class C uses 24 bits for the network portion, leaving 8 bits for hosts.

29. Which protocol is connectionless?

A) TCP
B) UDP
C) FTP
D) HTTP
Answer: B) UDP
Explanation: UDP (User Datagram Protocol) does not establish a connection, unlike
TCP.

30. What is the maximum window size in TCP with a 16-bit window field?

A) 32 KB
B) 64 KB
C) 128 KB
D) 16 KB
Answer: B) 64 KB
Explanation: 2¹⁶ = 65,536 bytes = 64 KB.

Discrete Structures (5 Questions)

31. What is the number of subsets of a set with 4 elements?

A) 8
B) 16
C) 32
D) 64
Answer: B) 16
Explanation: Number of subsets = 2ⁿ, where n = 4; 2⁴ = 16.

32. Which of these is a tautology?

A) (P ∧ Q) → P
B) P ∧ ¬P
C) P ∨ ¬P

Answer: C) P ∨ ¬P
D) Both A and C

Explanation: P ∨ ¬P is always true (law of excluded middle); A is true but not a


tautology in all cases.

33. How many relations are possible on a set with 3 elements?

A) 512
B) 256
C) 64
D) 128
Answer: A) 512
Explanation: Number of relations = 2^(n²), where n = 3; 2⁹ = 512.

34. What is the chromatic number of a complete graph K₅?

A) 3
B) 4
C) 5
D) 6
Answer: C) 5
Explanation: In K₅, every vertex is adjacent to all others; thus, 5 colors are needed.

35. What is the value of 5! (factorial of 5)?

A) 60
B) 120
C) 100
D) 150
Answer: B) 120
Explanation: 5! = 5 × 4 × 3 × 2 × 1 = 120.

Theory of Computation (5 Questions)

36. Which language is accepted by a pushdown automaton but not a finite automaton?
A) {aⁿ | n ≥ 0}
B) {aⁿbⁿ | n ≥ 0}
C) {aⁿbᵐ | n, m ≥ 0}
D) {aⁿ | n is even}
Answer: B) {aⁿbⁿ | n ≥ 0}
Explanation: {aⁿbⁿ} is context-free (needs a stack), not regular.

37. What is the minimum number of states in a DFA accepting strings ending with
‘ab’?

A) 2
B) 3
C) 4
D) 5
Answer: C) 4
Explanation: States: initial, seen ‘a’, seen ‘ab’ (accept), and trap state.

38. Which of the following is decidable for a Turing machine?

A) Will it halt on all inputs?


B) Does it accept a finite language?
C) Is its language empty?
D) None of the above
Answer: C) Is its language empty?
Explanation: Emptiness is decidable for Turing machines; halting problem is not.

39. What is the complement of a regular language? A) Always regular


B) Always context-free
C) Always recursive
D) Not necessarily regular
Answer: A) Always regular
Explanation: Regular languages are closed under complementation.

40. Which machine accepts recursively enumerable languages?

A) Finite Automaton
B) Pushdown Automaton
C) Turing Machine
D) Linear Bounded Automaton
Answer: C) Turing Machine
Explanation: Turing Machines accept recursively enumerable languages.

Software Engineering (5 Questions)

41. Which phase of the SDLC involves requirement gathering?

A) Design
B) Analysis
C) Coding
D) Testing
Answer: B) Analysis
Explanation: The analysis phase defines what the system should do.

42. What is the purpose of a use case diagram?

A) Show system architecture


B) Describe interactions between actors and system
C) Define data flow
D) Represent class relationships
Answer: B) Describe interactions between actors and system
Explanation: Use case diagrams model user-system interactions.

43. Which model is iterative and risk-focused?


A) Waterfall
B) Spiral
C) V-Model
D) Prototype
Answer: B) Spiral
Explanation: Spiral model iterates with risk analysis at each cycle.

44. What does cohesion refer to in software design?

A) Coupling between modules


B) Strength of elements within a module
C) Number of functions in a module
D) Dependency on external systems
Answer: B) Strength of elements within a module
Explanation: High cohesion means a module’s elements are closely related.

45. Which testing verifies individual units of code?

A) Integration Testing
B) Unit Testing
C) System Testing
D) Acceptance Testing
Answer: B) Unit Testing
Explanation: Unit testing focuses on individual components.

Computer Organization (5 Questions)

46. What is the role of the ALU in a CPU?

A) Store data
B) Perform arithmetic and logic operations
C) Fetch instructions
D) Manage memory
Answer: B) Perform arithmetic and logic operations
Explanation: ALU (Arithmetic Logic Unit) handles computations.
47. How many address lines are needed for a memory of 16 KB?

A) 12
B) 14
C) 16
D) 18
Answer: B) 14
Explanation: 16 KB = 2¹⁴ bytes, requiring 14 address lines.

48. Which register holds the address of the next instruction to be executed?

A) MAR
B) MDR
C) PC
D) IR
Answer: C) PC
Explanation: Program Counter (PC) points to the next instruction.

49. What is the purpose of cache memory?

A) Increase storage capacity


B) Reduce CPU-memory speed gap
C) Replace RAM
D) Store permanent data
Answer: B) Reduce CPU-memory speed gap
Explanation: Cache speeds up data access for the CPU.

50. Which instruction type uses immediate addressing?

A) ADD R1, R2
B) MOV R1, #5
C) LOAD R1, [R2]
D) JMP R3
Answer: B) MOV R1, #5
Explanation: Immediate addressing embeds the operand (e.g., #5) in the instruction.

Notes
 These 50 MCQs cover the breadth of RGPV’s CSE/IT syllabus, focusing on semesters 1–
6, and are aligned with competitive exam standards (e.g., GATE, technical interviews).

Set 3 RGPV based syllabus MCQs

Programming in C

1. What is the size of an int data type in C on a 32-bit system?


a) 2 bytes
b) 4 bytes
c) 8 bytes
d) 1 byte
Answer: b) 4 bytes
Explanation: On a 32-bit system, an int typically occupies 4 bytes (32 bits).

2. Which of the following is a valid way to declare a pointer in C?


a) int *ptr;
b) int ptr*;
c) *int ptr;
d) int* ptr*;
Answer: a) int *ptr;
Explanation: The correct syntax for declaring a pointer is type *name;.

3. What does the break statement do in a loop?


a) Pauses the loop
b) Exits the loop
c) Skips the current iteration
d) Restarts the loop
Answer: b) Exits the loop
Explanation: The break statement terminates the loop immediately.

4. What is the output of printf("%d", 5 / 2); in C?


a) 2.5
b) 2
c) 3
d) 0
Answer: b) 2
Explanation: Integer division in C truncates the decimal part, so 5 / 2 = 2.

5. Which operator is used to access the value at a pointer’s address?


a) &
b) *
c) ->
d) .
Answer: b) *
Explanation: The dereference operator * accesses the value stored at the pointer’s
address.

Data Structures

6. Which data structure follows the Last In, First Out (LIFO) principle?
a) Queue
b) Stack
c) Heap
d) Tree
Answer: b) Stack
Explanation: A stack operates on the LIFO principle.

7. What is the time complexity of inserting an element at the end of a singly linked list
(with tail pointer)?
a) O(1)
b) O(n)
c) O(log n)
d) O(n²)
Answer: a) O(1)
Explanation: With a tail pointer, insertion at the end is constant time.

8. In a binary tree, how many children can a node have at most?


a) 1
b) 2
c) 3
d) 4
Answer: b) 2
Explanation: A binary tree node can have at most two children (left and right).

9. Which of the following is a non-linear data structure?


a) Array
b) Linked List
c) Graph
d) Queue
Answer: c) Graph
Explanation: Graphs are non-linear; arrays, linked lists, and queues are linear.

10. What is the time complexity of searching in a binary search tree (BST) in the
average case?
a) O(1)
b) O(n)
c) O(log n)
d) O(n log n)
Answer: c) O(log n)
Explanation: A balanced BST has a logarithmic search time.

Algorithms

11. Which sorting algorithm has the best average-case time complexity of O(n log n)?
a) Bubble Sort
b) Selection Sort
c) Merge Sort
d) Insertion Sort
Answer: c) Merge Sort
Explanation: Merge Sort has an average-case complexity of O(n log n).

12. What is the space complexity of a recursive factorial function?


a) O(1)
b) O(n)
c) O(log n)
d) O(n²)
Answer: b) O(n)
Explanation: Recursion uses stack space proportional to the input size n.

13. Which algorithm is used to find the shortest path in a weighted graph?
a) BFS
b) DFS
c) Dijkstra’s
d) Kruskal’s
Answer: c) Dijkstra’s
Explanation: Dijkstra’s algorithm finds the shortest path in a weighted graph.

14. What is the time complexity of binary search?


a) O(n)
b) O(log n)
c) O(n log n)
d) O(n²)
Answer: b) O(log n)
Explanation: Binary search halves the search space in each step.

15. Which of the following is a greedy algorithm?


a) Merge Sort
b) Prim’s Algorithm
c) Dynamic Programming
d) Binary Search
Answer: b) Prim’s Algorithm
Explanation: Prim’s is a greedy algorithm for minimum spanning trees.

Operating Systems

16. Which of the following is not a type of operating system?


a) Real-Time OS
b) Multitasking OS
c) Distributed OS
d) Virtual OS
Answer: d) Virtual OS
Explanation: Virtual OS is not a standard classification.

17. What is the main purpose of a scheduler in an OS?


a) Memory allocation
b) Process execution order
c) File management
d) Device control
Answer: b) Process execution order
Explanation: The scheduler determines the order of process execution.

18. Which scheduling algorithm provides equal time slices to each process?
a) FCFS
b) SJF
c) Round Robin
d) Priority Scheduling
Answer: c) Round Robin
Explanation: Round Robin allocates equal time quanta to processes.

19. What is a deadlock in an operating system?


a) Process termination
b) Resource contention
c) Infinite loop
d) Memory overflow
Answer: b) Resource contention
Explanation: Deadlock occurs when processes block each other for resources.

20. Which memory management technique uses fixed-size blocks?


a) Paging
b) Segmentation
c) Swapping
d) Fragmentation
Answer: a) Paging
Explanation: Paging divides memory into fixed-size pages.
Database Management Systems

21. What is the primary key in a database table?


a) A unique identifier for rows
b) A duplicate value
c) A foreign key
d) An index
Answer: a) A unique identifier for rows
Explanation: A primary key uniquely identifies each row.

22. Which SQL command is used to retrieve data?


a) INSERT
b) UPDATE
c) SELECT
d) DELETE
Answer: c) SELECT
Explanation: SELECT retrieves data from a database.

23. What does ACID stand for in DBMS?


a) Atomicity, Consistency, Isolation, Durability
b) Accuracy, Control, Integrity, Data
c) Access, Commit, Index, Delete
d) Atomicity, Concurrency, Isolation, Data
Answer: a) Atomicity, Consistency, Isolation, Durability
Explanation: ACID ensures reliable transactions.

24. Which normal form eliminates transitive dependencies?


a) 1NF
b) 2NF
c) 3NF
d) BCNF
Answer: c) 3NF
Explanation: 3NF removes transitive dependencies.
25. What is the purpose of a JOIN in SQL?
a) Delete records
b) Combine rows from multiple tables
c) Update records
d) Insert records
Answer: b) Combine rows from multiple tables
Explanation: JOIN merges data from related tables.

Computer Networks

26. Which layer of the OSI model handles data encryption?


a) Transport
b) Presentation
c) Network
d) Data Link
Answer: b) Presentation
Explanation: The presentation layer handles encryption and decryption.

27. What is the default port number for HTTP?


a) 21
b) 80
c) 443
d) 25
Answer: b) 80
Explanation: HTTP uses port 80 by default.

28. Which protocol is connectionless?


a) TCP
b) UDP
c) FTP
d) HTTP
Answer: b) UDP
Explanation: UDP is a connectionless protocol.

29. What does IP stand for in networking?


a) Internet Protocol
b) Internal Process
c) Integrated Packet
d) Interface Program
Answer: a) Internet Protocol
Explanation: IP is the protocol for addressing and routing packets.

30. Which device operates at the Data Link layer?


a) Router
b) Switch
c) Gateway
d) Hub
Answer: b) Switch
Explanation: Switches operate at Layer 2 (Data Link).

Object-Oriented Programming

31. Which OOP concept allows a class to inherit properties from another class?
a) Encapsulation
b) Inheritance
c) Polymorphism
d) Abstraction
Answer: b) Inheritance
Explanation: Inheritance enables code reuse through class hierarchies.

32. What keyword is used to define a method that can be overridden in Java?
a) final
b) static
c) virtual
d) None required
Answer: d) None required
Explanation: In Java, methods are virtual by default and can be overridden.

33. Which access modifier makes a member accessible only within the same class?
a) public
b) protected
c) private
d) default
Answer: c) private
Explanation: private restricts access to the class itself.

34. What is the purpose of a constructor in a class?


a) Destroy an object
b) Initialize an object
c) Copy an object
d) Modify an object
Answer: b) Initialize an object
Explanation: Constructors initialize object states.

35. Which of these is an example of polymorphism?


a) Method overloading
b) Data hiding
c) Inheritance
d) Encapsulation
Answer: a) Method overloading
Explanation: Polymorphism allows methods to take multiple forms, like overloading.

Software Engineering

36. Which model follows a sequential process in software development?


a) Spiral Model
b) Waterfall Model
c) Agile Model
d) V-Model
Answer: b) Waterfall Model
Explanation: Waterfall follows a linear, sequential approach.

37. What is the purpose of a use case diagram?


a) Show system architecture
b) Describe user interactions
c) Define class relationships
d) Plan project timeline
Answer: b) Describe user interactions
Explanation: Use case diagrams model user-system interactions.
38. Which testing verifies internal code structure?
a) Black Box Testing
b) White Box Testing
c) Unit Testing
d) Integration Testing
Answer: b) White Box Testing
Explanation: White box testing examines internal logic.

39. What is cohesion in software design?


a) Coupling between modules
b) Strength of elements within a module
c) Code duplication
d) System complexity
Answer: b) Strength of elements within a module
Explanation: Cohesion measures how related a module’s elements are.

40. Which phase involves gathering user requirements?


a) Design
b) Implementation
c) Requirement Analysis
d) Testing
Answer: c) Requirement Analysis
Explanation: This phase defines what the system should do.

Miscellaneous (Discrete Math, Web Tech, etc.)

41. What is the cardinality of the power set of a set with 3 elements?
a) 3
b) 6
c) 8
d) 4
Answer: c) 8
Explanation: Power set cardinality is 2^n, so 2^3 = 8.
42. Which HTML tag defines a hyperlink?
a) <link>
b) <a>
c) <href>
d) <url>
Answer: b) <a>
Explanation: <a> is used for hyperlinks with the href attribute.

43. In a graph, what is a vertex with no outgoing edges called?


a) Source
b) Sink
c) Root
d) Leaf
Answer: b) Sink
Explanation: A sink has no outgoing edges.

44. Which CSS property controls text size?


a) font-size
b) text-size
c) size
d) font-style
Answer: a) font-size
Explanation: font-size adjusts the text size.

45. What is the full form of URL?


a) Uniform Resource Locator
b) Universal Resource Link
c) Uniform Retrieval Language
d) Universal Reference Locator
Answer: a) Uniform Resource Locator
Explanation: URL identifies resource locations on the web.

46. Which of these is a valid IP address?


a) 256.255.255.255
b) 192.168.1.1
c) 300.100.50.25
d) 0.0.0.256
Answer: b) 192.168.1.1
Explanation: IP addresses range from 0 to 255 per octet.

47. What does the volatile keyword signify in C?


a) Constant value
b) Value can change unexpectedly
c) Static storage
d) Dynamic allocation
Answer: b) Value can change unexpectedly
Explanation: volatile tells the compiler the value may change outside the program’s
control.

48. Which data structure is used in breadth-first search (BFS)?


a) Stack
b) Queue
c) Heap
d) Tree
Answer: b) Queue
Explanation: BFS uses a queue to explore nodes level by level.

49. What is the purpose of the super keyword in Java?


a) Call a superclass method/constructor
b) Define a static method
c) Create an object
d) Access private fields
Answer: a) Call a superclass method/constructor
Explanation: super refers to the parent class.

50. Which command compiles a Java program?


a) java
b) javac
c) jvm
d) run
Answer: b) javac
Explanation: javac compiles Java source code into bytecode.

You might also like