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 JashanArora
2
votes
91
GATE CSE 2004 | Question: 49
A unix-style I-nodes has $10$ direct pointers and one single, one double and one triple indirect pointers. Disk block size is $1$ Kbyte, disk block address is $32$ bits, and $48$-bit integers are used. What is the maximum possible file size? $2^{24}$ bytes $2^{32}$ bytes $2^{34}$ bytes $2^{48}$ bytes
A unix-style I-nodes has $10$ direct pointers and one single, one double and one triple indirect pointers. Disk block size is $1$ Kbyte, disk block address is $32$ bits, ...
27.8k
views
answered
Jan 1, 2020
Operating System
gatecse-2004
operating-system
disk
normal
+
–
13
votes
92
GATE CSE 2004 | Question: 26
The number of different $n \times n $ symmetric matrices with each element being either 0 or 1 is: (Note: $\text{power} \left(2, X\right)$ is same as $2^X$) $\text{power} \left(2, n\right)$ $\text{power} \left(2, n^2\right)$ $\text{power} \left(2,\frac{ \left(n^2+ n \right) }{2}\right)$ $\text{power} \left(2, \frac{\left(n^2 - n\right)}{2}\right)$
The number of different $n \times n $ symmetric matrices with each element being either 0 or 1 is: (Note: $\text{power} \left(2, X\right)$ is same as $2^X$)$\text{power} ...
12.7k
views
answered
Jan 1, 2020
Linear Algebra
gatecse-2004
linear-algebra
normal
matrix
+
–
17
votes
93
GATE CSE 2004 | Question: 11
Consider the following statements with respect to user-level threads and kernel-supported threads context switch is faster with kernel-supported threads for user-level threads, a system call can block the entire process Kernel supported threads can be scheduled independently User level threads ... ) and (IV) only (II) and (III) only (I) and (III) only (I) and (II) only
Consider the following statements with respect to user-level threads and kernel-supported threadscontext switch is faster with kernel-supported threadsfor user-level thre...
27.8k
views
answered
Jan 1, 2020
Operating System
gatecse-2004
operating-system
threads
normal
+
–
6
votes
94
GATE CSE 2004 | Question: 3
A single array $A[1 \ldots \text{MAXSIZE}]$ is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables $top1$ and $top2$ $(top1 < top 2)$ point to the location of the topmost element in each of the stacks. If the space is to ... $(top1 = \text{MAXSIZE} / 2)$ or $(top2 = \text{MAXSIZE})$ $top1 = top2 - 1$
A single array $A[1 \ldots \text{MAXSIZE}]$ is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables $top1$ and $top2$ $(top1 < top...
35.8k
views
answered
Jan 1, 2020
DS
gatecse-2004
data-structures
stack
easy
+
–
17
votes
95
GATE CSE 1998 | Question: 2.20
Suppose the domain set of an attribute consists of signed four digit numbers. What is the percentage of reduction in storage space of this attribute if it is stored as an integer rather than in character form? $\text{80%}$ $\text{20%}$ $\text{60%}$ $\text{40%}$
Suppose the domain set of an attribute consists of signed four digit numbers. What is the percentage of reduction in storage space of this attribute if it is stored as an...
6.9k
views
answered
Jan 1, 2020
Digital Logic
gate1998
digital-logic
number-representation
normal
+
–
1
votes
96
GATE CSE 1998 | Question: 2.14
Let $A$ be a two dimensional array declared as follows: A: array [1 …. 10] [1 ….. 15] of integer; Assuming that each integer takes one memory location, the array is stored in row-major order and the first element of the array is stored at location $100$, what is the address of the element $A[i][j]$? $15i+j+84$ $15j+i+84$ $10i+j+89$ $10j+i+89$
Let $A$ be a two dimensional array declared as follows:A: array [1 …. 10] [1 ….. 15] of integer;Assuming that each integer takes one memory location, the array is sto...
30.0k
views
answered
Jan 1, 2020
DS
gate1998
data-structures
array
easy
+
–
5
votes
97
GATE CSE 1998 | Question: 1.5
What is the converse of the following assertion? I stay only if you go I stay if you go If I stay then you go If you do not go then I do not stay If I do not stay then you go
What is the converse of the following assertion?I stay only if you goI stay if you goIf I stay then you goIf you do not go then I do not stayIf I do not stay then you go
14.1k
views
answered
Dec 31, 2019
Mathematical Logic
gate1998
mathematical-logic
easy
propositional-logic
+
–
0
votes
98
Deadlock
A computer system has 6 tape drives with n processes competing for them. Each process may need 3 tape drives. The maximum value of n for which the system is guaranteed to be deadlock free is a) 1 b) 2 c) 3 d)4 Ans given is 2....But for 4 processes ... process...so continuing in this way we can allocate resources to each process without any deadlock...... Plz explain why answer given is b)
A computer system has 6 tape drives with n processes competing for them. Each process may need 3 tape drives. The maximum value of n for which the system is guaranteed to...
37.8k
views
answered
Dec 31, 2019
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
99
Test by Bikram | Computer Organization and Architecture | Test 2 | Question: 19
Consider the following two types of Cache Designs : Cache $1$: It is a direct-mapped cache with eight $1$ - word cache lines. The miss penalty is $8$ clock cycles. Cache $2$ : It is a two-way associative cache with ... cycles and Cache $2$ spends $60$ cycles Cache $1$ spends $56$ cycles and Cache $2$ spends $70$ cycles
Consider the following two types of Cache Designs : Cache $1$: It is a direct-mapped cache with eight $1$ – word cache lines. The miss penalty is $8$ clock cycles.Cache...
335
views
answered
Dec 31, 2019
CO and Architecture
tbb-coa-2
co-and-architecture
pipelining
+
–
0
votes
100
Test by Bikram | Computer Organization and Architecture | Test 2 | Question: 15
Consider a $2$ - way set associative cache memory with $4$ sets and total $8$ cache blocks $(0 - 7)$. Main memory has $64$ blocks $(0 - 63)$. If LRU policy is used for replacement and cache is initially empty then total number of conflict cache ... block references is: $0 \ 5 \ 9 \ 13 \ 7 \ 0 \ 15 \ 25$ $2$ $3$ $0$ $1$
Consider a $2$ – way set associative cache memory with $4$ sets and total $8$ cache blocks $(0 – 7)$. Main memory has $64$ blocks $(0 - 63)$. If LRU policy is used fo...
945
views
answered
Dec 31, 2019
CO and Architecture
tbb-coa-2
co-and-architecture
cache-memory
conflict-misses
+
–
5
votes
101
GATE CSE 2003 | Question: 62
In a permutation $a_1\ldots a_n$, of $n$ distinct integers, an inversion is a pair $(a_i, a_j)$ such that $i < j$ and $a_i > a_j.$ What would be the worst case time complexity of the Insertion Sort algorithm, if the inputs are restricted to permutations of $1. . . n$ with at most $n$ inversions? $\Theta(n^2)$ $\Theta(n\log n)$ $\Theta(n^{1.5})$ $\Theta(n)$
In a permutation $a_1\ldots a_n$, of $n$ distinct integers, an inversion is a pair $(a_i, a_j)$ such that $i < j$ and $a_i a_j.$What would be the worst case time complex...
20.0k
views
answered
Dec 30, 2019
Algorithms
gatecse-2003
algorithms
sorting
normal
insertion-sort
+
–
1
votes
102
GATE CSE 2000 | Question: 17
An array contains four occurrences of $0$, five occurrences of $1$, and three occurrences of $2$ in any order. The array is to be sorted using swap operations (elements that are swapped need to be adjacent). What is the minimum number of swaps ... ? Give an ordering of elements in the above array so that the minimum number of swaps needed to sort the array is maximum.
An array contains four occurrences of $0$, five occurrences of $1$, and three occurrences of $2$ in any order. The array is to be sorted using swap operations (elements t...
11.1k
views
answered
Dec 30, 2019
Algorithms
gatecse-2000
algorithms
sorting
normal
descriptive
+
–
0
votes
103
Test by Bikram | Algorithms | Test 2 | Question: 24
Given $n$ number of linearly ordered distinct elements, what will be the worst case time complexity to find $p$-th smallest element $(1 \leq p \leq n)$ from these $n$ elements when $n > 50$? $O(n \log n)$ $O(n^2)$ $O(n)$ $O(\log n)$
Given $n$ number of linearly ordered distinct elements, what will be the worst case time complexity to find$p$-th smallest element $(1 \leq p \leq n)$ from these $n$ elem...
757
views
answered
Dec 30, 2019
Algorithms
tbb-algorithms-2
+
–
0
votes
104
Test by Bikram | Algorithms | Test 2 | Question: 7
Which of the following statements is FALSE? Optimal binary search tree construction can be performed efficiently using dynamic programming. Breadth-first search cannot be used to find connected components of a graph. Given the prefix and ... cannot be re-constructed uniquely. Depth-first-search can be used to find the components of a graph.
Which of the following statements is FALSE?Optimal binary search tree construction can be performed efficiently using dynamic programming.Breadth-first search cannot be u...
270
views
answered
Dec 30, 2019
Algorithms
tbb-algorithms-2
+
–
1
votes
105
Test by Bikram | Algorithms | Test 2 | Question: 1
Which of the following theorems can solve all Recurrence Relations? Mater Tehorem Akra-Bazzi Theorem Both [A] and [B] Akra-Bazzi can be applied to some cases but not for all.
Which of the following theorems can solve all Recurrence Relations?Mater TehoremAkra-Bazzi TheoremBoth [A] and [B]Akra-Bazzi can be applied to some cases but not for all....
481
views
answered
Dec 30, 2019
Algorithms
tbb-algorithms-2
+
–
7
votes
106
GATE CSE 2015 Set 1 | Question: 35
What is the output of the following C code? Assume that the address of $x$ is $2000$ (in decimal) and an integer requires four bytes of memory. int main () { unsigned int x [4] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf ("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3); } $2036, 2036, 2036$ $2012, 4, 2204$ $2036, 10, 10$ $2012, 4, 6$
What is the output of the following C code? Assume that the address of $x$ is $2000$ (in decimal) and an integer requires four bytes of memory.int main () { unsigned int ...
28.4k
views
answered
Dec 28, 2019
Programming in C
gatecse-2015-set1
programming
programming-in-c
array
normal
+
–
3
votes
107
GATE IT 2005 | Question: 53
The following$ C$ function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the letters in s. int anagram (char *a, char *b) { int count [128], j; for (j = 0; j < 128; j++) count[j] = 0; j ... [j]]++ A: count [a[j++]]++ and B: count[b[j]]-- A: count [a[j]]++ and B: count[b[j++]]--
The following$ C$ function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the l...
12.3k
views
answered
Dec 28, 2019
Algorithms
gateit-2005
normal
identify-function
+
–
4
votes
108
GATE CSE 2005 | Question: 32
Consider the following C program: double foo (double); /* Line 1 */ int main() { double da, db; //input da db = foo(da); } double foo (double a) { return a; } The above code compiled without any error ... or error some compiler-warnings not leading to unintended results some compiler-warnings due to type-mismatch eventually leading to unintended results compiler errors
Consider the following C program:double foo (double); /* Line 1 */ int main() { double da, db; //input da db = foo(da); } double foo (double a) { return a; }The above cod...
16.4k
views
answered
Dec 28, 2019
Programming in C
gatecse-2005
programming
programming-in-c
compiler-design
easy
+
–
8
votes
109
GATE IT 2004 | Question: 58
Consider the following C program which is supposed to compute the transpose of a given $4 \times 4$ matrix $M$. Note that, there is an $X$ in the program which indicates some missing statements. Choose the correct option to replace $X$ in the program. #include<stdio.h> #define ROW 4 #define COL 4 ... j < 4; ++j){ M[i][j] = t; t = M[j][i]; M[j][i] = M[i][j]; }
Consider the following C program which is supposed to compute the transpose of a given $4 \times 4$ matrix $M$. Note that, there is an $X$ in the program which indicates ...
12.4k
views
answered
Dec 28, 2019
Programming in C
gateit-2004
programming
easy
programming-in-c
array
+
–
14
votes
110
GATE CSE 2000 | Question: 1.11
The following C declarations: struct node { int i: float j; }; struct node *s[10]; define s to be: An array, each element of which is a pointer to a structure of type node A structure of $2$ ... $3$ fields: an integer, a float, and an array of $10$ elements An array, each element of which is a structure of type node
The following C declarations:struct node { int i: float j; }; struct node *s[10];define s to be:An array, each element of which is a pointer to a structure of type nodeA ...
19.4k
views
answered
Dec 28, 2019
Programming in C
gatecse-2000
programming
programming-in-c
easy
structure
+
–
9
votes
111
GATE CSE 2018 | Question: 2
Consider the following C program: #include<stdio.h> struct Ournode{ char x, y, z; }; int main() { struct Ournode p={'1', '0', 'a'+2}; struct Ournode *q=&p; printf("%c, %c", *((char*)q+1), *((char*)q+2)); return 0; } The output of this program is: 0, c 0, a+2 '0', 'a+2' '0', 'c'
Consider the following C program:#include<stdio.h struct Ournode{ char x, y, z; }; int main() { struct Ournode p={'1', '0', 'a'+2}; struct Ournode *q=&p; printf("%c, %c",...
20.6k
views
answered
Dec 28, 2019
Programming in C
gatecse-2018
programming-in-c
programming
structure
normal
1-mark
+
–
4
votes
112
GATE CSE 2017 Set 2 | Question: 37
Consider the C program fragment below which is meant to divide $x$ by $y$ using repeated subtractions. The variables $x$, $y$, $q$ and $r$ are all unsigned int. while (r >= y) { r=r-y; q=q+1; } Which of the following conditions on the variables $x, y, q$ and $r$ ... $(q==0) \ \&\& \ (y>0)$
Consider the C program fragment below which is meant to divide $x$ by $y$ using repeated subtractions. The variables $x$, $y$, $q$ and $r$ are all unsigned int.while (r >...
14.4k
views
answered
Dec 27, 2019
Programming in C
gatecse-2017-set2
programming
loop-invariants
+
–
1
votes
113
Test by Bikram | Programming | Test 2 | Question: 8
What is the output of this program? #include <stdio.h> int main() { char *ptr; char string[] = "How are you?"; ptr = string; ptr += 4; printf("%s",ptr); return 0; } How are you? are you? are error in program
What is the output of this program?#include <stdio.h int main() { char *ptr; char string[] = "How are you?"; ptr = string; ptr += 4; printf("%s",ptr); return 0; }How are ...
468
views
answered
Dec 27, 2019
Programming in C
tbb-programming-2
+
–
0
votes
114
Test by Bikram | Operating Systems | Test 2 | Question: 24
Suppose the page table for the process currently executing looks like the following. All numbers are decimal, everything is numbered starting from zero, and all addresses are memory byte addresses. The page size is $1024$ ... --- , $379$ $7196$, --------- , $5120$ -------, $2221$, --------
Suppose the page table for the process currently executing looks like the following.All numbers are decimal, everything is numbered starting from zero, and all addresses ...
1.3k
views
answered
Dec 27, 2019
Operating System
tbb-os-2
+
–
0
votes
115
Test by Bikram | Operating Systems | Test 2 | Question: 29
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns. The average time required to access a page is ________ ns
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns.The ...
1.2k
views
answered
Dec 27, 2019
Operating System
tbb-os-2
numerical-answers
+
–
0
votes
116
Test by Bikram | Operating Systems | Test 2 | Question: 16
Which of the following statements are not true? All unsafe states are deadlocks A deadlock state is unsafe state A system is in safe state only if there exists a safe sequence A state is said to be safe if the system can allocate resources to few processes even if ... ; $4$ only $1$ & $4$ only $2$ & $3$ only $1$, $3$ & $4$ only
Which of the following statements are not true?All unsafe states are deadlocksA deadlock state is unsafe stateA system is in safe state only if there exists a safe sequen...
610
views
answered
Dec 27, 2019
Operating System
tbb-os-2
+
–
1
votes
117
Test by Bikram | Operating Systems | Test 2 | Question: 14
Consider the $2$ - process solution to the Critical Section problem (here i refers to the current process and j is the other process ) Process Pi repeat flag[i] = true; while ( flag[j] ) do ... and Bounded waiting are satisfied Only mutual exclusion is satisfied Mutual exclusion is violated Mutual exclusion and progress requirements are met
Consider the $2$ – process solution to the Critical Section problem (here i refers to the current process and j is the other process )Process Pirepeat flag[i] = true; w...
957
views
answered
Dec 27, 2019
Operating System
tbb-os-2
+
–
0
votes
118
Test by Bikram | Operating Systems | Test 2 | Question: 9
Assume that pages are $128$ words in size. Consider below code snippet whose function is to initialize to $0$ each element of a $128$ - by - $128$ array. Then number of page faults generated by the following Code snippet is: Assume the array is stored row major ... j++) for( int i=0; i<128; i++) A[i][j] = 0; $128$ $16384$ $0$ $16378$
Assume that pages are $128$ words in size. Consider below code snippet whose function is to initialize to $0$ each element of a $128$ – by – $128$ array. Then number ...
734
views
answered
Dec 27, 2019
Operating System
tbb-os-2
+
–
0
votes
119
Test by Bikram | Operating Systems | Test 2 | Question: 5
Let us initialize counting semaphore $X$ to $5$. Assume that processes $P_i$ where $i= 1$ to $15$ are coded as follows. while (1) { P (x); { critical section } V (x); } and suppose that $P_{16}$ is coded as follows: ... { critical section } P (x); } The number of processes can be in the critical section at most at any point of time is ______
Let us initialize counting semaphore $X$ to $5$. Assume that processes $P_i$ where $i= 1$ to $15$ are coded as follows.while (1) { P (x); { critical section } V (x); }an...
786
views
answered
Dec 27, 2019
Operating System
tbb-os-2
numerical-answers
process-synchronization
+
–
0
votes
120
Test by Bikram | Operating Systems | Test 2 | Question: 4
Consider a situation, in which several people are executing copies of a mail program. Which of the following statements is/are not correct: All the users share one program counter and stack for mail program. All the users share the ... the users share same text section, but data section varies necessarily. I and II only I only II only III
Consider a situation, in which several people are executing copies of a mail program. Which of the following statements is/are not correct:All the users share one program...
1.1k
views
answered
Dec 27, 2019
Operating System
tbb-os-2
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
16
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register