Master’s Admission Preparation Batch Model Test-2
MSc Admission Test Preparation
Model Test-2
Full Marks: 150 Time: 2 hours
N.B: 1. Answer all questions of the following fifty questions.
2. The Figures shown in the right margin indicate full marks. There are no negative
markings.
1. x=10, z, y=3; 3
z=(x=18)?y=48:15;
What will be the value of z?
(a) 10 (b) 18
(c) 48 (d) 3
2. Find output: 3
int myNum = 30;
int *ptr = &myNum;
int **pptr = &ptr;
printf("myNum = %d\n", pptr);
(a) 30 (b) address of myNum
(c) address of pptr (d) address of ptr
3. What is the output of the following C code? 3
y= 9+3*2/5(6+2/3);
print(“%d”,y);
(a) 15 (b) 8
(c) 9 (d) 12
4. How many times recursive function calls for the following code? 3
void fun(int n) {
if (n == 0)
return;
printf("%d ", n);
fun(n - 1);
fun(n - 3);
}
fun(5)
(a) 15 (b) 17
(c) 19 (d) 20
Group: BUET DU CSE MSc Admission Preparation MuhaMMad aMinul islaM
1
Master’s Admission Preparation Batch Model Test-2
5. Which of the following OOP mechanisms explicitly ensures data security by 3
preventing direct outside access to data members, allowing manipulation only
through a well-defined public interface?
(A) Inheritance (B) Polymorphism
(C) Encapsulation (D) Function Overriding
6. Consider the following declaration block in a standard C++ application: 3
C++
class Student {
int roll;
void setRoll(int r) { roll = r; }
};
If no access modifier is explicitly mentioned, what is the default accessibility profile
of the member variable roll and the function setRoll()?
(A) Both are private (B) Both are public
(C) roll is private and setRoll() is public (D) Both are protected
7. Which component of the Java Development Kit (JDK) is explicitly responsible for 3
translating human-readable .java source files into platform-independent .class
bytecode files?
A) JVM (Java Virtual Machine) B) JRE (Java Runtime Environment)
C) javac (Java Compiler) D) JIT (Just-In-Time Compiler)
8. Consider the following Java code snippet: 3
Java
String s1 = "Java";
String s2 = new String("Java");
[Link]((s1 == s2) + " " + [Link](s2));
What will be the exact console output?
A) true true B) false true
C) true false D) false false
9. Which of the following conditions must be met for a Java interface to be targeted 3
and safely instantiated using a standard Lambda expression?
A) It must contain only private helper B) It must contain exactly one abstract
methods. method.
C) It must extend the Runnable interface. D) It must be marked explicitly with the
final keyword modifier.
10. A graph has 24 edges and degree of each vertex is k, then which of the following is 3
possible number of vertices?
(a) 20 (b) 15
(c) 10 (d) 8
Group: BUET DU CSE MSc Admission Preparation MuhaMMad aMinul islaM
2
Master’s Admission Preparation Batch Model Test-2
11. What is the minimum number of people required in a room to guarantee that at least 3
two of them share the exact same birth month?
A) 12 B) 13
C) 24 D) 365
12. Consider the compound proposition (p∧q) →p. Which of the following best 3
describes this logical statement?
A) It is a contradiction. B) It is a contingency.
C) It is a tautology. D) It is valid only when p is false.
13. Which data structure is primarily used to implement Breadth-First Search (BFS) 3
traversal of a graph?
(a) Linked List (b) Priority Queue
(c) Stack (d) Queue
14. If the inorder traversal of a binary tree is B, A, C and its preorder traversal is A, B, 3
C, what is the postorder traversal of the tree?
(a) B, C, A (b) C, A, B
(c) A, C, B (d) C, B, A
15. Which data structure is ideal for checking balanced parentheses in an expression 3
(e.g., matching opening and closing brackets)?
(a) Linear Array (b) Queue
(c) Stack (d) Binary Tree
16. What is the tightest upper bound (O) of the following loop block? 3
C++
for (int i = 1; i <= n; i *= 2) {
for (int j = 1; j <= n; j++) {
// Constant time operation
}
}
A) O(n) B) O(n log n)
C) O(n^2) D) O(log n)
17. Using the Master Method, what is the asymptotic time complexity of the recurrence 3
relation T(n) = 2T(n/2) + Theta(n)?
A) Theta(n) B) Theta(log n)
C) Theta(n log n) D) Theta(n^2)
18. What is the worst-case time complexity of the Quick Sort algorithm when the pivot 3
chosen is consistently the smallest or largest element?
A) O(n log n) B) O(n)
C) O(n^2) D) O(n^2 log n)
Group: BUET DU CSE MSc Admission Preparation MuhaMMad aMinul islaM
3
Master’s Admission Preparation Batch Model Test-2
19. The Longest Common Subsequence (LCS) problem is efficiently solved using which 3
of the following approaches?
A) Greedy Strategy B) Dynamic Programming
C) Divide and Conquer D) Branch and Bound
20. Which of the following single-source shortest path algorithms can correctly handle 3
graphs containing negative weight edges, provided there are no negative weight
cycles?
A) Dijkstra's Algorithm B) Floyd-Warshall Algorithm
C) Bellman-Ford Algorithm D) Prim's Algorithm
21. Which of the following issues in a traditional file processing system is directly 3
caused by the lack of central control over data storage and formatting?
A) Data Redundancy and Inconsistency B) Poor execution speed of sequential
searches
C) High hardware manufacturing costs D) Inability to store text files alongside
numeric data
22. The Relational Algebra operator that outputs all tuples from relation R that do not 3
have a matching match in relation S across shared attributes is known as:
A) Natural Join B) Set Difference
C) Division D) Cartesian Product
23. If a relation is in 2nd Normal Form (2NF), which of the following vulnerabilities has 3
been completely eliminated?
A) Transitive functional dependencies B) Partial functional dependencies on a
candidate key
C) Multi-valued dependencies D) Trivial functional dependencies
24. In a standard B^+ Tree index structure used by database storage engines, actual data 3
record pointers or actual data rows are exclusively stored in which locations?
A) The Root node only B) Internal routing nodes only
C) Leaf nodes only D) Evenly distributed across all levels of
the tree
25. An attacker intercepts network traffic to analyze packet headers and discover 3
communication patterns between two servers without altering the data. This is an
example of which type of attack?
A) Masquerading B) Passive Attack
C) Replay Attack D) Modification of Messages
Group: BUET DU CSE MSc Admission Preparation MuhaMMad aMinul islaM
4
Master’s Admission Preparation Batch Model Test-2
26. What is the primary objective of a Domain Name System (DNS) poisoning attack? 3
A) To intercept session cookies from a B) To corrupt database tables by
user's browser injecting malicious SQL code
C) To redirect users to a malicious D) To flood a server with
website by modifying IP mapping synchronization requests to crash it
records
27. Which type of malware appears to be a legitimate, useful software application but 3
performs malicious actions in the background when executed by the user?
A) Worm B) Virus
C) Trojan Horse D) Ransomware
28. A communication channel is completely noiseless and has a bandwidth of 4 kHz. If 3
the digital signal uses 4 discrete voltage levels to represent data, what is the
maximum bit rate achievable according to the Nyquist formula?
A) 8 kbps B) 16 kbps
C) 24 kbps D) 32 kbps
29. Which physical topology requires a central controller or hub to which all dedicated 3
links from devices are connected, offering easy installation but presenting a single
point of failure?
A) Mesh Topology B) Star Topology
C) Bus Topology D) Ring Topology
30. Which line coding scheme has no DC component and provides synchronization? 3
A) Unipolar NRZ B) Polar NRZ-L
C) Manchester D) RZ
31. What is the primary function of ARP? 3
A) Find MAC address from IP address B) Find IP address from MAC address
C) Assign IP address automatically D) Resolve domain names
32. Which protocol allows users to keep emails on the mail server and synchronize 3
multiple devices?
A) SMTP B) FTP
C) POP3 D) IMAP
33. Which routing algorithm requires each router to have complete knowledge of the 3
network topology?
A) Distance Vector B) Flooding
C) Link State D) Random Routing
34. In the instruction cycle, which step comes immediately after fetching an instruction? 3
A) Execution B) Decoding
C) Write Back D) Memory Access
Group: BUET DU CSE MSc Admission Preparation MuhaMMad aMinul islaM
5
Master’s Admission Preparation Batch Model Test-2
35. A processor has a clock rate of 2 GHz and an average CPI of 2. What is the 3
execution time for 1000 instructions?
A) 0.5 μs B) 1 μs
C) 2 μs D) 4 μs
36. In the classic 5-stage MIPS pipeline, which stage performs arithmetic and logical 3
operations?
A) IF B) ID
C) EX D) WB
37. Which instruction format generally requires the fewest bits to specify operands? 3
A) Three-address instruction B) Two-address instruction
C) One-address instruction D) Zero-address instruction
38. Which design pattern ensures that only one instance of a class exists throughout the 3
system?
A) Factory Pattern B) Observer Pattern
C) Adapter Pattern D) Singleton Pattern
39. Which software development model is primarily risk-driven? 3
A) Waterfall Model B) Incremental Model
C) Spiral Model D) Prototype Model
40. Which development approach welcomes changing requirements even at a late stage 3
of development?
A) Plan-Driven Development B) Agile Development
C) Waterfall Model D) V-Model
41. In the FCFS scheduling algorithm, the main disadvantage is: 3
A) Starvation of low-priority processes B) High context-switching overhead
C) Convoy effect due to long processes D) Requires burst-time prediction
42. Three processes arrive at time 0 with burst times: 3
P1 = 8 ms, P2 = 4 ms, P3 = 2 ms
According to the Shortest Job First (SJF) scheduling algorithm, which process
executes first?
A) P1 B) P2
C) P3 D) Any process can execute first
43. Which page replacement algorithm can never produce more page faults when the 3
number of page frames is increased?
A) FIFO B) LRU
C) MRU D) Random Replacement
Group: BUET DU CSE MSc Admission Preparation MuhaMMad aMinul islaM
6
Master’s Admission Preparation Batch Model Test-2
44. Which of the following grammars is NOT LL(1)? 3
A) 𝑆 → 𝑎𝐴 ∣ 𝑏𝐵 B) 𝑆 → 𝑎𝐴 ∣ 𝑎𝐵
C) 𝑆 → 0𝑆 ∣ 1𝑆 ∣ 𝜖 D) 𝑆 → 𝑐 ∣ 𝑑
45. Which of the following statements is TRUE regarding DFA and NFA? 3
A) Every NFA can be converted to an B) Every DFA can recognize more
equivalent DFA. languages than an NFA.
C) NFA requires less memory during D) DFA may have multiple transitions
execution than DFA in all cases. for the same input symbol from a state.
46. Which of the following is the simplified form of 𝐹(𝐴, 𝐵) = ∑𝑚(1,2,3)? 3
A. 𝐴 + 𝐵 B. 𝐴′ + 𝐵
C. 𝐴 + 𝐵 ′ D. 𝐴′ 𝐵 ′
47. The carry-out 𝐶𝑜𝑢𝑡 of a full adder is equal to: 3
A. 𝐴 ⊕ 𝐵 ⊕ 𝐶𝑖𝑛 B. 𝐴𝐵 + 𝐵𝐶𝑖𝑛 + 𝐴𝐶𝑖𝑛
C. 𝐴 + 𝐵 + 𝐶𝑖𝑛 D. 𝐴𝐵 + 𝐶𝑖𝑛
48. In the Minimax algorithm with Alpha-Beta pruning, pruning occurs when: 3
A. Alpha becomes less than Beta B. Beta becomes less than or equal to
Alpha
C. Depth limit is reached D. Leaf nodes are evaluated first
49. Which of the following best describes overfitting in a machine learning model? 3
A. Model performs well on both training B. Model is too simple to capture data
and unseen data patterns
C. Model performs well on training data D. Model has no training phase
but poorly on unseen data
50. Two fair dice are rolled. What is the probability that the sum is 7? 3
A. 1/12 B. 1/9
C. 1/6 D. 1/36
Group: BUET DU CSE MSc Admission Preparation MuhaMMad aMinul islaM
7