Questions 811–820 of 975. Imported answers require independent review unless marked reviewed.

Topic practice 975 questionsPage 82 of 98

Question 21

Open question
CSNAT1 markNeeds review
Consider the following C program:
#include <stdio.h>

int counter = 0;

int calc (int a, int b) {
int c;

counter++;
if (b==3) return (a*a*a);
else {
c = calc(a, b/3);
return (c*c*c);
}
}

int main () {
calc(4, 81);
printf("%d", counter);
}
The output of this program is ____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 22

Open question
CSNAT1 markNeeds review
Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops.
Diagram for Computer Science and Information Technology question 22

The number of states in the state transition diagram of this circuit that have a transition back to the same state on some value of “in” is ____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 23

Open question
CSNAT1 markNeeds review
A 32-bit wide main memory unit with a capacity of 1 GB is built using 256 M × 4-bit DRAM chips. The number of rows of memory cells in the DRAM chip is

. The time taken to perform one refresh operation is 50 nanoseconds. The refresh period is 2 milliseconds. The percentage (rounded to the closest integer) of the time available for performing the memory read/write operations in the main memory unit is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 24

Open question
CSNAT1 markNeeds review
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is ____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 25

Open question
CSNAT1 markNeeds review
Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (=

bits-per-second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 26

Open question
CSMCQ2 marksNeeds review
Consider a matrix P whose only eigenvectors are the multiples of

.
Consider the following statements.
(I) P does not have an inverse (II) P has a repeated eigenvalue (III) P cannot be diagonalized
Which one of the following options is correct?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 27

Open question
CSMCQ2 marksNeeds review
Let N be the set of natural numbers. Consider the following sets. P: Set of Rational numbers (positive and negative) Q: Set of functions from to N R: Set of functions from N to S: Set of finite subsets of N. Which of the sets above are countable?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 28

Open question
CSMCQ2 marksNeeds review
Consider the first-order logic sentence

where

is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose

has a model with a universe containing 7 elements. Which one of the following statements is necessarily true?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 29

Open question
CSMCQ2 marksNeeds review
Consider the following C program:
#include<stdio.h>

void fun1(char *s1, char *s2){
char *tmp;
tmp = s1;
s1 = s2;
s2 = tmp;
}
void fun2(char **s1, char **s2){
char *tmp;
tmp = *s1;
*s1 = *s2;
*s2 = tmp;
}
int main(){
char *str1 = "Hi", *str2 = "Bye";
fun1(str1, str2); printf("%s %s", str1, str2);
fun2(&str1, &str2); printf("%s %s", str1, str2);
return 0;
}
The output of the program above is
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 30

Open question
CSMCQ2 marksNeeds review
Let G be a simple undirected graph. Let T_D be a depth first search tree of G. Let T_B be a breadth first search tree of G. Consider the following statements. (I) No edge of G is a cross edge with respect to T_D. (A cross edge in G is between two nodes neither of which is an ancestor of the other in T_D.) (II) For every edge (u,v) of G, if u is at depth i and v is at depth j in T_B, then

. Which of the statements above must necessarily be true?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer