Questions 421–430 of 975. Imported answers require independent review unless marked reviewed.

Topic practice 975 questionsPage 43 of 98

Question 31

Open question
CSNAT1 markNeeds review
The value of the definite integral

is _____. (Rounded off to the nearest integer)

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 32

Open question
CSNAT1 markNeeds review
A particular number is written as

in radix-4 representation. The same number in radix-5 representation 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 33

Open question
CSNAT1 markNeeds review
Consider a 3-stage pipelined processor having a delay of 10 ns (nanoseconds), 20 ns, and 14 ns, for the first, second, and the third stages, respectively. Assume that there is no other delay and the processor does not suffer from any pipeline hazards. Also assume that one instruction is fetched every cycle.
The total execution time for executing 100 instructions on this processor is _____ ns.

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 34

Open question
CSNAT1 markNeeds review
A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer system polls the keyboard every 10 ms (milli seconds) to check for a keystroke and consumes 100

s (micro seconds) for each poll. If it is determined after polling that a key has been pressed, the system consumes an additional 200

s to process the keystroke. Let

denote the fraction of a second spent in polling and processing a keystroke.
In an alternative implementation, the system uses interrupts instead of polling. An interrupt is raised for every keystroke. It takes a total of 1 ms for serving an interrupt and processing a keystroke. Let

denote the fraction of a second spent in serving the interrupt and processing a keystroke.
The ratio

is ______. (Rounded off to one decimal place)

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 35

Open question
CSNAT1 markNeeds review
The integer value printed by the ANSI-C program given below is ______.
#include<stdio.h>

int func(){
static int x = 1;
x++;
return x;
}

int main(){
int x,y;
x = func();
y = func()+x;
printf("%d\n", (x+y));
return 0;
}

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 36

Open question
CSMCQ2 marksNeeds review
Consider the following program:
int main() int f1() int f2(int x) int f3()
{ { { {
f1(); return(1); f3(); return(5);
f2(2); } if (x==1) }
f3(); return f1();
return(0); else
} return (x*f2(x-1);
}
Which one of the following options represents the activation tree corresponding to the main function?
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 37

Open question
CSMCQ2 marksNeeds review
Consider the control flow graph shown.
Diagram for Computer Science and Information Technology question 37

Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?
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 38

Open question
CSMCQ2 marksNeeds review
Consider the two functions inc and dec shown below.
inc(){ dec(){
wait(s); wait(s);
X = X+1; X = X-1;
signal(s); signal(s);
} }
There are 5 threads each invoking inc once, and 3 threads each invoking dec once, on the same shared variable X. The initial value of X is 10.
Suppose there are two implementations of the semaphore s, as follows:
I-1: s is a binary semaphore initialized to 1.
I-2: s is a counting semaphore initialized to 2.
Let V1, V2 be the values of X at the end of execution of all the threads with implementations I-1, I-2, respectively.
Which one of the following choices corresponds to the minimum possible values of V1, V2, respectively?
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 39

Open question
CSMCQ2 marksNeeds review
Consider the context-free grammar

below

where

and

are non-terminals, and

and

are terminal symbols. The starting non-terminal is

.
Which one of the following statements 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 40

Open question
CSMCQ2 marksNeeds review
Consider the pushdown automaton (PDA)

below, which runs on the input alphabet

, has stack alphabet

, and has three states

, with

being the start state. A transition from state

to state

, labelled

, where

is an input symbol or

,

is a stack symbol, and

is a string of stack symbols, represents the fact that in state

, the PDA can read

from the input, with

on the top of its stack, pop

from the stack, push in the string

on the stack, and go to state

. In the initial configuration, the stack has only the symbol

in it. The PDA accepts by empty stack.
Which one of the following options correctly describes the language accepted by

?
Diagram for Computer Science and Information Technology question 40

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