Question 1 |
Consider the following C program segment.
#include < stdio.h >
int main()
{
char s1[7] = "1234", *p;
p = s1 + 2;
*p = '0';
printf("%s", s1);
}
What will be printed by the program?12 | |
120400 | |
1204 | |
1034 |
Question 1 Explanation:
Question 2 |
Suppose U is the power set of the set S={1,2,3,4,5,6}. For any T\inU, let |T| denote the number of elements in T and T' denote the complement of T. For any T,R\inU, let T\R be the set of all elements in T which are not in R. Which one of the following is true?
\forall X\in U \; (|X|=|X'|) | |
\exists X\in U \; \exists Y\in U \; (|X|=5,\; |Y|=5 \; and \; X \cap Y=\phi ) | |
\forall X\in U \; \forall Y\in U \; (|X|=2,\; |Y|=3 \; and \; X \setminus Y=\phi ) | |
\forall X \in U \; \forall Y\in U\; (X \setminus Y=Y' \setminus X') |
Question 2 Explanation:
Question 3 |
Consider the relation X(P,Q,R,S,T,U) with the following set of functional dependencies
F= {{P,R}\rightarrow{S,T}, {P,S,U}\rightarrow{Q,R} }
Which of the following is the trivial functional dependency in F^{+}, where F^{+} is closure of F ?
F= {{P,R}\rightarrow{S,T}, {P,S,U}\rightarrow{Q,R} }
Which of the following is the trivial functional dependency in F^{+}, where F^{+} is closure of F ?
{P,R}\rightarrow{S,T} | |
{P,R}\rightarrow{R,T} | |
{P,S}\rightarrow{S} | |
{P,S,U}\rightarrow{Q} |
Question 3 Explanation:
Question 4 |
The maximum number of processes that can be in Ready state for a computer system with n CPUs is
n | |
n^{2} | |
2^{n} | |
Independent of n |
Question 4 Explanation:
Question 5 |
Among simple LR (SLR) , canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful , in that order?
SLR, LALR | |
Canonical LR, LALR | |
SLR, canonical LR | |
LALR, canonical LR |
Question 5 Explanation:
There are 5 questions to complete.