7 votes
122
What is the time complexity of the following code snippet?sum=0; for(i=0;i<=n;i++) { for(j=1;j<=i;j++) { if(j%i==0) { for(k=0;k<=n;k++) { sum=sum+k; } } } }
4 votes
127
Assume memory access time is 10 μs and reading a page from disk takes 10 ms. If page fault occur in 0.5% of the memory references then what is the average memory access ...
9 votes
128
In a TCP connection, the value of congestion window Cnwd = 2500 and the value of receiver window Rwnd = 4500.The host has sent 2000 bytes which has not been acknowledge. ...
19 votes
131
1. Does starvation freedom imply bounded- waiting ?2. Does bounded- waiting imply starvation freedom ?Explain with example.
19 votes
134
1 votes
135
This program will give compilation error, that I know (because of constant base address). But why "L value" error?#include<stdio.h main() { char s1[50], s2[50] = "Hello";...
4 votes
137
consider a system with 2 level paging scheme in which a regular mem access takes 300 ns and servicing a page fault takes 500 ns . Avg instr takes 200 ns cpu time and 1 me...
6 votes
138
A computer system has 13 bit instruction and support zero address and 1 address instructions.The memory contains 128 words.If there exists 32 one address instructions how...
7 votes
140
int i; i=5; i=i++; printf("%d",i);What is output of this program??Is it undefined behavior ?? Why??
3 votes
141
const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); }a. 0 b. 2 c. 4 d. none of the...
0 votes
143
Which of the following is/are TRUE?1. n! = $\Theta$ ((n+1)!)2.log n base 4 =$\Theta$ (log n base 2)3. &radic;log n = O (log log n)A) 1 and 2 onlyB) 1 and 3 onlyC) 2 onlyD...
4 votes
144
What will be outputint main() { char str[10]="GATE 2016"; int length=strlen(str); str[length]='\0'; for(i=0;str[i];i++) printf("%c",str[i]); return 0; }
1 votes
145
Consider storage class of a variable declared as static. Where the memory will be allocated?a)Code segmentb)Stack segmentc) Heap segmentd) Data segment
4 votes
146
L= {(xy)^m (yz)^m | m>=1} identify the language...
1 votes
147
iff(n) &ne; O(g(n)) then, g(n) &ne; O(f(n)) state true or false with explanation.