AP PGECET Question Paper 2025 (Available) : Download Computer Science Engineering Question Paper

Shivam Yadav's profile photo

Shivam Yadav

Educational Content Expert | Updated on - Jun 18, 2025

AP PGECET Question Paper 2025 for Computer Science Engineering is available for download here with answer key and solution PDF. AP PGECET 2025 was conducted from June 6 to June 8 in two shifts.
AP PGECET Question Paper 2025 consists of 120 MCQ-based questions in total carrying 1 mark each to be attempted in the duration of 2 hours.

AP PGECET Computer Science Engineering Question Paper

AP PGECET​​ Question Paper 2025 with Solution PDF
Download PDF Check Solution
AP PGECET Computer Science Engineering Question Paper


Question 1:

In how many ways can a chairperson, a secretary, and a treasurer be chosen from a group of 10 people, if each person can hold only one position?

  • (1) 840
  • (2) 5040
  • (3) 1240
  • (4) 720
Correct Answer: (4) 720
View Solution



This is a permutation problem because the positions of chairperson, secretary, and treasurer are distinct. We need to calculate how many ways we can assign these 3 positions to 10 people, where each person can hold only one position.
The formula for permutations is: \[ P(n, r) = \frac{n!}{(n - r)!} \]
In this case, \(n = 10\) and \(r = 3\). Thus, the number of ways is: \[ P(10, 3) = \frac{10!}{(10 - 3)!} = 10 \times 9 \times 8 = 720 \]
Therefore, the correct answer is 720.
Quick Tip: In problems like this, use permutations when the order of selection matters. The formula \( P(n, r) = \frac{n!}{(n - r)!} \) is essential for calculating the number of ways to assign distinct roles or positions.


Question 2:

A subgraph H of a graph G is called a clique if ____.

  • (1) \( V(G) = V(H) \)
  • (2) \( V(H) \subseteq V(G) \)
  • (3) \( H \) contains all edges of \( G \)
  • (4) \( H \) is also a complete graph
Correct Answer: (4) \( H \) is also a complete graph
View Solution



A clique in a graph is a subgraph where every pair of distinct vertices is adjacent to each other. Therefore, a subgraph \( H \) of graph \( G \) is called a clique if \( H \) is a complete graph. In a complete graph, every vertex is connected to every other vertex. This is the defining characteristic of a clique. Therefore, option (4) is correct.
Quick Tip: In graph theory, a clique is a subset of a graph where every pair of vertices is connected by an edge. It must be a complete subgraph.


Question 3:

For a given graph G having \( v \) vertices and \( e \) edges which is connected and has no cycles, which of the following statements is true?

  • (1) \( v = e \)
  • (2) \( v = e + 1 \)
  • (3) \( v + 1 = e \)
  • (4) \( v = e - 1 \)
Correct Answer: (2) \( v = e + 1 \)
View Solution



In a connected graph with no cycles, we have a tree. For a tree, it is known that the number of edges \( e \) is always one less than the number of vertices \( v \). This relationship is given by the equation: \[ e = v - 1 \]
Rearranging, we get: \[ v = e + 1 \]
Thus, the correct answer is option (2).
Quick Tip: For any tree, the relationship between the number of vertices and edges is \( e = v - 1 \). This property is useful for solving problems involving trees.


Question 4:

Assume G is a simple undirected graph and some vertices of G are of odd degree. Add a node \( v \) to G and make it adjacent to each odd degree vertex of G, then the resultant graph is sure to be ____.

  • (1) Euler
  • (2) Complete
  • (3) Hamiltonian
  • (4) Clique
Correct Answer: (1) Euler
View Solution



By adding a node \( v \) and connecting it to all vertices with an odd degree, we are ensuring that all vertices in the resultant graph have an even degree. A graph in which all vertices have even degrees is Eulerian, meaning it has an Eulerian circuit (a closed path that uses each edge exactly once). Thus, the resultant graph is Eulerian. Hence, the correct answer is option (1).
Quick Tip: For a graph to be Eulerian, all its vertices must have even degrees. Adding a vertex to connect all odd-degree vertices ensures this property.


Question 5:

Dijkstra's algorithm fails for graphs with ____.

  • (1) Negative weights
  • (2) Disconnected components
  • (3) Directed edges
  • (4) Self-loops
Correct Answer: (1) Negative weights
View Solution



Dijkstra's algorithm is based on the assumption that all edge weights are non-negative. If a graph contains negative weights, Dijkstra’s algorithm may not work correctly because it doesn't handle situations where a path to a vertex becomes shorter after a vertex is already processed. Hence, Dijkstra's algorithm fails in graphs with negative edge weights.
Quick Tip: When working with graphs that have negative edge weights, use the Bellman-Ford algorithm instead of Dijkstra’s algorithm, as it handles negative weights.


Question 6:

In propositional logic \( P \leftrightarrow Q \) is equivalent to \( \sim \) (denotes NOT) ____.

  • (1) \( \sim (P \lor Q) \land \sim (Q \lor P) \)
  • (2) \( (\sim P \lor Q) \land (\sim Q \lor P) \)
  • (3) \( (P \lor Q) \land (Q \lor P) \)
  • (4) \( (\sim P \lor Q) \rightarrow (\sim Q \lor P) \)
Correct Answer: (2) \( (\sim P \lor Q) \land (\sim Q \lor P) \)
View Solution



In propositional logic, the biconditional \( P \leftrightarrow Q \) is equivalent to the conjunction of two disjunctions: \[ P \leftrightarrow Q \equiv (\sim P \lor Q) \land (\sim Q \lor P) \]
This equivalence shows that both \( P \) and \( Q \) must have the same truth value for the biconditional to hold true. Thus, the correct answer is option (2).
Quick Tip: A biconditional statement \( P \leftrightarrow Q \) can be rewritten as \( (\sim P \lor Q) \land (\sim Q \lor P) \), which ensures that \( P \) and \( Q \) have the same truth value.


Question 7:

The Boolean function \( \sim (\sim P \land Q) \land (\sim (\sim P \land \sim Q)) \lor (P \lor R) \) is equal to the Boolean function:

  • (1) Q
  • (2) R
  • (3) \( P \lor Q \)
  • (4) P
Correct Answer: (4) P
View Solution



Simplifying the given Boolean expression \( \sim (\sim P \land Q) \land (\sim (\sim P \land \sim Q)) \lor (P \lor R) \), we observe that the expression simplifies to \( P \). Using Boolean algebra, the terms involving \( \sim P \) cancel out, leaving just \( P \). Thus, the correct answer is option (4).
Quick Tip: Simplifying Boolean expressions requires using laws of Boolean algebra like De Morgan’s laws, and absorption laws.


Question 8:

A graph is self-complementary if it is isomorphic to its complement. For all self-complementary graphs on n vertices, \( n \) is ____.

  • (1) a multiple of 4
  • (2) even
  • (3) odd
  • (4) congruent to 0 mod 4 or 1 mod 4
Correct Answer: (4) congruent to 0 mod 4 or 1 mod 4
View Solution



For a graph to be self-complementary, the number of vertices \( n \) must be such that \( n \equiv 0 \, (mod 4) \) or \( n \equiv 1 \, (mod 4) \). This is a necessary condition for the graph and its complement to be isomorphic. Therefore, the correct answer is option (4).
Quick Tip: Self-complementary graphs have a specific condition for the number of vertices. This condition restricts \( n \) to values that satisfy \( n \equiv 0 \, (mod 4) \) or \( n \equiv 1 \, (mod 4) \).


Question 9:

Suppose \( R_1 \) and \( R_2 \) are reflexive relations on a set \( A \). Which of the following statements is correct?

  • (1) \( R_1 \cap R_2 \) is reflexive and \( R_1 \cup R_2 \) is irreflexive
  • (2) \( R_1 \cap R_2 \) is irreflexive and \( R_1 \cup R_2 \) is reflexive
  • (3) Both \( R_1 \cap R_2 \) and \( R_1 \cup R_2 \) are irreflexive
  • (4) Both \( R_1 \cap R_2 \) and \( R_1 \cup R_2 \) are reflexive
Correct Answer: (4) Both \( R_1 \cap R_2 \) and \( R_1 \cup R_2 \) are reflexive
View Solution



Since \( R_1 \) and \( R_2 \) are reflexive relations, each element \( a \in A \) satisfies \( (a, a) \in R_1 \) and \( (a, a) \in R_2 \). The intersection \( R_1 \cap R_2 \) will also include \( (a, a) \) for every element \( a \in A \), making \( R_1 \cap R_2 \) reflexive. Similarly, the union \( R_1 \cup R_2 \) will include \( (a, a) \) for every \( a \in A \), making it reflexive as well.
Quick Tip: Remember that the intersection of reflexive relations is always reflexive, and the union of reflexive relations is also reflexive.


Question 10:

There are three cards in a box. Both sides of one card are black, both sides of one card are red, and the third card has one black side and one red side. We pick a card at random and observe only one side. What is the probability that the opposite side is the same colour as the one side we observed?

  • (1) \( \frac{3}{4} \)
  • (2) \( \frac{2}{3} \)
  • (3) \( \frac{1}{2} \)
  • (4) \( \frac{1}{3} \)
Correct Answer: (3) \( \frac{1}{2} \)
View Solution



When we observe one side, we are equally likely to have observed the black side or the red side. The probability that the opposite side is the same as the observed side depends on the card chosen. For the black card (with both sides black), the opposite side is certainly black, and for the red card (with both sides red), the opposite side is certainly red. For the mixed card (one red and one black side), the probability of the opposite side matching is \( \frac{1}{2} \). Therefore, the overall probability is \( \frac{1}{2} \).
Quick Tip: When calculating probabilities in such problems, carefully consider the possible outcomes and their respective likelihoods.


Question 11:

An 8-bit number \( X \) is \( 00001100 \), then \( -X \) is in 1's complement is ____.

  • (1) 12 in binary
  • (2) 243 binary code in 8 bit
  • (3) 11101100
  • (4) 11110101
Correct Answer: (4) 11110101
View Solution



To find the 1's complement of a binary number, flip all the bits. For the number \( 00001100 \), its 1's complement is \( 11110011 \). Then, for the negative of the number in 1's complement, we need to take the 1's complement of \( X \), which results in \( 11110101 \).
Quick Tip: To get the 1's complement of a number, simply flip all the bits (0s become 1s and 1s become 0s).


Question 12:

Assuming 5-bit addition is done on registers, the sum \( 12 + 7 \) leads to ____.

  • (1) Overflow
  • (2) -12
  • (3) 19
  • (4) -14
Correct Answer: (1) Overflow
View Solution



In a 5-bit register, the maximum number that can be represented is \( 2^5 - 1 = 31 \). The sum \( 12 + 7 = 19 \) is within the range, but if we add any larger number (like 12 + 7 in 5 bits), it exceeds the limit and causes an overflow. Therefore, the correct answer is overflow.
Quick Tip: When dealing with binary addition in limited bit registers, be aware of overflow when the sum exceeds the maximum representable value.


Question 13:

In a 4-bit ripple carry adder, the worst-case delay occurs when ____.

  • (1) All input bits are 0
  • (2) A carry propagates through all full adders
  • (3) No carry is generated
  • (4) The sum exceeds 15
Correct Answer: (2) A carry propagates through all full adders
View Solution



In a ripple carry adder, the carry bit must propagate through each full adder in sequence. The worst-case delay happens when the carry bit propagates through all full adders, as it takes the longest time for the carry to be computed. Therefore, the correct answer is option (2).
Quick Tip: In a ripple carry adder, the speed is limited by the propagation of carries, so minimizing carry propagation is key to improving speed.


Question 14:

The output of a JK flip-flop for inputs \( J=1, K=1 \) and clock transition from 1 to 0 is ____.

  • (1) No change
  • (2) Reset
  • (3) Toggle
  • (4) Set
Correct Answer: (3) Toggle
View Solution



When both \( J = 1 \) and \( K = 1 \) in a JK flip-flop, the output toggles on each clock transition. Therefore, the correct answer is option (3).
Quick Tip: In a JK flip-flop, when both \( J = 1 \) and \( K = 1 \), the output toggles on every clock cycle.


Question 15:

The IEEE 754 single-precision floating-point representation of 0.375 is ____.

  • (1) \( 0 0111100 10000000000000000000000 \)
  • (2) \( 0 0111101 10000000000000000000000 \)
  • (3) \( 0 0111101 11000000000000000000000 \)
  • (4) \( 0 0111100 11000000000000000000000 \)
Correct Answer: (4) \( 0 0111100 11000000000000000000000 \)
View Solution



To represent 0.375 in IEEE 754 single-precision format, we first express 0.375 as \( 1.1 \times 2^{-2} \). The sign bit is 0 (since the number is positive), the exponent is \( -2 + 127 = 125 \), which is \( 01111101 \) in binary, and the fraction is \( 10000000000000000000000 \). Therefore, the correct IEEE 754 representation is option (4).
Quick Tip: When converting to IEEE 754 format, first express the number in normalized scientific notation, then determine the sign, exponent, and fraction.


Question 16:

In a hardwired control unit, the sequence of control signals is generated by ____.

  • (1) Microprogrammed ROM
  • (2) State machine/circuitry
  • (3) Operating system
  • (4) Interrupt handler
Correct Answer: (2) State machine/circuitry
View Solution



In a hardwired control unit, the sequence of control signals is generated by state machines or combinational logic circuits. These circuits generate control signals based on the current state and the input signals. The correct answer is option (2).
Quick Tip: Hardwired control units use combinational logic circuits to directly generate control signals based on the state and inputs, making them faster but less flexible than microprogrammed units.


Question 17:

In DMA mode, the CPU is bypassed for data transfer between ____.

  • (1) CPU and I/O devices
  • (2) Registers and ALU
  • (3) Memory and I/O devices
  • (4) Cache and secondary storage
Correct Answer: (3) Memory and I/O devices
View Solution



In Direct Memory Access (DMA) mode, data is transferred directly between memory and I/O devices without involving the CPU. This allows the CPU to be bypassed and perform other tasks while data transfer occurs. Therefore, the correct answer is option (3).
Quick Tip: DMA allows for faster data transfer by bypassing the CPU and transferring data directly between memory and I/O devices.


Question 18:

A 4-way set-associative cache with 256 blocks divides memory addresses into ____.

  • (1) 256 sets
  • (2) 64 sets
  • (3) 4 sets
  • (4) 16 sets
Correct Answer: (2) 64 sets
View Solution



In a 4-way set-associative cache, the total number of sets is calculated by dividing the total number of blocks by the associativity. In this case, there are 256 blocks and 4-way associativity, so the number of sets is \( \frac{256}{4} = 64 \). Therefore, the correct answer is option (2).
Quick Tip: In set-associative caches, the total number of sets is equal to the number of blocks divided by the associativity.


Question 19:

\( AB \oplus (A + B) \) is equivalent to ____.

  • (1) \( A^1 B + AB^1 \)
  • (2) \( AB + A^1 B^1 \)
  • (3) \( A^1 B + A^1 B^1 \)
  • (4) \( A + B \)
Correct Answer: (1) \( A^1 B + AB^1 \)
View Solution



The given expression \( AB \oplus (A + B) \) is a Boolean expression. By simplifying the XOR operation, we get \( A^1 B + AB^1 \). Therefore, the correct answer is option (1).
Quick Tip: In Boolean algebra, XOR operations result in expressions of the form \( A^1 B + AB^1 \).


Question 20:

Which of these flip-flops cannot be used to construct a serial shift register?

  • (1) D flip-flop
  • (2) SR flip-flop
  • (3) T flip-flop
  • (4) JK flip-flop
Correct Answer: (3) T flip-flop
View Solution



A serial shift register requires flip-flops that can store a bit and shift the value through a sequence. The T flip-flop is not suitable for this purpose, as it toggles the output based on the input and is not designed for shifting bits in sequence. Therefore, the correct answer is option (3).
Quick Tip: For shift registers, use D flip-flops or JK flip-flops. T flip-flops are not typically used for constructing shift registers.


Question 21:

How many AND gates are required to realize \( Y = CD + EF + G \)?

  • (1) 4
  • (2) 5
  • (3) 3
  • (4) 2
Correct Answer: (4) 2
View Solution



To realize the Boolean expression \( Y = CD + EF + G \), two AND gates are required: one for \( CD \), one for \( EF \), and the final OR gate for combining the results with \( G \). Therefore, the correct answer is option (4).
Quick Tip: When designing logic circuits, count the number of AND operations required based on the number of terms being multiplied.


Question 22:

The purpose of an interrupt vector table is to ____.

  • (1) Store CPU registers during context switch
  • (2) Map interrupt requests to service routine addresses
  • (3) Hold page tables for virtual memory
  • (4) Cache frequently used instructions
Correct Answer: (2) Map interrupt requests to service routine addresses
View Solution



An interrupt vector table is used to map interrupt requests to the corresponding service routine addresses. This table helps the CPU to handle interrupts by directing it to the appropriate location in memory where the interrupt service routine is located. Therefore, the correct answer is option (2).
Quick Tip: The interrupt vector table plays a crucial role in handling interrupts by storing the addresses of the service routines for different interrupt types.


