Question 41
Question 42
#includeThe output of the program is ______. Note: This questions appeared as Numerical Answer Type.int main() { int m = 10; int n, n1; n = ++m; n1 = m++; n--; --n1; n -= n1; printf("%d",n); return 0; }
Question 43
Consider two hosts X and Y, connected by a single direct link of rate 106 bits/sec. The distance between the two hosts is 10,000 km and the propagation speed along the link is 2 x 108 m/s. Hosts X send a file of 50,000 bytes as one large message to hosts Y continuously. Let the transmission and propagation delays be p milliseconds and q milliseconds, respectively. Then the vales of p and q are:
Question 44
Question 45
Question 46
Question 47
int main() { int array[] = {3, 5, 1, 4, 6, 2}; int done = 0; int i; while (done == 0) { done = 1; for (i = 0; i <= 4; i++) { if (array[i] < array[i+1]) { swap(&array[i], &array[i+1]); done = 0; } } for (i = 5; i >= 1; i--) { if (array[i] > array[i-1]) { swap(&array[i], &array[i-1]); done = 0; } } } printf("%d", array[3]); }The output of the program is _____. Note: This question appeared as Numerical Answer Type.
Question 48
Question 49
int fun(int n) { int i, j; for (i = 1; i <= n ; i++) { for (j = 1; j < n; j += i) { printf("%d %d", i, j); } } }Time complexity of fun in terms of θ notation is:
Question 50
Let L(R) be the language represented by regular expression R. Let L(G) be the language generated by a context free grammar G. Let L(M) be the language accepted by a Turing machine M. Which of the following decision problems are undecidable? I. Given a regular expression R and a string w, is w∈L(R)? II. Given a context-free grammar G, is L(G)=∅ III. Given a context-free grammar G, is L(G)=Σ∗ for some alphabet Σ? IV. Given a Turing machine M and a string w, is w ∈ L(M)?
There are 65 questions to complete.