Question 1 |
The probability that it will rain today is 0.5. The probability that it will rain tomorrow is 0.6. The probability that it will rain either today or tomorrow is 0.7. What is the probability that it will rain today and tomorrow?
0.3 | |
0.25 | |
0.35 | |
0.4 |
Question 1 Explanation:
Question 2 |
The Newton-Raphson method is used to find the root of the equation X^2-2=0. If the iterations are started from -1, the iterations will
converge to -1 | |
converge to \sqrt{2} | |
converge to \sqrt{-2} | |
not converge |
Question 2 Explanation:
Question 3 |
The determinant of the matrix \begin{bmatrix} 6 & -8 & 1 & 1 \\ 0 & 2 & 4 & 6 \\ 0 & 0 & 4 & 8 \\ 0 & 0 & 0 & -1 \end{bmatrix}
11 | |
-48 | |
0 | |
-24 |
Question 3 Explanation:
Question 4 |
The concatenation of two lists is to be performed on O(1) time. Which of the following implementations of a list should be used?
Singly linked list | |
Doubly linked list | |
Circular doubly linked list | |
Array implementation of list |
Question 4 Explanation:
Question 5 |
The correct matching for the following pairs is
\begin{array}{ll|ll}\hline \text{A.} & \text{All pairs shortest path} & \text{1.} & \text{Greedy} \\\hline \text{B.} & \text{Quick Sort} & \text{2.}& \text{Depth-First Search} \\\hline \text{C.}& \text{Minimum weight spanning tree} & \text{3.} & \text{Dynamic Programming} \\\hline \text{D.} & \text{Connected Components} &\text{4.} & \text{Divide and Conquer} \\\hline \end{array}
\begin{array}{ll|ll}\hline \text{A.} & \text{All pairs shortest path} & \text{1.} & \text{Greedy} \\\hline \text{B.} & \text{Quick Sort} & \text{2.}& \text{Depth-First Search} \\\hline \text{C.}& \text{Minimum weight spanning tree} & \text{3.} & \text{Dynamic Programming} \\\hline \text{D.} & \text{Connected Components} &\text{4.} & \text{Divide and Conquer} \\\hline \end{array}
A-2 B-4 C-1 D-3 | |
A-3 B-4 C-1 D-2 | |
A-3 B-4 C-2 D-1 | |
A-4 B-1 C-2 D-3 |
Question 5 Explanation:
Question 6 |
In the following grammar
\begin{aligned} X &::= X \oplus Y \mid Y \\ Y&::= Z * Y \mid Z\\ Z&::= id \end{aligned}
Which of the following is true?
\begin{aligned} X &::= X \oplus Y \mid Y \\ Y&::= Z * Y \mid Z\\ Z&::= id \end{aligned}
Which of the following is true?
'\oplus' is left associative while '*' is right associative | |
Both '\oplus' and '*' are left associative | |
'\oplus' is right associative while '*' is left associative | |
None of the above |
Question 6 Explanation:
Question 7 |
Which of the following is essential for converting an infix expression to the postfix form efficiently?
An operator stack | |
An operand stack | |
An operand stack and an operator stack | |
A parse tree |
Question 7 Explanation:
Question 8 |
A language L allows declaration of arrays whose sizes are not known during compilation. It is required to make efficient use of memory. Which one of the following is true?
A compiler using static memory allocation can be written for L | |
A compiler cannot be written for L; an interpreter must be used | |
A compiler using dynamic memory allocation can be written for L | |
None of the above |
Question 8 Explanation:
Question 9 |
The conditional expansion facility of macro processor is provided to
test a condition during the execution of the expanded program | |
to expand certain model statements depending upon the value of a condition during the execution of the expanded program | |
to implement recursion | |
to expand certain model statements depending upon the value of a condition during the process of macro expansion |
Question 9 Explanation:
Question 10 |
Heap allocation is required for languages.
that support recursion | |
that support dynamic data structure | |
that use dynamic scope rules | |
None of the above |
Question 10 Explanation:
There are 10 questions to complete.