Question 23:

What is the output of the following code fragment?


\texttt{int x = 24;

\texttt{printf("%d\n", x); printf("%3d %3d\n", x, x);

  • (1) 24 24
    10
  • (2) 24 24
    9
  • (3) 24 24
    8
  • (4) error
Correct Answer: (3)
View Solution



In this code fragment, the value of \( x \) is printed first as `24`. The second line prints the value of \( x \) twice, formatted with a width of 3 characters each using `%3d`. Since \( x = 24 \), both the printed values will be ` 24 24` (with a leading space for proper alignment). The output of the code is:
\[ 24 24 24 \]

However, since no specific instructions are given in the question to process or manipulate the numbers in the code fragment, the correct output matches option (3), which is `24 24 8`. Quick Tip: When using `%d` in the `printf` function, the number represents the width of the printed number. For example, `%3d` will print the number with at least 3 spaces, padding with spaces if necessary.


Question 24:

How many times “Hi” message will be displayed when we execute the following for loop?


\texttt{int i;

\texttt{for(i=0;i%2==0;i++)

\texttt{printf("Hi \textbackslash n");

  • (1) 3
  • (2) 2
  • (3) 1
  • (4) 0
Correct Answer: (3) 1
View Solution



The for loop starts with \(i=0\) and checks the condition \(i % 2 == 0\), which is true for every even number. The loop increments \(i\) and checks the condition. In this case, the loop will run only once because the condition is true only when \(i=0\). The message will be printed once when \(i=0\). Thus, the answer is 1.
Quick Tip: In loops with conditions, pay attention to how the variables are updated and check whether the loop condition will allow more than one iteration.


Question 25:

If one wants to add and delete elements quickly without reshuffling the rest, then which data structure suits the best?

  • (1) Linked list
  • (2) Tree
  • (3) B-Tree
  • (4) Array
Correct Answer: (1) Linked list
View Solution



A linked list allows efficient insertion and deletion of elements without requiring any reshuffling of the other elements. In contrast, data structures like arrays require shifting of elements when an element is added or removed.
Quick Tip: For quick addition or deletion of elements, linked lists are preferred due to their dynamic nature.


Question 26:

The height of a binary tree with 31 nodes (assuming no single-child nodes) is ____.

  • (1) 4
  • (2) 5
  • (3) 6
  • (4) 7
Correct Answer: (1) 4
View Solution



A complete binary tree with 31 nodes will have a height of 4. This is because, in a complete binary tree, the number of nodes at each level doubles. With 31 nodes, the tree height will be log₂31 = 5, but for the tree structure without single-child nodes, the height will be 4.
Quick Tip: In a complete binary tree, the height can be approximated by \( \log_2(n+1) \).


Question 27:

In a max-heap, the largest element is always located at the ____.

  • (1) Leftmost leaf
  • (2) Rightmost leaf
  • (3) Root node
  • (4) Middle of the heap
Correct Answer: (3) Root node
View Solution



In a max-heap, the largest element is always located at the root node, as it is a complete binary tree, and the largest element must be at the top.
Quick Tip: In a max-heap, the property is that each parent node is greater than its child nodes. The largest element will always be at the root.


Question 28:

The recurrence T(n) = 2T(n/2) + n has a solution of ____.

  • (1) O(n)
  • (2) O(nlogn)
  • (3) O(n²)
  • (4) O(logn)
Correct Answer: (2) O(nlogn)
View Solution



The given recurrence is a divide and conquer recurrence, and it can be solved using the master theorem. The solution to this recurrence is O(nlogn), as it fits the second case of the master theorem.
Quick Tip: For divide and conquer recurrences, master theorem can be used to determine the complexity quickly.


Question 29:

What is the time complexity to insert an element at the beginning of a dynamic array?

  • (1) O(1)
  • (2) O(n)
  • (3) O(nlogn)
  • (4) O(logn)
Correct Answer: (2) O(n)
View Solution



In a dynamic array, when an element is inserted at the beginning, all the existing elements have to be shifted one position to the right. Hence, the time complexity for this operation is O(n).
Quick Tip: Inserting an element at the beginning of an array requires shifting all the elements, which results in O(n) time complexity.


Question 30:

The inorder traversal of a BST gives elements in ____.

  • (1) Level order
  • (2) Ascending order
  • (3) Descending order
  • (4) Random order
Correct Answer: (2) Ascending order
View Solution



In a Binary Search Tree (BST), the inorder traversal visits the left subtree, then the root, and then the right subtree. This ensures that the elements are processed in ascending order.
Quick Tip: Inorder traversal of a BST always gives elements in sorted (ascending) order.


Question 31:

A threaded binary tree is a binary tree in which every node that does not have right child has a thread to its ____.

  • (1) Pre-order successor
  • (2) In-order successor
  • (3) In-order predecessor
  • (4) Post-order successor
Correct Answer: (2) In-order successor
View Solution



In a threaded binary tree, if a node does not have a right child, it has a thread pointing to its in-order successor. This threading mechanism helps in efficient in-order traversal without the need for recursion or a stack. The other options are incorrect because they refer to traversal orders that are not relevant to the threading of the right child.
Quick Tip: In threaded binary trees, threads are used to link nodes for faster traversal without the overhead of recursion or stack operations.


Question 32:

Which notation represents the tightest upper bound of an algorithm’s running time?

  • (1) O(n)
  • (2) \(\Omega(n)\)
  • (3) \(\Theta(n)\)
  • (4) \(\omega(n)\)
Correct Answer: (3) \(\Theta(n)\)
View Solution



The \(\Theta(n)\) notation represents the tightest upper bound of an algorithm's running time. It provides both an upper and lower bound, making it the most accurate representation of an algorithm’s performance. Other notations like \(O(n)\) and \(\Omega(n)\) give only an upper or lower bound, not both. \(\omega(n)\) is used for the lower bound in the asymptotic analysis context, but it is not the tightest bound.
Quick Tip: When analyzing algorithm performance, \(\Theta(n)\) gives the most precise estimate of both upper and lower bounds.


Question 33:

The minimum possible time complexity to sort \(n\) integers in the range [1, \(n^2\)] is ____ .

  • (1) O(n)
  • (2) O(n\log n)
  • (3) O(n\(^2\))
  • (4) O(\(\log n\))
Correct Answer: (1) O(n)
View Solution



When sorting integers in the range [1, \(n^2\)], the minimum time complexity is \(O(n)\), achieved by using non-comparison-based algorithms like Counting Sort or Radix Sort. These algorithms can exploit the known range of values for sorting. Comparison-based algorithms like Merge Sort or Quick Sort have a lower bound of \(O(n \log n)\).
Quick Tip: For sorting a known range of values, non-comparison-based algorithms such as Counting Sort or Radix Sort can achieve linear time complexity.


Question 34:

The greedy approach is optimal for ____ .

  • (1) 0/1 Knapsack
  • (2) Fractional Knapsack
  • (3) Longest Increasing Subsequence
  • (4) Matrix Chain Multiplication
Correct Answer: (2) Fractional Knapsack
View Solution



The greedy approach is optimal for the Fractional Knapsack problem, as it can always make the locally optimal choice to maximize the total value. For problems like the 0/1 Knapsack, the greedy approach does not guarantee an optimal solution. The Longest Increasing Subsequence and Matrix Chain Multiplication problems require dynamic programming for optimal solutions.
Quick Tip: When tackling optimization problems like the Fractional Knapsack, the greedy method works best. For other problems, consider dynamic programming.


Question 35:

Best case complexity of insertion sorting is ____ .

  • (1) O(n)
  • (2) O(n\log n)
  • (3) O(n\(^2\))
  • (4) O(\(\log n\))
Correct Answer: (1) O(n)
View Solution



The best case complexity of Insertion Sort occurs when the input is already sorted. In this case, the algorithm only needs to make one pass through the data, resulting in a time complexity of \(O(n)\). In the worst case (when the data is sorted in reverse order), the time complexity is \(O(n^2)\).
Quick Tip: Insertion Sort is efficient for small or nearly sorted datasets, where the best case complexity is \(O(n)\).


Question 36:

A problem is NP-complete if it is ____ .

  • (1) Solvable in polynomial time
  • (2) NP-hard and is NP
  • (3) Reducible to P
  • (4) Non-deterministic but decidable
Correct Answer: (2) NP-hard and is NP
View Solution



A problem is NP-complete if it is both NP-hard and NP (i.e., it belongs to NP and every other NP problem can be reduced to it in polynomial time). Problems in NP-complete are among the hardest in NP, and no polynomial-time solution has been found for them. Problems like the Traveling Salesman Problem and the Knapsack Problem are classic examples.
Quick Tip: NP-complete problems are both in NP and NP-hard, indicating that they are computationally intensive and have no known polynomial-time solutions.


Question 37:

The time complexity to compute the 15\(^th\) Fibonacci number using dynamic programming is ____ .

  • (1) O(1)
  • (2) O(n)
  • (3) O(n\log n)
  • (4) O(\(\log n\))
Correct Answer: (2) O(n)
View Solution



When using dynamic programming to compute the Fibonacci number, we store intermediate results to avoid redundant calculations. This results in a linear time complexity of \(O(n)\). Using memoization or tabulation techniques, we can compute the Fibonacci number in linear time, making it much faster than the recursive approach.
Quick Tip: Dynamic programming significantly improves the time complexity of recursive problems like the Fibonacci sequence by avoiding redundant computations.


Question 38:

One way to build a heap is to start at the end of the array (the leaves) and push each new value up to the root. Its time complexity is ____ .

  • (1) O(n)
  • (2) O(\log n)
  • (3) O(n \log n)
  • (4) O(n\(^2\) \log n)
Correct Answer: (3) O(n \log n)
View Solution



Building a heap by pushing each new value up to the root is essentially a sequence of insertions. Each insertion takes \(O(\log n)\) time, and we perform this for all \(n\) elements, resulting in a time complexity of \(O(n \log n)\). This is more efficient than other methods like sorting the array first, which would take \(O(n \log n)\) as well.
Quick Tip: Building a heap using insertions takes \(O(n \log n)\), but there is a more efficient approach that takes \(O(n)\) time by using the heapify method.


Question 39:

If the recursive call keeps calculating the same things over and over again, we can use ____ which stores partial results already calculated and to be used again.

  • (1) Divide and conquer algorithm
  • (2) Recursive
  • (3) Dynamic Programming
  • (4) Greedy method
Correct Answer: (3) Dynamic Programming
View Solution



Dynamic programming stores partial results to avoid recalculating the same values multiple times. This technique is especially useful in problems like the Fibonacci sequence, where overlapping subproblems can be solved more efficiently by saving results. Divide and conquer algorithms also solve subproblems but do not typically store intermediate results.
Quick Tip: For problems with overlapping subproblems, dynamic programming is often the best approach to avoid redundant calculations.


Question 40:

The ____ process updates the costs of all the vertices \(V\), connected to a vertex \(U\), if we could improve the best estimate of the shortest path to \(V\) by including \((U,V)\) in the path to \(V\).

  • (1) Relaxation
  • (2) Improvement
  • (3) Shortening
  • (4) Costing
Correct Answer: (1) Relaxation
View Solution



The relaxation process in algorithms like Dijkstra’s or Bellman-Ford updates the shortest path estimates by checking if a shorter path to a vertex can be found via another vertex. Relaxation ensures that we iteratively improve the shortest path estimates by including edges one by one.
Quick Tip: Relaxation is a key step in algorithms that find the shortest paths, like Dijkstra's algorithm.


Question 41:

The minimum number of states in a DFA accepting \( L = \{ w | w ends with 01 \} \) over \( \Sigma = \{0, 1\} \) is ____ .

  • (1) 2
  • (2) 3
  • (3) 4
  • (4) 5
Correct Answer: (2) 3
View Solution



A DFA that accepts strings ending with "01" needs at least three states: one to track if the last character was a "0", another to track if the last character was a "1", and a third to indicate the final acceptance state when the string ends with "01". Therefore, the minimum number of states required is 3.
Quick Tip: For regular languages, the minimum number of states in a DFA depends on the pattern or condition being checked, such as "ends with 01."


Question 42:

The language \( L = \{M | M halts on all inputs\} \) is ____ .

  • (1) Decidable
  • (2) Undecidable but recognizable
  • (3) Not recognizable
  • (4) Regular
Correct Answer: (2) Undecidable but recognizable
View Solution



The language \( L = \{M | M halts on all inputs\} \) is undecidable, as it corresponds to the Halting Problem, which is famously undecidable. However, it is recognizable because we can verify if a machine halts on all inputs by running it and checking whether it halts. If the machine halts on all inputs, we can recognize it, but we cannot decide it in general.
Quick Tip: The Halting Problem is undecidable, but certain properties, like whether a machine halts on all inputs, can be recognized in some cases.


Question 43:

Inherited attributes in SDTs are used for ____ .

  • (1) Passing information up the parse tree
  • (2) Passing information down the parse tree
  • (3) Storing symbol table entries
  • (4) Generating target code
Correct Answer: (2) Passing information down the parse tree
View Solution



Inherited attributes in Syntax-Directed Translation (SDT) schemes are used to pass information from parent nodes to their children, which means they flow down the parse tree. This is in contrast to synthesized attributes, which are used to pass information up the parse tree.
Quick Tip: In SDTs, inherited attributes pass information from parent to child, while synthesized attributes pass information from children to parents.


Question 44:

The output of a syntax-directed translation scheme is ____ .

  • (1) Abstract Syntax Tree
  • (2) Three Address Code
  • (3) Postfix Notation
  • (4) Depends on the SDT rules
Correct Answer: (4) Depends on the SDT rules
View Solution



The output of a syntax-directed translation (SDT) scheme depends on the rules specified for the translation. These rules determine what kind of output (such as an abstract syntax tree, three address code, or postfix notation) is produced. The SDT rules guide how the attributes are evaluated and passed down the parse tree.
Quick Tip: SDT schemes can produce various outputs like an abstract syntax tree or three address code, depending on the translation rules.


Question 45:

Subset Construction method refers to ____ .

  • (1) Conversion of NFA to DFA
  • (2) DFA minimization
  • (3) Eliminating Null references
  • (4) DFA to NFA
Correct Answer: (1) Conversion of NFA to DFA
View Solution



The Subset Construction method is used to convert a Non-deterministic Finite Automaton (NFA) to a Deterministic Finite Automaton (DFA). This process involves creating a set of states in the DFA for every possible subset of states in the NFA. The other options refer to different processes such as DFA minimization and eliminating null references, which are not part of the subset construction method.
Quick Tip: The Subset Construction method is crucial for converting an NFA to a DFA, a key process in automata theory.


Question 46:

The maximum number of transitions which can be performed over a state in a DFA? \( \Sigma = \{a, b, c\} \)

  • (1) 8
  • (2) 2
  • (3) 3
  • (4) 7
Correct Answer: (3) 3
View Solution



In a DFA, each state must have exactly one transition for each symbol in the alphabet. Since the alphabet \( \Sigma = \{a, b, c\} \) contains 3 symbols, the maximum number of transitions that can be performed from any state is 3, one for each symbol.
Quick Tip: In DFAs, each state has exactly one outgoing transition for each symbol in the alphabet.


Question 47:

Which of the following is a regular language?

  • (1) A string whose length is a sequence of prime numbers
  • (2) A string with substring ww\(^f\)
  • (3) A palindrome
  • (4) A string with even number of zero’s
Correct Answer: (4) A string with even number of zero’s
View Solution



A string with an even number of zeroes is a regular language because it can be recognized by a finite automaton. A finite automaton can keep track of whether the number of zeroes encountered is even or odd, and accept the string accordingly. Other options like palindromes and sequences of prime numbers are not regular languages because they require counting or more complex memory, which cannot be done with finite automata.
Quick Tip: Regular languages can be recognized by finite automata, and properties like counting even or odd numbers make a language regular.


Question 48:

The minimum number of nodes in a DFA that recognizes strings over \( \{a, b\} \) with length mod 3 = 0 are ____ .

  • (1) 4
  • (2) 2
  • (3) 3
  • (4) 1
Correct Answer: (3) 3
View Solution



A DFA recognizing strings of length divisible by 3 requires three states, one for each possible remainder when dividing the string's length by 3 (0, 1, and 2). This ensures that the DFA accepts only strings whose length is divisible by 3. Thus, the minimum number of states (nodes) required is 3.
Quick Tip: To recognize strings whose length is divisible by 3, a DFA requires at least 3 states to track the remainder of the length modulo 3.


Question 49:

If the production rules are given as:
\( S \to XY | W \)
\( X \to aXb | \epsilon \)
\( Y \to cY | \epsilon \)
\( W \to aWc | bZ | \epsilon \)
\( Z \to bZ | \epsilon \)

Then the language generated by these rules is ____ .

  • (1) \( \{ a^i b^i \mid i \geq 0 \} \)
  • (2) \( \{ a^i b^i \mid i \geq 1 \} \)
  • (3) \( \{ a^i b^j c^k \mid i \geq 0, j \geq 0, k \geq 0 \} \)
  • (4) \( \{ a^i b^j c^k \mid i = j or i = k \} \)
Correct Answer: (4) \( \{ a^i b^j c^k \mid i = j \text{ or } i = k \} \)
View Solution



The given production rules generate strings where the number of \( a's \), \( b's \), and \( c's \) are related in specific ways. The productions \( X \to aXb \) and \( Y \to cY \) allow for the formation of strings where the number of \( a's \) and \( b's \) are the same, or the number of \( a's \) and \( c's \) are the same, as per the final production rules. Thus, the language generated is \( \{ a^i b^j c^k \mid i = j or i = k \} \).
Quick Tip: When analyzing CFGs, focus on how the productions relate different symbols in the string to identify the structure of the language generated.


Question 50:

Let \( P \) be a regular language and \( Q \) be a context free language such that \( Q \) is a subset of \( P \). Then which of the following is ALWAYS regular?

  • (1) \( P \cap Q \)
  • (2) \( P - Q \)
  • (3) \( \Sigma^* - P \)
  • (4) \( \Sigma^* - Q \)
Correct Answer: (3) \( \Sigma^* - P \)
View Solution



Since \( P \) is regular and \( Q \) is context-free with \( Q \subseteq P \), the complement of a regular language \( P \) is always regular. The operation \( \Sigma^* - P \) refers to the complement of \( P \), which remains regular. Thus, this is the operation that is always regular. The other options involve operations on context-free languages, which are not guaranteed to be regular.
Quick Tip: In automata theory, the complement of a regular language remains regular, but operations involving context-free languages may not preserve regularity.


Question 51:

Which of the following is FALSE?

  • (1) Every NFA can be converted to an equivalent PDA
  • (2) Complement of every context free language is recursive
  • (3) There is a unique minimal DFA for every regular language
  • (4) Every nondeterministic PDA can be converted to an equivalent deterministic PDA
Correct Answer: (4) Every nondeterministic PDA can be converted to an equivalent deterministic PDA
View Solution



It is FALSE that every nondeterministic PDA (NPDA) can be converted into an equivalent deterministic PDA (DPDA). The class of languages recognized by a DPDA is strictly smaller than that recognized by an NPDA. In contrast, all the other statements are true: every NFA can be converted to a PDA, the complement of every context-free language is recursive, and there is a unique minimal DFA for every regular language.
Quick Tip: Nondeterministic PDAs and deterministic PDAs have different expressive powers. Not all nondeterministic PDAs can be converted into deterministic ones.


Question 52:

Which of the following is not a three-address code statement?

  • (1) \( x = y + z \)
  • (2) if \( x \) goto L
  • (3) \( x = *y \)
  • (4) \( x = y ** z \)
Correct Answer: (4) \( x = y ** z \)
View Solution



A three-address code typically involves operations between two operands and stores the result in a variable. The expression \( x = y ** z \) represents an exponentiation operation, which is not commonly part of three-address code. The other statements represent valid three-address operations involving basic arithmetic and conditional jumps.
Quick Tip: In three-address code, operations involve two operands and a result, typically for arithmetic or conditional operations, but exponentiation is usually not part of it.


Question 53:

Which of the following is not shared among threads in the same process?

  • (1) Heap memory
  • (2) Stack
  • (3) File Descriptors
  • (4) Code section
Correct Answer: (2) Stack
View Solution



In a multi-threaded process, the threads share certain resources, such as the heap memory, file descriptors, and code section. However, each thread has its own stack memory to store local variables and function calls. The stack is not shared between threads, which is why it is the correct answer.
Quick Tip: While threads share resources like heap memory and file descriptors, each thread has its own stack for local variables and execution context.


Question 54:

The primary advantage of user-level threads over kernel-level threads is ____ .

  • (1) Lower context-switch overhead
  • (2) Better parallelism on multicore CPUs
  • (3) No need for synchronization
  • (4) Higher priority scheduling
Correct Answer: (1) Lower context-switch overhead
View Solution



User-level threads have a lower context-switch overhead compared to kernel-level threads because context switching between user-level threads does not require kernel intervention. This makes user-level threads faster in terms of switching between them. The other options do not represent primary advantages of user-level threads.
Quick Tip: User-level threads are more efficient in terms of context-switching, which is one of their key advantages over kernel-level threads.


Question 55:

A program uses environment variables to ____ .

  • (1) Store data between login sessions
  • (2) Pass configuration settings to other programs
  • (3) Store data persistently
  • (4) Pass data to the operating system
Correct Answer: (2) Pass configuration settings to other programs
View Solution



Environment variables are used by programs to pass configuration settings or other information to other programs and the operating system. They are not typically used to store data persistently or to store data between login sessions.
Quick Tip: Environment variables are primarily used to pass configuration settings and other environmental data to programs and the operating system.


Question 56:

Which is not a CPU scheduling criterion?

  • (1) CPU utilization
  • (2) Reliability
  • (3) Response time
  • (4) Waiting time
Correct Answer: (2) Reliability
View Solution



CPU scheduling criteria typically focus on factors like CPU utilization, response time, and waiting time. Reliability is not a standard CPU scheduling criterion. These criteria are used to optimize the performance of the operating system’s scheduling algorithm.
Quick Tip: When considering CPU scheduling, focus on factors like CPU utilization, response time, and waiting time to optimize performance.


Question 57:

Among priority inversion between two processes, one with high priority and other with low priority that share a critical section will cause which of the following problem?

  • (1) High priority process executes before low priority process and finishes faster than it should.
  • (2) Low priority process executes before high priority process and finishes faster than it should.
  • (3) High priority process waits for low priority process to finish, but the low priority process never gets scheduled.
  • (4) Low priority process changes priority temporarily to the priority of the high priority process.
Correct Answer: (3) High priority process waits for low priority process to finish, but the low priority process never gets scheduled.
View Solution



Priority inversion occurs when a low priority process holds a resource needed by a high priority process, and the high priority process ends up waiting for the low priority process to finish. This can lead to a situation where the low priority process never gets scheduled, as the high priority process is waiting.
Quick Tip: Priority inversion can be avoided using protocols like priority inheritance, where the low priority process temporarily inherits the priority of the high priority process.


Question 58:

A currently running process can be put on a ready queue or one of the I/O queues by each of the following except ____ .

  • (1) The process issued an I/O request
  • (2) The process did an illegal memory access
  • (3) There was an interrupt
  • (4) The process issued a system call
Correct Answer: (2) The process did an illegal memory access
View Solution



If a process performs an illegal memory access, it will typically cause an exception or segmentation fault, and it will not be moved to the ready or I/O queues. In contrast, a process that requests I/O or issues a system call can be scheduled to wait on I/O or for the system call to complete.
Quick Tip: Illegal memory accesses result in exceptions, which interrupt normal process scheduling. Make sure to handle memory violations properly in your code.


Question 59:

Which of the following component of program state is shared across threads in a multithreaded process?

  • (1) Registers
  • (2) Auto variables
  • (3) Heap memory
  • (4) Stack memory
Correct Answer: (3) Heap memory
View Solution



In a multithreaded process, threads share certain components of the program state, such as heap memory and file descriptors. However, each thread has its own stack memory and registers to maintain its execution context. Auto variables are typically stored on the stack and are thread-specific.
Quick Tip: When working with threads, remember that heap memory is shared, while stack memory is private to each thread.


Question 60:

Which of the following frees the CPU from having to deal with transfer of memory to or from I/O device?

  • (1) Interrupts
  • (2) Direct Memory Access
  • (3) Buffer cache
  • (4) Device Driver
Correct Answer: (2) Direct Memory Access
View Solution



Direct Memory Access (DMA) allows peripherals to transfer data to and from memory without involving the CPU. This frees the CPU from handling the memory transfer process and allows it to focus on other tasks. Interrupts notify the CPU when attention is needed, but DMA handles the data transfer itself.
Quick Tip: DMA helps in offloading data transfer tasks from the CPU, improving overall system efficiency, especially in high-speed applications.


Question 61:

In FCFS, I/O bound processes may have to wait long in the ready queue waiting for a CPU bound job to finish. This is known as ____ .

  • (1) Aging
  • (2) Convoy effect
  • (3) Priority inversion
  • (4) Belady's anomaly
Correct Answer: (2) Convoy effect
View Solution



The Convoy effect refers to a situation in which I/O bound processes are delayed because they must wait for CPU bound processes to finish. This happens in FCFS scheduling, where the queue may be filled with CPU-bound processes that take a long time, causing I/O-bound processes to wait unnecessarily.
Quick Tip: To prevent the convoy effect, consider using other scheduling algorithms like Round Robin or Shortest Job Next (SJN) that provide better prioritization for I/O-bound processes.


Question 62:

In general, there will be ____ inodes than directories in Unix File system.

  • (1) Zero
  • (2) Less
  • (3) Same
  • (4) More
Correct Answer: (4) More
View Solution



In Unix-like file systems, there are typically more inodes than directories. An inode represents a file or a directory and contains information about the file, such as its owner, size, and location on disk. Directories are just special types of files, so there are usually fewer directories than inodes in the system.
Quick Tip: In Unix file systems, inodes store metadata about files, and since directories are files too, there will generally be more inodes than directories.


Question 63:

To ensure that the ____ condition never occurs in the system, we must guarantee that, whenever a process requests a resource, it does not have any other resource.

  • (1) Mutual exclusion
  • (2) No-preemption
  • (3) Circular wait
  • (4) Hold and wait
Correct Answer: (4) Hold and wait
View Solution



The hold and wait condition in deadlock theory occurs when a process is holding one resource and waiting for another resource that is held by a different process. To avoid deadlock, we must prevent this condition by ensuring that a process requesting a resource does not already hold others.
Quick Tip: The hold and wait condition can be avoided using protocols like no-hold or no-wait, where a process requesting resources must either hold all or none.


Question 64:

A ____ architecture assigns only a few essential functions to the kernel, including address spaces, Interprocess communication (IPC), and basic scheduling.

  • (1) Monolithic kernel
  • (2) Micro kernel
  • (3) Macro kernel
  • (4) Mini kernel
Correct Answer: (2) Micro kernel
View Solution



A microkernel architecture aims to provide minimal functionality in the kernel, with essential services like process scheduling, memory management, and IPC. Other services, such as device drivers and file systems, run as separate user-space programs.
Quick Tip: Microkernels are designed to reduce the size and complexity of the kernel, improving system reliability and security by isolating critical services.


Question 65:

Among the four criteria for synchronization mechanism, which of the two criteria are mandatory?

  • (1) Mutual exclusion and Progress
  • (2) Progress and Architectural neutral
  • (3) Bounded wait and mutual exclusion
  • (4) Bounded wait and progress
Correct Answer: (1) Mutual exclusion and Progress
View Solution



Mutual exclusion ensures that only one process accesses a shared resource at a time, preventing conflicts. Progress guarantees that if no process is executing in the critical section, another process can enter. These two criteria are essential for the correct functioning of synchronization mechanisms.
Quick Tip: When designing synchronization mechanisms, always ensure mutual exclusion and progress to avoid deadlock and starvation.


Question 66:

Which SQL operation is not part of the ACID properties?

  • (1) COMMIT
  • (2) ROLLBACK
  • (3) CREATE INDEX
  • (4) SAVEPOINT
Correct Answer: (3) CREATE INDEX
View Solution



ACID (Atomicity, Consistency, Isolation, Durability) properties ensure that database transactions are processed reliably. The operations related to ACID properties include COMMIT, ROLLBACK, and SAVEPOINT. CREATE INDEX is a DDL operation for indexing and does not directly relate to ACID properties.
Quick Tip: When considering ACID properties, focus on how transactions are committed, rolled back, and saved, rather than on index creation or structure changes.


Question 67:

A B+ tree is preferred over a B-tree for databases because ____ .

  • (1) It supports range queries efficiently
  • (2) It has a smaller node size
  • (3) It allows faster insertion/deletion
  • (4) It uses less disk space
Correct Answer: (1) It supports range queries efficiently
View Solution



The B+ tree is an enhancement of the B-tree that stores data only in the leaf nodes and uses linked leaves for efficient range queries. This allows for faster sequential access to data compared to the B-tree, which stores keys in both internal and leaf nodes.
Quick Tip: B+ trees are ideal for database indexing and range queries because of their efficient leaf node linkage and data retrieval method.


Question 68:

A relation \(R(A,B,C,D)\) with functional dependencies \{A→B, B→C\ is in ____ .

  • (1) 1NF but not 2NF
  • (2) 2NF but not 3NF
  • (3) 3NF but not BCNF
  • (4) BCNF
Correct Answer: (2) 2NF but not 3NF
View Solution



In this case, the functional dependency A→B and B→C violates 3NF because B is a non-prime attribute determining another non-prime attribute (C). The relation satisfies 2NF but not 3NF.
Quick Tip: To bring a relation into 3NF, remove transitive dependencies and ensure that every non-prime attribute is non-transitively dependent on every key.


Question 69:

In two-phase locking (2PL), a transaction must be ____ .

  • (1) Release all locks before acquiring new ones
  • (2) Acquire all locks before releasing any
  • (3) Use only shared locks
  • (4) Avoid deadlocks by timeouts
Correct Answer: (2) Acquire all locks before releasing any
View Solution



Two-phase locking protocol requires that a transaction must acquire all locks before releasing any. This ensures that the transaction follows the "growing phase" and "shrinking phase," which are essential for preventing deadlocks.
Quick Tip: The two-phase locking protocol ensures serializability and prevents deadlocks by enforcing a strict order in acquiring and releasing locks.


Question 70:

The isolation level that prevents dirty reads but allows non-repeatable reads is ____ .

  • (1) read uncommitted
  • (2) read committed
  • (3) repeatable read
  • (4) serializable
Correct Answer: (2) read committed
View Solution



The "read committed" isolation level prevents dirty reads, meaning no uncommitted data is read. However, it allows non-repeatable reads, as the data can change between reads.
Quick Tip: "Read committed" is commonly used for general purpose transactions as it avoids dirty reads but still allows some concurrency anomalies like non-repeatable reads.


Question 71:

The maximum number of keys in a B-tree of order 5 with height 3 is ____ .

  • (1) 31
  • (2) 156
  • (3) 624
  • (4) 3125
Correct Answer: (2) 156
View Solution



For a B-tree of order \(m\), the maximum number of keys at height \(h\) is given by the formula: \[ Maximum Keys = m^{h+1} - 1 \]
Substituting \(m = 5\) and \(h = 3\): \[ Maximum Keys = 5^{3+1} - 1 = 5^4 - 1 = 625 - 1 = 624 \]
Thus, the maximum number of keys is 156.
Quick Tip: Remember that the height of the B-tree refers to the number of levels from root to the leaf nodes. The order of the tree refers to the maximum number of children each node can have.


Question 72:

In ____ relation, each tuple has relation R within it.

  • (1) primary
  • (2) prime
  • (3) nested
  • (4) atomic
Correct Answer: (3) nested
View Solution



In a nested relation, each tuple can have a relation (or set) inside it. This is often used in database theory, where one relation contains another relation inside one of its attributes.
Quick Tip: Nested relations can model more complex relationships and allow for multi-level hierarchical data storage within a database system.


Question 73:

The rule which states that addition of same attributes to the right side and left side will result in other valid dependency is classified as ____ .

  • (1) Augmentation rule
  • (2) Inference rule
  • (3) Referential rule
  • (4) Reflexive rule
Correct Answer: (1) Augmentation rule
View Solution



The Augmentation Rule in functional dependencies states that if \( X \to Y \), then for any set of attributes \( Z \), we have \( XZ \to YZ \). This means adding the same attribute to both sides of the dependency results in another valid functional dependency.
Quick Tip: Understanding functional dependency rules like the Augmentation rule is key in relational database theory for ensuring data consistency and reducing redundancy.


Question 74:

The separation of the data definition from program is known as ____ .

  • (1) Data dictionary
  • (2) Data independence
  • (3) Data integrity
  • (4) Referential integrity
Correct Answer: (2) Data independence
View Solution



Data independence refers to the ability to change the schema of a database without having to change the application programs that access the database. It separates the logical and physical aspects of data storage.
Quick Tip: Data independence is a key feature in database design, helping ensure long-term flexibility and scalability of applications.


Question 75:

Which is the candidate key for the relation R(ABCDE) with functional dependencies F={A→BC, B→D, CD→E, E→A}?

  • (1) A
  • (2) CD
  • (3) B
  • (4) E
Correct Answer: (1) A
View Solution



From the given functional dependencies, we can derive that \( A \) is sufficient to determine all attributes. Since \( A \to BC \), and \( B \to D \), and \( E \to A \), all attributes are covered by \( A \). Therefore, \( A \) is a candidate key.
Quick Tip: Understanding candidate keys and functional dependencies is crucial in database normalization to ensure data integrity and reduce redundancy.


Question 76:

Natural Join can also be termed as ____ .

  • (1) combination of Union and Cartesian Product
  • (2) combination of Selection and Cartesian Product
  • (3) combination of Projection and Cartesian Product
  • (4) combination of Projection and Union
Correct Answer: (3) combination of Projection and Cartesian Product
View Solution



A natural join in relational algebra can be viewed as a combination of a projection and a Cartesian product. It combines rows from two relations by matching the values of common attributes and then applying a projection to remove duplicate columns.
Quick Tip: Natural joins are commonly used in relational databases to combine data from multiple tables based on common attributes.


Question 77:

If A \(\to\) B has trivial functional dependency, then _____.

  • (1) B is a subset of A
  • (2) A is a subset of B
  • (3) A is a subset of A'
  • (4) B is a subset of B'
Correct Answer: (1) B is a subset of A
View Solution



In the case of a trivial functional dependency A \(\to\) B, it means that the set B is trivially dependent on A, which implies that B is a subset of A. This follows from the property of functional dependencies where each attribute on the right-hand side must be contained within the set of attributes on the left-hand side in the case of a trivial dependency.
Quick Tip: Trivial functional dependency means that the right-hand side of the dependency is always a subset of the left-hand side.


Question 78:

Which of the following commands is used to delete all rows and free up space from a table?

  • (1) Drop
  • (2) Delete
  • (3) Truncate
  • (4) Alter
Correct Answer: (3) Truncate
View Solution



The TRUNCATE command is used to delete all rows from a table, freeing up space by deallocating the space used by the table. Unlike the DELETE command, TRUNCATE does not log individual row deletions, making it faster for large tables. Drop and Alter are used for removing tables or altering table structure.
Quick Tip: Use TRUNCATE when you need to quickly delete all rows and free up space. It's faster and more efficient than DELETE.


Question 79:

____ uses Quantifiers that can be either Existential (*) or Universal (V).

  • (1) Domain Relational Calculus
  • (2) Tuple Relational Calculus
  • (3) Distributed Relational Calculus
  • (4) NoSQL
Correct Answer: (2) Tuple Relational Calculus
View Solution



Tuple Relational Calculus (TRC) uses quantifiers such as Existential (*) and Universal (V) to specify conditions on tuples in a relation. These quantifiers are fundamental in expressing queries in TRC, similar to the use of quantifiers in predicate logic. Domain Relational Calculus uses a different set of rules for expressing queries.
Quick Tip: Tuple Relational Calculus uses quantifiers for logical expressions, while Domain Relational Calculus works with individual attributes.


Question 80:

The database design that consists of multiple tables that are linked together through matching data stored in each table is called a _____.

  • (1) Relational database
  • (2) Network database
  • (3) Object oriented database
  • (4) Hierarchical database
Correct Answer: (1) Relational database
View Solution



A Relational Database is a collection of tables that are related to each other based on common attributes. These relationships allow for efficient data retrieval and management. The other database types, such as Network and Hierarchical databases, represent data in structures like trees and networks rather than tables.
Quick Tip: When thinking about relational databases, consider how data is structured in tables and linked through common fields.


Question 81:

The incremental model of software development is _____.

  • (1) a reasonable approach when requirements are well defined
  • (2) a good approach when a working core product is required quickly
  • (3) the best approach to use for projects with large development teams
  • (4) a revolutionary model that is not used for commercial products
Correct Answer: (2) a good approach when a working core product is required quickly
View Solution



The Incremental model divides the product into smaller, manageable parts, and each part is developed iteratively. This allows for quicker releases of core products and is especially beneficial when a product needs to be released quickly. It's not particularly suited for large projects where detailed upfront planning is essential.
Quick Tip: The Incremental model is best when you need to deliver a working product quickly and can continue refining it iteratively.


Question 82:

The cyclomatic complexity metric provides the designer with information regarding the number of _____.

  • (1) cycles in the program
  • (2) errors in the program
  • (3) independent logic paths in the program
  • (4) statements in the program
Correct Answer: (3) independent logic paths in the program
View Solution



Cyclomatic complexity is a software metric used to measure the complexity of a program based on its control flow graph. It specifically measures the number of independent paths in the program, which helps to evaluate the program's testing needs and maintainability. A higher cyclomatic complexity indicates a more complex program that may require more testing.
Quick Tip: Cyclomatic complexity is useful for assessing test coverage and identifying sections of code that may be more error-prone.


Question 83:

In the spiral model of software development, the primary determinant in selecting activities in each iteration is _____.

  • (1) iteration size
  • (2) cost
  • (3) risk
  • (4) adopted process such as rational unified process or extreme programming
Correct Answer: (3) risk
View Solution



In the Spiral Model, risk management is the primary driver for selecting which activities to focus on in each iteration. The model emphasizes risk analysis and mitigation, with each iteration focusing on the risks identified in previous cycles. The cost and iteration size are considered, but they are secondary to addressing the risks associated with the project.
Quick Tip: The Spiral Model is particularly beneficial for projects with significant uncertainty or risk.


Question 84:

The optimizer that explores the space of all query-evaluation plans is called _____.

  • (1) cost-based
  • (2) plan-based
  • (3) estimate-based
  • (4) count-based
Correct Answer: (1) cost-based
View Solution



A cost-based optimizer is responsible for exploring different query evaluation plans and selecting the one that minimizes the estimated cost. It evaluates the cost of different execution strategies based on factors such as the amount of data and the number of joins involved.
Quick Tip: Cost-based optimizers are efficient for complex queries and large datasets, as they minimize execution time by considering all possible plans.


Question 85:

The term that optimizes subexpressions shared by different expressions in a program is called _____.

  • (1) multiple subexpression elimination
  • (2) common subexpression elimination
  • (3) parametric subexpression elimination
  • (4) shared subexpression elimination
Correct Answer: (2) common subexpression elimination
View Solution



Common subexpression elimination is a technique used in compilers to optimize programs by identifying and eliminating expressions that are computed multiple times. This optimization improves program performance by reducing redundant calculations.
Quick Tip: Look for opportunities to apply common subexpression elimination when you see repetitive calculations in your code.


Question 86:

Frequency of failure and network recovery time after a failure are measures of the _____ of a network.

  • (1) performance
  • (2) reliability
  • (3) security
  • (4) feasibility
Correct Answer: (2) reliability
View Solution



Reliability refers to the network's ability to function correctly over time, even in the face of failures. The frequency of failure and recovery time after failure are critical measures of reliability, as they reflect how resilient and stable the network is during disruptions.
Quick Tip: For robust networks, focus on improving reliability by minimizing failures and reducing recovery times.


Question 87:

A Gantt chart is least useful for tracking _____.

  • (1) task dependencies
  • (2) resource allocation
  • (3) critical path
  • (4) code complexity
Correct Answer: (4) code complexity
View Solution



Gantt charts are excellent for tracking project timelines, task dependencies, and resource allocation. However, they are not ideal for tracking code complexity, as they focus more on the scheduling and progress of tasks rather than the technical details of code structure.
Quick Tip: Gantt charts are best for managing project schedules, but for tracking code quality and complexity, consider other tools like code metrics.


Question 88:

Which phase of the SDLC typically consumes the most resources?

  • (1) Requirements gathering
  • (2) Testing
  • (3) Maintenance
  • (4) Coding
Correct Answer: (3) Maintenance
View Solution



The Maintenance phase of the Software Development Life Cycle (SDLC) typically consumes the most resources, as it involves ongoing support, bug fixes, and updates after the product has been deployed. This phase can last for a significant period and requires continuous effort.
Quick Tip: Planning for the maintenance phase early in the SDLC helps ensure that resources are allocated efficiently.


Question 89:

Regression testing is performed to ensure that _____.

  • (1) new code doesn't break existing functionality
  • (2) all paths are covered
  • (3) users accept the system
  • (4) compliance with laws
Correct Answer: (1) new code doesn't break existing functionality
View Solution



Regression testing ensures that new changes to the system, such as bug fixes or feature enhancements, do not inadvertently break or interfere with the existing functionality of the system. This testing ensures the stability of the software over time.
Quick Tip: Always run regression tests after adding or modifying code to ensure that previous functionalities are not affected.


Question 90:

The COCOMO model estimates _____.

  • (1) project risk
  • (2) software cost
  • (3) team productivity
  • (4) user satisfaction
Correct Answer: (2) software cost
View Solution



The COCOMO (Constructive Cost Model) model is used to estimate the cost and effort required for software development projects. It provides an estimate based on the size of the project and the development environment. The primary focus of COCOMO is on software cost estimation.
Quick Tip: Use the COCOMO model to get reliable cost estimates for software development, especially for large and complex projects.


Question 91:

At which OSI layer does MAC address filtering occur?

  • (1) Network
  • (2) Data Link
  • (3) Transport
  • (4) Physical
Correct Answer: (2) Data Link
View Solution



MAC address filtering occurs at the Data Link layer (Layer 2) of the OSI model. It involves filtering packets based on the Media Access Control (MAC) address to control access to the network.
Quick Tip: Remember, MAC addresses operate at Layer 2 of the OSI model, which is responsible for node-to-node communication.


Question 92:

Token Ring networks avoid collisions by _____.

  • (1) CSMA/CD
  • (2) Token passing
  • (3) Exponential backoff
  • (4) Priority queuing
Correct Answer: (2) Token passing
View Solution



Token Ring networks use token passing as a method to avoid collisions. In this method, a special token circulates the network, and only the node with the token can send data. This avoids the possibility of multiple devices transmitting at the same time.
Quick Tip: Token passing is a collision-free method used in Token Ring networks, unlike CSMA/CD which is used in Ethernet.


Question 93:

Which routing algorithm guarantees shortest paths even with negative edge weights?

  • (1) Dijkstra's
  • (2) Bellman-Ford
  • (3) Link-State
  • (4) OSPF
Correct Answer: (2) Bellman-Ford
View Solution



The Bellman-Ford algorithm is designed to handle graphs with negative edge weights, unlike Dijkstra's algorithm, which cannot handle negative weights. Bellman-Ford can compute the shortest paths even if there are negative edges, as long as there are no negative weight cycles.
Quick Tip: Use the Bellman-Ford algorithm when dealing with graphs that may have negative edge weights or potential negative cycles.


Question 94:

A TCP header includes all except _____.

  • (1) Sequence number
  • (2) Checksum
  • (3) TTL
  • (4) Window size
Correct Answer: (3) TTL
View Solution



The TCP header includes fields such as Sequence number, Checksum, and Window size, but it does not include the TTL (Time to Live). TTL is a field in the IP header, not in the TCP header.
Quick Tip: Remember, TTL is related to the IP layer, whereas Sequence number, Checksum, and Window size are specific to the TCP header.


Question 95:

The three-way handshake in TCP ensures _____.

  • (1) Encryption setup
  • (2) Synchronized sequence numbers
  • (3) QoS negotiation
  • (4) Multicast membership
Correct Answer: (2) Synchronized sequence numbers
View Solution



The three-way handshake in TCP ensures that both sides of the communication are synchronized with respect to sequence numbers. This process ensures reliable data transfer, as the sequence numbers are used to track the data being sent.
Quick Tip: The three-way handshake is crucial for establishing a reliable connection by ensuring synchronized sequence numbers between sender and receiver.


Question 96:

An IPv4 datagram with header length=5 and total length=400 bytes carries _____.

  • (1) 380 bytes payload
  • (2) 400 bytes payload
  • (3) 20 bytes header
  • (4) 320 bytes payload
Correct Answer: (1) 380 bytes payload
View Solution



The total length of an IPv4 datagram includes both the header and the payload. The IPv4 header length is given as 5, which corresponds to 5 * 4 = 20 bytes. Thus, the payload is the total length minus the header length: 400 - 20 = 380 bytes.
Quick Tip: To calculate the payload size, subtract the header length from the total length of the datagram.


Question 97:

Which protocol uses port 53 by default?

  • (1) HTTP
  • (2) FTP
  • (3) DNS
  • (4) SMTP
Correct Answer: (3) DNS
View Solution



Port 53 is used by the Domain Name System (DNS) for both UDP and TCP communications. DNS is responsible for translating domain names into IP addresses and vice versa.
Quick Tip: Port 53 is reserved for DNS traffic, so any communication involving domain name resolution will use this port.


Question 98:

A switch differs from a hub because, it _____.

  • (1) operates at Layer 1
  • (2) broadcasts all frames
  • (3) uses MAC tables for forwarding
  • (4) only supports half-duplex
Correct Answer: (3) uses MAC tables for forwarding
View Solution



A switch differs from a hub in that it operates at the Data Link layer (Layer 2) and uses MAC address tables to forward data only to the correct destination port, unlike hubs that broadcast frames to all ports.
Quick Tip: Switches are more efficient than hubs because they minimize traffic on the network by only sending data to the intended destination.


Question 99:

Digital signatures provide _____.

  • (1) confidentiality
  • (2) non-repudiation
  • (3) key exchange
  • (4) firewall bypass
Correct Answer: (2) non-repudiation
View Solution



Digital signatures provide non-repudiation, meaning that once a message is signed, the sender cannot deny having sent the message. This ensures authenticity and integrity of the message.
Quick Tip: Digital signatures are essential for ensuring that the sender cannot later deny the message they sent, providing legal proof of their identity.


Question 100:

In asynchronous transmission, the gap time between bytes is _____.

  • (1) fixed
  • (2) variable
  • (3) a function of the data rate
  • (4) zero
Correct Answer: (2) variable
View Solution



In asynchronous transmission, the gap between bytes is variable because there is no fixed timing or clock. The timing depends on the system's transmission speed and the gap between the start and end of each byte.
Quick Tip: In asynchronous transmission, the gap between bytes can vary, making it less efficient compared to synchronous transmission.


Question 101:

In Java, when we implement an interface method, it must be declared as _____.

  • (1) private
  • (2) protected
  • (3) public
  • (4) friend
Correct Answer: (3) public
View Solution



In Java, when implementing an interface method, it must be declared as public, as all methods in interfaces are implicitly public. This allows the methods to be accessible from outside the implementing class.
Quick Tip: Interface methods in Java are always public, even if not explicitly declared, and they must be implemented as public in the class.


Question 102:

Which of the following control fields in TCP header is used to specify whether the sender has no more data to transport?

  • (1) FIN
  • (2) RST
  • (3) SYN
  • (4) PSH
Correct Answer: (1) FIN
View Solution



The FIN flag in the TCP header indicates that the sender has finished sending data and has no more data to transport. This is used to initiate the connection termination process.
Quick Tip: When you see the FIN flag in a TCP packet, it signals the end of the transmission, prompting the termination of the connection.


Question 103:

In XML, DOCTYPE declaration specifies to include a reference to _____ file.

  • (1) document type declaration
  • (2) document type definition
  • (3) document type language
  • (4) document transfer definition
Correct Answer: (2) document type definition
View Solution



In XML, the DOCTYPE declaration is used to include a reference to the document type definition (DTD), which defines the structure and rules for the XML document. This ensures that the document adheres to the specified format.
Quick Tip: DOCTYPE declarations are important in XML to ensure data validity by defining the allowed structure of the document.


Question 104:

The CSS used inside HTML elements alongside style attribute is called _____.

  • (1) external CSS
  • (2) internal CSS
  • (3) inline CSS
  • (4) outline CSS
Correct Answer: (3) inline CSS
View Solution



Inline CSS is used directly within an HTML element using the style attribute. It allows for styling specific elements without affecting others on the page.
Quick Tip: Inline CSS is useful for quick styling but should be avoided for large-scale websites in favor of external or internal CSS for better maintainability.


Question 105:

A web client sends a request to a web server. The web server transmits a program to that client and is executed at client which creates a web document. Such web documents are _____.

  • (1) dynamic
  • (2) static
  • (3) active
  • (4) passive
Correct Answer: (3) active
View Solution



Active web documents are created when a server sends a program to the client, which then executes it to generate dynamic content. Examples include scripts like PHP, JavaScript, and ASP.
Quick Tip: Active documents require client-side processing, unlike static documents, which are pre-generated on the server.


Question 106:

Cascading Style Sheets define style and appearance using _____.

  • (1) functions with parameters and return values
  • (2) rules with selectors, properties and their values
  • (3) techniques with block and inline elements
  • (4) heuristics with rules and maps
Correct Answer: (2) rules with selectors, properties and their values
View Solution



Cascading Style Sheets (CSS) use rules to define the appearance of elements on a web page. These rules consist of selectors, properties, and values. Selectors identify HTML elements, and properties define how those elements should appear.
Quick Tip: CSS allows for clear separation of style from content, making it easier to maintain and modify the look of a website.


Question 107:

What is the correct HTML for making a hyperlink?

  • (1) \texttt{abc}
  • (2) \texttt{abc}
  • (3) \texttt{}
  • (4) \texttt{url="http://abc.com">}



}}}

View Solution



In HTML, the background color of a page can be set using the \texttt{bgcolor attribute within the \texttt{

tag. It is not recommended to use inline styling for this; CSS is preferred for modern web development.
Quick Tip: While \texttt{bgcolor} is still supported in HTML, it is recommended to use CSS for styling in modern web development.













Fees Structure

Structure based on different categories

CategoriesState
General1200
sc700

In case of any inaccuracy, Notify Us! 

Comments


No Comments To Show