Question 1 |
Which of the following problems are un-decidable?
[MSQ]
[MSQ]
Membership problem in context-free languages. | |
Whether a given context-free language is regular. | |
Whether a finite state automation halts on all inputs. | |
Membership problem for type 0 languages. |
Question 1 Explanation:
Question 2 |
A hash table with ten buckets with one slot per bucket is shown in the following figure. The symbols S1 to S7 initially entered using a hashing function with linear probing. The maximum number of comparisons needed in searching an item that is not present is
\begin{array}{|l|l|} \hline 0 & \text { S7 } \\ \hline 1 & \text { S1 } \\ \hline 2 & \\ \hline 3 & \text { S4 } \\ \hline 4 & \text { S2 } \\ \hline 5 & \text { } \\ \hline 6 & \text { S5 } \\ \hline 7 & \\ \hline 8 & \text { S6 } \\ \hline 9 & \text { S3 } \\ \hline \end{array}
\begin{array}{|l|l|} \hline 0 & \text { S7 } \\ \hline 1 & \text { S1 } \\ \hline 2 & \\ \hline 3 & \text { S4 } \\ \hline 4 & \text { S2 } \\ \hline 5 & \text { } \\ \hline 6 & \text { S5 } \\ \hline 7 & \\ \hline 8 & \text { S6 } \\ \hline 9 & \text { S3 } \\ \hline \end{array}
4 | |
5 | |
6 | |
3 |
Question 2 Explanation:
Question 3 |
In which of the following case(s) is it possible to obtain different results for call-by-reference and call-by-name parameter passing?
Passing an expression as a parameter | |
Passing an array as a parameter | |
Passing a pointer as a parameter | |
Passing as array element as a parameter |
Question 3 Explanation:
Question 4 |
An unrestricted use of the "go to" statement is harmful because of which of the following reason (s):
It makes it more difficult to verify programs. | |
It makes programs more inefficient. | |
It makes it more difficult to modify existing programs. | |
It results in the compiler generating longer machine code. |
Question 4 Explanation:
Question 5 |
Context-free languages and regular languages are both closed under the operation (s) of :
Union | |
Intersection | |
Concatenation | |
Complementation |
Question 5 Explanation:
There are 5 questions to complete.