Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
ankit3009
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Answers by ankit3009
2
votes
1
BCD Correction | Made Easy Test Series
why is C incorrect? addition of any two nibbles such as 1000 1000 --------- 0000 Will generate a final carry as 1 0000, which will require the addition of 0110 as 1 0110 to make it correct.
why is C incorrect?addition of any two nibbles such as10001000 -0000Will generate a final carry as 1 0000, which will require the addition of 0110 as 1 0110 to make it...
764
views
answered
Jan 31, 2022
Digital Logic
bcd
digital-logic
made-easy-test-series
+
–
2
votes
2
ACE Test Series:C-program
What should be the ans. Isn’t the Function initialization should be outside main function? They are given inside main. If declaration would be outside main then ans should be C else i don’t think options are correct here. Anyone ?
What should be the ans. Isn’t the Function initialization should be outside main function? They are given inside main. If declaration would be outside main then ans sho...
695
views
answered
Dec 23, 2021
Programming in C
programming-in-c
ace-test-series
output
programming
+
–
2
votes
3
Made Easy Test
How to approach such questions ?
How to approach such questions ?
325
views
answered
Dec 21, 2021
Compiler Design
compiler-design
code-optimization
made-easy-test-series
+
–
1
votes
4
test series doubt
hi, C an anyone answer this question? @arjun sir, According to me there is no mutual exclusion and hence deadlock is not created.
hi,Can anyone answer this question? @arjun sir, According to me there is no mutual exclusion and hence deadlock is not created.
397
views
answered
Dec 21, 2021
Operating System
made-easy-test-series
operating-system
deadlock-prevention-avoidance-detection
+
–
1
votes
5
Testbook Test Series
310
views
answered
Dec 14, 2021
DS
testbook-test-series
+
–
1
votes
6
Testbook Test Series
169
views
answered
Dec 14, 2021
CO and Architecture
testbook-test-series
+
–
2
votes
7
GATE CSE 1992 | Question: 02-xi
A computer system has $6$ tape devices, 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: $2$ $3$ $4$ $1$
A computer system has $6$ tape devices, with n processes competing for them. Each process may need $3$ tape drives. The maximum value of n for which the system is guarant...
5.4k
views
answered
Dec 12, 2021
Operating System
gate1992
operating-system
resource-allocation
normal
multiple-selects
+
–
1
votes
8
multilevel paging technique
A virtual memory system is able to support virtual address space of 256 GB. An entry in the page table is 4 bytes long. (i) Calculate the minimum page size required for a three-level paging scheme. (ii) Draw a diagram indicating how the bits of a ... (and how many) are used to index the page tables at each level, and which bits form the page offset for the case above.
A virtual memory system is able to support virtual address space of 256 GB. An entryin the page table is 4 bytes long.(i) Calculate the minimum page size required for a t...
7.7k
views
answered
Dec 11, 2021
CO and Architecture
co-and-architecture
+
–
1
votes
9
Andrew S. Tanenbaum (OS) Edition 4 Exercise 3 Question 19 (Page No. 256)
A computer with a $32-bit$ address uses a two-level page table. Virtual addresses are split into a $9-bit$ top-level page table field, an $11-bit$ second-level page table field, and an offset. How large are the pages and how many are there in the address space?
A computer with a $32-bit$ address uses a two-level page table. Virtual addresses are split into a $9-bit$ top-level page table field, an $11-bit$ second-level page table...
2.6k
views
answered
Dec 11, 2021
Operating System
tanenbaum
operating-system
memory-management
multilevel-paging
paging
descriptive
+
–
0
votes
10
the processes P1, P2, and P3. The S1, S2 and S3 are counting semaphore variables
Consider the following synchronization construct used by the processes P1, P2, and P3. The S1, S2 and S3 are counting semaphore variables: S1 = 3, S2 = 2, S3 = 1; P(S1); P(S2); P(S3); Critical Section V(S3); V(S2); V(S1); Does it satisfy mutual exclusion, progress and bounded waiting?
Consider the following synchronization construct used by the processes P1, P2, and P3. The S1, S2 and S3 are counting semaphore variables:S1 = 3, S2 = 2, S3 = 1;P(S1);P(S...
4.8k
views
answered
Dec 8, 2021
Operating System
made-easy-test-series
semaphore
operating-system
+
–
0
votes
11
IITB Practice Set: 35
Consider the $C++$ code fragment below. int A = ____________; bool x = (A/100 >= 8) && !(A%10 > 4) && (A%5 == 1); (a) ______ is the $\textbf{maximum three digit (in decimal notation)}$ value of $A$ such that $x$ evaluates to true.
Consider the $C++$ code fragment below.int A = ____________; bool x = (A/100 >= 8) && !(A%10 4) && (A%5 == 1);(a) ______ is the $\textbf{maximum three digit (in decimal ...
202
views
answered
Dec 1, 2021
Others
iitb-practice-set
+
–
0
votes
12
GATE IT 2007 | Question: 47
Consider the following DFA in which $S_0$ is the start state and $S_1$, $S_3$ are the final states. What language does this $\textsf{DFA}$ recognize? All strings of $x$ and $y$ All strings of $x$ and $y$ which have either even number of $x$ and even number of ... $x$ and $y$ with either even number of $x$ and odd number of $y$ or odd number of $x$ and even number of $y$
Consider the following DFA in which $S_0$ is the start state and $S_1$, $S_3$ are the final states.What language does this $\textsf{DFA}$ recognize?All strings of $x$ and...
6.4k
views
answered
Nov 17, 2021
Theory of Computation
gateit-2007
theory-of-computation
finite-automata
normal
+
–
0
votes
13
GATE IT 2006 | Question: 37
For a state machine with the following state diagram the expression for the next state $S^+$ in terms of the current state $S$ and the input variables $x$ and $y$ is $S^+ = S' . y' + S . x$ $S^+ = S. x . y' + S' . y . x'$ $S^+ = x . y'$ $S^+ = S' . y + S . x'$
For a state machine with the following state diagram the expression for the next state $S^+$ in terms of the current state $S$ and the input variables $x$ and $y$ is$S^+ ...
8.3k
views
answered
Nov 17, 2021
Theory of Computation
gateit-2006
theory-of-computation
finite-automata
normal
+
–
2
votes
14
GATE IT 2004 | Question: 41
Let $M=(K, Σ, \sigma, s, F)$ be a finite state automaton, where $K = \{A, B\}, Σ = \{a, b\}, s = A, F = \{B\},$ $\sigma(A, a) = A, \sigma(A, b) = B, \sigma(B, a) = B \text{ and} \ \sigma(B, b) = A$ A grammar to generate the language accepted by $M$ can be ... $\{A → bB, A → aB, B → aA, B → bA, B → \epsilon)$ $\{A → aA, A → bA, B → aB, B → bA, A → \epsilon)$
Let $M=(K, Σ, \sigma, s, F)$ be a finite state automaton, where$K = \{A, B\}, Σ = \{a, b\}, s = A, F = \{B\},$$\sigma(A, a) = A, \sigma(A, b) = B, \sigma(B, a) = B \tex...
6.8k
views
answered
Nov 17, 2021
Theory of Computation
gateit-2004
theory-of-computation
finite-automata
normal
+
–
0
votes
15
GATE CSE 2021 Set 2 | Question: 17
Consider the following deterministic finite automaton $\text{(DFA)}$ The number of strings of length $8$ accepted by the above automaton is ___________
Consider the following deterministic finite automaton $\text{(DFA)}$The number of strings of length $8$ accepted by the above automaton is ___________
9.3k
views
answered
Nov 17, 2021
Theory of Computation
gatecse-2021-set2
numerical-answers
theory-of-computation
finite-automata
1-mark
+
–
0
votes
16
GATE CSE 2012 | Question: 46
Consider the set of strings on $\{0,1\}$ in which, every substring of $3$ symbols has at most two zeros. For example, $001110$ and $011001$ are in the language, but $100010$ is not. All strings of length less than $3$ are also in the language. A partially ...
Consider the set of strings on $\{0,1\}$ in which, every substring of $3$ symbols has at most two zeros. For example, $001110$ and $011001$ are in the language, but $1000...
14.2k
views
answered
Nov 17, 2021
Theory of Computation
gatecse-2012
theory-of-computation
finite-automata
normal
+
–
0
votes
17
GATE CSE 2009 | Question: 27
Given the following state table of an FSM with two states $A$ and $B$ ... length of an input string which will take the machine to the state $A=0,B=1$ with $output=1$. $3$ $4$ $5$ $6$
Given the following state table of an FSM with two states $A$ and $B$,one input and one output.$$\small\begin{array}{|c|c|c|c|c|c|}\hline \textbf{PRESENT} & \textbf{PRESE...
12.6k
views
answered
Nov 17, 2021
Theory of Computation
gatecse-2009
theory-of-computation
finite-automata
normal
+
–
1
votes
18
GATE CSE 2003 | Question: 18
In a bottom-up evaluation of a syntax directed definition, inherited attributes can always be evaluated be evaluated only if the definition is L-attributed be evaluated only if the definition has synthesized attributes never be evaluated
In a bottom-up evaluation of a syntax directed definition, inherited attributes canalways be evaluatedbe evaluated only if the definition is L-attributedbe evaluated only...
36.5k
views
answered
Nov 13, 2021
Compiler Design
gatecse-2003
compiler-design
syntax-directed-translation
normal
+
–
0
votes
19
Self doubt
int main() { float f=0.7; if(f==0.7) printf("equal"); else printf("not equal"); return 0; } what will be the o/p and why? plz explain
int main(){ float f=0.7; if(f==0.7) printf("equal"); else printf("not equal"); return 0;} ...
482
views
answered
Nov 9, 2021
0
votes
20
GATE CSE 2017 Set 2 | Question: 32
Consider the following expression grammar $G$: $E \rightarrow E-T \mid T$ $T \rightarrow T + F \mid F$ $F \rightarrow (E) \mid id$ Which of the following grammars is not left recursive, but is equivalent to $G$? $E \rightarrow E-T \mid T$ ... $E \rightarrow TX \mid (TX)$ $X \rightarrow -TX \mid +TX \mid \epsilon$ $T \rightarrow id$
Consider the following expression grammar $G$:$E \rightarrow E-T \mid T$$T \rightarrow T + F \mid F$$F \rightarrow (E) \mid id$Which of the following grammars is not left...
10.9k
views
answered
Nov 5, 2021
Compiler Design
gatecse-2017-set2
grammar
+
–
0
votes
21
GATE CSE 2016 Set 2 | Question: 45
Which one of the following grammars is free from left recursion? $S \rightarrow AB$ $A \rightarrow Aa \mid b$ $B \rightarrow c$ $S \rightarrow Ab \mid Bb \mid c$ $A \rightarrow Bd \mid \epsilon$ $B \rightarrow e$ $S \rightarrow Aa \mid B$ ... $ B \rightarrow d$ $S \rightarrow Aa \mid Bb \mid c$ $A \rightarrow Bd \mid \epsilon$ $B \rightarrow Ae \mid \epsilon$
Which one of the following grammars is free from left recursion?$S \rightarrow AB$$A \rightarrow Aa \mid b$$B \rightarrow c$$S \rightarrow Ab \mid Bb \mid c$$A \rightarro...
9.5k
views
answered
Nov 5, 2021
Compiler Design
gatecse-2016-set2
compiler-design
grammar
easy
+
–
1
votes
22
GATE CSE 2007 | Question: 79
Consider the CFG with $\left\{S, A, B\right\}$ as the non-terminal alphabet, $\{a, b\}$ as the terminal alphabet, $S$ as the start symbol and the following set of production rules: $S \rightarrow aB$ $S \rightarrow bA$ $B \rightarrow b$ ... $B \rightarrow aBB$ $S \rightarrow bAA$ For the string $aabbab$, how many derivation trees are there? $1$ $2$ $3$ $4$
Consider the CFG with $\left\{S, A, B\right\}$ as the non-terminal alphabet, $\{a, b\}$ as the terminal alphabet, $S$ as the start symbol and the following set of product...
8.3k
views
answered
Nov 4, 2021
Compiler Design
gatecse-2007
compiler-design
grammar
normal
+
–
0
votes
23
Tree Traversal
6.5k
views
answered
Feb 4, 2021
Programming in C
data-structures
binary-tree
+
–
0
votes
24
Ace Page# 09, Q# 04
What does the double arrow in options 2 & 4 mean ?
What does the double arrow in options 2 & 4 mean ?
979
views
answered
Jan 17, 2021
Databases
database-normalization
+
–
1
votes
25
GATE CSE 1999 | Question: 1.5
Context-free languages are closed under: Union, intersection Union, Kleene closure Intersection, complement Complement, Kleene closure
Context-free languages are closed under:Union, intersectionUnion, Kleene closureIntersection, complementComplement, Kleene closure
7.4k
views
answered
Jan 13, 2021
Theory of Computation
gate1999
theory-of-computation
context-free-language
easy
+
–
0
votes
26
GATE CSE 1996 | Question: 2.9
Define a context free languages $L \in \{0, 1\}^*$, $\text{init} (L) = \{u \mid uv \in L$ for some $v$ in $\{0, 1\}^*\}$ ( in other words, $\text{init}(L)$ is the set of prefixes of $L$ ... string the set of all binary strings with exactly one more $0$ than the number of $1$'s or one more $1$ than the number of $0$'s None of the above
Define a context free languages $L \in \{0, 1\}^*$, $\text{init} (L) = \{u \mid uv \in L$ for some $v$ in $\{0, 1\}^*\}$ ( in other words, $\text{init}(L)$ is the set of...
10.1k
views
answered
Jan 13, 2021
Theory of Computation
gate1996
theory-of-computation
context-free-language
normal
+
–
0
votes
27
GATE CSE 1995 | Question: 2.20
Which of the following definitions below generate the same language as $L$, where $L=\{x^ny^n \text{ such that } n\geq 1 \}$? $E \rightarrow xEy\mid xy$ $x y \mid (x^+xyy^+$) $x^+y^+$ I only I and II II and III II only
Which of the following definitions below generate the same language as $L$, where $L=\{x^ny^n \text{ such that } n\geq 1 \}$?$E \rightarrow xEy\mid xy$$x y \mid (x^+xyy^+...
10.4k
views
answered
Jan 13, 2021
Theory of Computation
gate1995
theory-of-computation
easy
context-free-language
+
–
0
votes
28
GATE CSE 1995 | Question: 12
Consider the following sequence of numbers:$92, 37, 52, 12, 11, 25$ Use Bubble sort to arrange the sequence in ascending order. Give the sequence at the end of each of the first five passes.
Consider the following sequence of numbers:$$92, 37, 52, 12, 11, 25$$ Use Bubble sort to arrange the sequence in ascending order. Give the sequence at the end of each of ...
8.5k
views
answered
Jan 8, 2021
Algorithms
gate1995
algorithms
sorting
easy
descriptive
+
–
0
votes
29
GATE CSE 1995 | Question: 1.16
For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of $O(m)$ $O(n)$ $O(m+n)$ $O(\log m + \log n)$
For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of$O(m)$$O(n)$$O(m+n)$$O(\log m + \log n)$
47.6k
views
answered
Jan 8, 2021
Algorithms
gate1995
algorithms
sorting
normal
+
–
0
votes
30
GATE CSE 1994 | Question: 1.19, ISRO2016-31
Algorithm design technique used in quicksort algorithm is? Dynamic programming Backtracking Divide and conquer Greedy method
Algorithm design technique used in quicksort algorithm is?Dynamic programmingBacktrackingDivide and conquerGreedy method
18.3k
views
answered
Jan 8, 2021
Algorithms
gate1994
algorithms
algorithm-design-technique
quick-sort
easy
isro2016
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register