Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Answers by Kapil
9
votes
121
made easy test
A computer system with 2 level paging scheme in which regular memory access takes 300 nanoseconds and servicing a pagefault takes 500ns. An average instruction takes 200 ns of CPU time and one memory access. The TLB hit ratio is 80% and page fault ratio is 20%. The average instruction execution time is ? My answer is 660 ns but made easy solution has 580 ns. Can any one check??
A computer system with 2 level paging scheme in which regular memory access takes 300 nanoseconds and servicing a pagefault takes 500ns. An average instruction takes 200 ...
1.7k
views
answered
Sep 30, 2016
Operating System
paging
operating-system
translation-lookaside-buffer
+
–
7
votes
122
Gate cse facebook group doubt
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; } } } }
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; } } } }
1.3k
views
answered
Sep 29, 2016
Programming in C
time-complexity
programming-in-c
+
–
5
votes
123
Kerala PSC AP exam
int main() { int *r2; void abc(int **); abc(&r2); printf("%d",*r2); } void abc(int **r3) { int r1=5; /* add statements here */ } Which statement is added to the above program such that the address of r1 gets stored in r2? A) *r2 = &r1; B)*r1 = &r3; C) *r3 = &r1; D) None of these
int main() { int *r2; void abc(int ); abc(&r2); printf("%d",*r2); } void abc(int r3) { int r1=5; /* add statements here */ }Which statement is added to the above progra...
850
views
answered
Sep 28, 2016
Programming in C
programming-in-c
pointers
+
–
3
votes
124
Kerala PSC AP Exam
Choose the correct statement A) The recursive enumerable sets are closed under complementation B) Deterministic context free languages are closed under intersection C)Context sensitive languages are closed under homomorphism D) A is recursive if both A and its complement are accepted by Turing machine
Choose the correct statementA) The recursive enumerable sets are closed under complementationB) Deterministic context free languages are closed under intersectionC)Contex...
1.5k
views
answered
Sep 28, 2016
7
votes
125
MadeEasy Test Series: Algorithms - Sorting
Consider the following code executed on an n-element array A such that each element i an A satisfies the condition 0 ≤ A[i] < 1. The code also uses an auxiliary array, B[0 to n - 1]. Random-Sort (A) { 1. n ← Length ... order. } Which algorithm will be placed in the blank at line 5 for sorting (stable) so that the code will give minimum time complexity?
Consider the following code executed on an n-element array A such that each element i an A satisfies thecondition 0 ≤ A[i] < 1. The code also uses an auxiliary array, B...
3.5k
views
answered
Sep 27, 2016
Algorithms
made-easy-test-series
algorithms
sorting
+
–
11
votes
126
Minimized DFA no of states || Peter Linz
$L = \left \{ a^nb \ ; n\geq 0 \right \} \cup \left \{ b^na \ ; n\geq 1 \right \}$ Minimal DFA for the above language ?
$L = \left \{ a^nb \ ; n\geq 0 \right \} \cup \left \{ b^na \ ; n\geq 1 \right \}$Minimal DFA for the above language ?
3.1k
views
answered
Sep 24, 2016
Theory of Computation
theory-of-computation
minimal-state-automata
finite-automata
theory-of-computation-
+
–
4
votes
127
OS :
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 time (in μsec)?
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 ...
793
views
answered
Sep 22, 2016
Operating System
operating-system
test-series
+
–
9
votes
128
CN-TCP
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. How many more bytes can be sent? A) 2000 B) 500 C) 2500 D) none of these
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. ...
5.3k
views
answered
Sep 22, 2016
Computer Networks
congestion-control
tcp
+
–
21
votes
129
Bottom-Up Parsing
Consider the folllowing grammar $ S\rightarrow AaS \ |\ b$ $ A\rightarrow c \ |\ d \ |B$ $ B\rightarrow AgC \ |\ AhC \ | \ DgC | \ DhC$ $C\rightarrow c \ |\ d \ | \ D$ $ D\rightarrow eBf$ Which of the following are viable prefix ? $ \left ( 1 \right )Aab$ $ \left ( 2 \right )ca$ $ \left ( 3 \right )cab$ $\left ( 4 \right )AgCS$
Consider the folllowing grammar$ S\rightarrow AaS \ |\ b$$ A\rightarrow c \ |\ d \ |B$$ B\rightarrow AgC \ |\ AhC \ | \ DgC | \ DhC$$C\rightarrow c \ |\ d \ | \ D$$ D\rig...
2.8k
views
answered
Sep 20, 2016
Compiler Design
compiler-design
viable-prefix
parsing
+
–
5
votes
130
Self-Doubt
char buffer[6]=”hello”; char *prt1=buffer -1; /* undefined behavior */ char *ptr2 = buffer +5; /*Ok, pointing to the ‘\0’ inside the array */ char *ptr3 = buffer +6; /* OK, pointing to just beyond */ char *ptr4 = buffer +7; /* undefined behavior */ Please clear last two line.. and why 2nd last is not undefined behavior.
char buffer[6]=”hello”; char *prt1=buffer -1; /* undefined behavior */ char *ptr2 = buffer +5; /*Ok, pointing to the ‘\0’ inside the array */ char *ptr3 = buffer ...
767
views
answered
Sep 19, 2016
Programming in C
programming-in-c
+
–
19
votes
131
Synchronization | Self-Doubt
1. Does starvation freedom imply bounded- waiting ? 2. Does bounded- waiting imply starvation freedom ? Explain with example.
1. Does starvation freedom imply bounded- waiting ?2. Does bounded- waiting imply starvation freedom ?Explain with example.
2.1k
views
answered
Sep 19, 2016
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
+
–
18
votes
132
Andrew S. Tanenbaum Edition 5th Exercise 3 Question 15 (Page No. 253)
Suppose that a message 1001 1100 1010 0011 is transmitted using Internet Checksum (4-bit word). What is the value of the checksum?
Suppose that a message 1001 1100 1010 0011 is transmitted using Internet Checksum(4-bit word). What is the value of the checksum?
7.5k
views
answered
Sep 14, 2016
Computer Networks
computer-networks
data-link-layer
tanenbaum
error-detection
checksum
+
–
7
votes
133
Gatebook exam
Consider the following exponential search algorithm(ES). The array of n elements have to be searched is divided in to logn parts. The ith part is from index to. to search an element search all the parts one by one from left to right using binary search algorithm. What is the worst case complexity of above searching algorithm?
Consider the following exponential search algorithm(ES). The array of n elements have to be searched is divided in to logn parts. The ith part is from index to. to searc...
1.4k
views
answered
Sep 6, 2016
Programming in C
binary-search
+
–
19
votes
134
GATE Overflow | Mathematics | Test 1 | Question: 25
A 6 digit number 123ABC is exactly divisible by $5,7$ and $9$. How many such possible numbers are there ? 2 3 4 5
A 6 digit number 123ABC is exactly divisible by $5,7$ and $9$. How many such possible numbers are there ?2 3 4 5
639
views
answered
Sep 6, 2016
Combinatory
go-mathematics-1
combinatory
quantitative-aptitude
+
–
1
votes
135
Program
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"; s1 = s2; printf("%s", s1); } plz explain
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";...
503
views
answered
Aug 29, 2016
Programming in C
programming-in-c
+
–
4
votes
136
Recurrence relation in constructing balanced tree from linked list and array
Consider the following algorithm to build a balanced search tree from a sorted sequence. * Make the mid-point of the sequence the root of the tree * Recursively construct balanced search trees from elements to the left and right of the ... O(n) 2- O(n log n) 3- O(n2) 4- Depends on the contents of the original sequence
Consider the following algorithm to build a balanced search tree from a sorted sequence.* Make the mid-point of the sequence the root of the tree* Recursively construct b...
2.8k
views
answered
Aug 23, 2016
DS
data-structures
linked-list
time-complexity
+
–
4
votes
137
made easy
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 mem access. tlb hit ratio=80% and page fault ratio =20%. Average instr execution time is?
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...
1.1k
views
answered
Aug 23, 2016
6
votes
138
CUD
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 many zero address instructions are supported by system
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...
1.7k
views
answered
Aug 20, 2016
6
votes
139
Pipelining
Consider a 4 stage pipeline where the branch is resolved at the end of the second cycle for unconditional branches and at the end of the third cycle for the conditional branches. Assume that no instruction starts at first stage time the branch condition is evaluated. Let the branch ... stalls how much faster would the machine be without any branch hazards? a)0.729 b)0.459 c)0.689 d)1.45
Consider a 4 stage pipeline where the branch is resolved at the end of the second cycle for unconditional branches and at the end of the third cycle for the conditional b...
5.2k
views
answered
Aug 17, 2016
CO and Architecture
pipelining
co-and-architecture
branch-conditional-instructions
+
–
7
votes
140
#clanguage
int i; i=5; i=i++; printf("%d",i); What is output of this program?? Is it undefined behavior ?? Why??
int i; i=5; i=i++; printf("%d",i);What is output of this program??Is it undefined behavior ?? Why??
585
views
answered
Aug 15, 2016
3
votes
141
Program1
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 above
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...
1.0k
views
answered
Aug 14, 2016
Programming in C
programming-in-c
+
–
5
votes
142
series
Directions (Q. 91-95): In each of these questions a number series is given. Below the series one number is given followed by (a), (b), (c), (d), and (e). You have to complete this series following the same logic as in the original series and answer the question that follows. 91. 5 9 25 ... will come in place of (b)? 18 16 22 24 None of these 93. 7 6 10 27 104 515 9 (a) (b) (c) (d) (e)
Directions (Q. 91-95): In each of these questions a number series is given. Below the series one number is given followed by (a), (b), (c), (d), and (e). You have ...
2.6k
views
answered
Aug 12, 2016
0
votes
143
Recurrence relation
Which of the following is/are TRUE? 1. n! = $\Theta$ ((n+1)!) 2.log n base 4 =$\Theta$ (log n base 2) 3. √log n = O (log log n) A) 1 and 2 only B) 1 and 3 only C) 2 only D) 1, 2 and 3 only
Which of the following is/are TRUE?1. n! = $\Theta$ ((n+1)!)2.log n base 4 =$\Theta$ (log n base 2)3. √log n = O (log log n)A) 1 and 2 onlyB) 1 and 3 onlyC) 2 onlyD...
552
views
answered
Aug 11, 2016
Algorithms
asymptotic-notation
algorithms
+
–
4
votes
144
C programming2
What will be output int 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; }
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; }
744
views
answered
Aug 7, 2016
Programming in C
programming-in-c
+
–
1
votes
145
C basic
Consider storage class of a variable declared as static. Where the memory will be allocated? a)Code segment b)Stack segment c) Heap segment d) Data segment
Consider storage class of a variable declared as static. Where the memory will be allocated?a)Code segmentb)Stack segmentc) Heap segmentd) Data segment
270
views
answered
Aug 6, 2016
4
votes
146
Identify the language
L= {(xy)^m (yz)^m | m>=1} identify the language...
L= {(xy)^m (yz)^m | m>=1} identify the language...
829
views
answered
Aug 3, 2016
1
votes
147
asymptotic notation
if f(n) ≠ O(g(n)) then, g(n) ≠ O(f(n)) state true or false with explanation.
iff(n) ≠ O(g(n)) then, g(n) ≠ O(f(n)) state true or false with explanation.
1.1k
views
answered
Jul 28, 2016
Algorithms
asymptotic-notation
algorithms
+
–
3
votes
148
DFS
Consider the following graph G modified DFS on G is as folows: starting vertex is 'a' vertex is visited on alphabetic order vertices are visited in order a,c,d,..... it works same as DFS except the visiting order restriction Which of the following is not a back edge during above DFA traversal on G? (a) {f,b} (b) {e,a} (c){d,a} (d){c,a}
Consider the following graph G modified DFS on G is as folows:starting vertex is 'a'vertex is visited on alphabetic ordervertices are visited in order a,c,d,.....it works...
1.8k
views
answered
Jul 25, 2016
Algorithms
algorithms
graph-algorithms
+
–
10
votes
149
mtu
Suppose that host A is connected to a router R 1, R 1 is connected to another router, R 2, and R 2 is connected to host B. Suppose that a TCP message that contains 900 bytes of data and 20 bytes of TCP header is passed to the IP code at host A for ... 512 bytes, including an 8-byte frame header, and link R2-B can support a maximum frame size of 512 bytes including a 12-byte frame header.
Suppose that host A is connected to a router R 1, R 1 is connected to another router,R 2, and R 2 is connected to host B. Suppose that a TCP message that contains 900byte...
11.2k
views
answered
Jul 25, 2016
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register