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
Questions by just_bhavana
3
votes
1
answer
1
Programming
#include<stdio.h> int main() { char arr[5][7][6]; char *p[5][7][6]; printf("%d\t", (unsigned)(arr+1)-(unsigned)arr); printf("%d", (unsigned)(p+1)-(unsigned)p); } Please enlighten about the 2nd printf statement. Also what is the difference between the two statements?
#include<stdio.h int main() { char arr[5][7][6]; char *p[5][7][6]; printf("%d\t", (unsigned)(arr+1)-(unsigned)arr); printf("%d", (unsigned)(p+1)-(unsigned)p); }Please enl...
1.5k
views
asked
Jan 18, 2018
Programming in C
non-gate
+
–
1
votes
1
answer
2
Turing machine
If L is accepted by TM, which halts on every string over alphabet {a, b}, then L′ is recursive language. True or False ? I think false because L′ = TM halts on no string in {a,b} = $\phi$ and L(TM) = $\phi$ is non RE, let alone it being recursive
If L is accepted by TM, which halts on every string over alphabet {a, b}, then L′ is recursive language.True or False ?I think false because L′ = TM halts on no strin...
795
views
asked
Jan 1, 2018
Theory of Computation
theory-of-computation
recursive-and-recursively-enumerable-languages
+
–
1
votes
1
answer
3
CPU bound and IO bound process
2.8k
views
asked
Dec 16, 2017
Operating System
process-scheduling
operating-system
+
–
2
votes
1
answer
4
LR Parsers
Which of the following is true with respect to LR parsers? S1 : LR(1) requires less space for its parsing table S2 : LALR(1) requires less space for its parsing table S3 : SLR(1) requires more space for its parsing table Answer given : S1 - false, S2 - true, ... SLR(1) and LALR(1) have equal number of states in their parsing tables. Then how will LALR(1) require less space than SLR(1) ?
Which of the following is true with respect to LR parsers?S1 : LR(1) requires less space for its parsing tableS2 : LALR(1) requires less space for its parsing tableS3 : S...
2.0k
views
asked
Dec 2, 2017
Compiler Design
compiler-design
lr-parser
+
–
0
votes
0
answers
5
Probability
In an area, it rains once in every three days. The local evening newspaper attempts to predict whether it rains or not in the following day. Three quarters of rainy days and three fifths of dry days are correctly predicted by the previous evening’s paper. Given that this evening’s paper predicts rain, what is the probability that it will actually rain tomorrow?
In an area, it rains once in every three days. The local evening newspaper attempts to predict whether it rains or not in the following day. Three quarters of rainy days ...
1.2k
views
asked
Nov 18, 2017
Probability
engineering-mathematics
probability
+
–
0
votes
0
answers
6
SQL Query - Raghuramakrishnan
Write a SQL Query for : Find those ratings for which the average age of sailors is the minimum over all ratings. Query 1: SELECT Temp.rating, Temp.avgage FROM (SELECT S.rating, AVG(S.age) AS avgage, FROM Sailors S GROUP BY S.rating) AS Temp WHERE ... avgage, FROM Sailors S GROUP BY S.rating) as Temp GROUP BY Temp.rating Are Query 1 and Query 2 equivalent ? Do comment.
Write a SQL Query for : Find those ratings for which the average age of sailors is the minimum over all ratings.Query 1: SELECT Temp.rating, Temp.avgage FROM (SELECT S.ra...
1.5k
views
asked
Nov 10, 2017
Databases
databases
sql
+
–
0
votes
1
answer
7
Programming in C
#include<stdio.h> void test(int); void test1(int *); int main() { int x = 30, *s = &x; test(x++); //test(30++) ...statement P test1(s++); //test(some address++) ...statement S return 0; } void test(int x){ printf("%d\n" ... *s){ printf("%d\n",*s); } My doubt is why are we not getting L-value error in both the cases? The program correctly outputs 30 31
#include<stdio.h>void test(int);void test1(int *);int main() { int x = 30, *s = &x; test(x++); //test(30++) ...statement P te...
573
views
asked
Nov 10, 2017
Programming in C
programming-in-c
l-value
+
–
1
votes
0
answers
8
Addressing modes
Computer uses addressing modes to reduce number of bits in the addressing field of instruction. Justify this statement and give relevant reasons.
Computer uses addressing modes to reduce number of bits in the addressing field of instruction.Justify this statement and give relevant reasons.
321
views
asked
Nov 7, 2017
CO and Architecture
co-and-architecture
addressing-modes
+
–
2
votes
1
answer
9
Combinatorics
Somebody prove this identity : $\frac{\binom{n-1}{0}}{1} + \frac{\binom{n-1}{1}}{2} + \frac{\binom{n-1}{2}}{3} + .... + \frac{\binom{n-1}{n-1}}{n} = \frac{2^{n}-1}{n}$
Somebody prove this identity :$\frac{\binom{n-1}{0}}{1} + \frac{\binom{n-1}{1}}{2} + \frac{\binom{n-1}{2}}{3} + .... + \frac{\binom{n-1}{n-1}}{n} = \frac{2^{n}-1}{n}$
387
views
asked
Nov 2, 2017
1
votes
0
answers
10
Minimized DFA
What is the number of states in a minimal DFA accepting the language which contains all strings that either begin or end (or both) with 01 ? Assume alphabet set as {0,1} I got the answer but it was time consuming. Any hack on drawing its intuitive NFA ? as then conversion would be easier from NFA to DFA.
What is the number of states in a minimal DFA accepting the language which contains all strings that either begin or end (or both) with 01 ? Assume alphabet set as {0,1}...
496
views
asked
Oct 31, 2017
Theory of Computation
theory-of-computation
minimal-state-automata
+
–
1
votes
0
answers
11
Prim's algorithm for MST
Assuming that the graph can contain repeated edge weights, we have a single tree at any instance when applying Prim's algorithm. Justify this statement.
Assuming that the graph can contain repeated edge weights, we have a single tree at any instance when applying Prim's algorithm.Justify this statement.
845
views
asked
Oct 30, 2017
Algorithms
prims-algorithm
algorithms
+
–
0
votes
0
answers
12
Chromatic polynomials
Check which of the following can be chromatic polynomials of a non-null graph ? i) x5 - 4x3 - 2x2 + x + 4 ii) x6 - 3x5 + 2x4 - 1 P.S I know for a non-null graph G, X(G) (i.e. chromatic number) is at least 2. How to proceed further ??
Check which of the following can be chromatic polynomials of a non-null graph ?i) x5 - 4x3 - 2x2 + x + 4ii) x6 - 3x5 + 2x4 - 1P.S I know for a non-null graph G, X(G) (i.e...
1.5k
views
asked
Oct 24, 2017
Mathematical Logic
graph-theory
graph-coloring
+
–
2
votes
0
answers
13
P and C
Right triangle PQR is to be constructed in the xy-plane so that the right angle is at P and line PR is parallel to the x-axis. The x and y coordinates of P, Q and R are to be integers that satisfy the inequalities :– $-4\leq x \leq 5$ and $6\leq y \leq 16$ . How many different triangles could be constructed with these properties ? (a) 110 (b) 1,100 (c) 9,900 (d) 10,000
Right triangle PQR is to be constructed in the xy-plane so that the right angle is at Pand line PR is parallel to the x-axis. The x and y coordinates of P, Q and R are to...
473
views
asked
Oct 22, 2017
Mathematical Logic
counting
+
–
3
votes
1
answer
14
Counting
Suppose that a person with 10 friends invites a different subset of 3 friends to dinner every night for 10 days. In how many ways can he do this so that all friends are included at least once ? How to approach this problem ?
Suppose that a person with 10 friends invites a different subset of 3 friends to dinner every night for 10 days. In how many ways can he do this so that all friends are i...
322
views
asked
Oct 18, 2017
Combinatory
combinatory
+
–
3
votes
1
answer
15
hamming distance
To provide more reliability than the Single Parity Bit technique, a new error-detecting scheme has been proposed. The scheme uses first parity bit for checking all the odd numbered bits and a second parity bit for all the even numbered bits. What is the (minimum) Hamming distance of this code ?
To provide more reliability than the Single Parity Bit technique, a new error-detecting scheme has been proposed. The scheme uses first parity bit for checking all the od...
5.1k
views
asked
Oct 17, 2017
Computer Networks
hamming-code
error-detection
+
–
4
votes
3
answers
16
Virtual Gate Test Series: CO & Architecture - Control Memory
In a $2$ level control unit design there exists $1K$ word micro control memory and a $32$ word nano control memory. If it is desired to provide $24$ control signals, what is the $\%the $ of reduction in ... control memory using nano programming with respect to the $1$ level control memory design? Explain what is nano programming$?$
In a $2$ level control unit design there exists $1K$ word micro control memory and a $32$ word nano control memory. If it is desired to provide $24$ control signals, what...
792
views
asked
Oct 10, 2017
CO and Architecture
co-and-architecture
microprogramming
virtual-gate-test-series
+
–
5
votes
1
answer
17
I-cache and D-cache
Given that L1 instruction and L1 data cache are connected to CPU directly, (doubt: does it mean they're independent?) Each instruction fetch means a reference to the instruction cache and 35% of all instructions reference data memory. The ... 35% of all instructions reference data memory, so should we consider 65% of all instructions reference instruction memory or not ?
Given that L1 instruction and L1 data cache are connected to CPU directly,(doubt: does it mean they're independent?)Each instruction fetch means a reference to the instru...
2.1k
views
asked
Oct 10, 2017
CO and Architecture
co-and-architecture
cache-memory
+
–
2
votes
1
answer
18
Functionally complete sets
Which of the following set is not functionally complete? a) {XOR,1,NOT} b) {XOR,1,OR} c) {OR, NOT} d) {XOR,1, AND}
Which of the following set is not functionally complete?a) {XOR,1,NOT}b) {XOR,1,OR}c) {OR, NOT}d) {XOR,1, AND}
4.5k
views
asked
Oct 4, 2017
Digital Logic
digital-logic
functional-completeness
+
–
5
votes
1
answer
19
Probability
A train and a bus arrive at random between 9 am and 10 am. The train stops for 10 minutes whereas the bus stops for 'x' minutes. Find 'x' such that the probability that the bus and train meet is 0.5. How to approach such type of questions ?
A train and a bus arrive at random between 9 am and 10 am. The train stops for 10 minutes whereas the bus stops for 'x' minutes. Find 'x' such that the probability that t...
2.3k
views
asked
Sep 27, 2017
Probability
engineering-mathematics
probability
+
–
0
votes
1
answer
20
Semaphores
s = 0 initially A : down(s) B : down(s) CS CS up(s) up(s) C : down(s) D : up(s) CS CS up(s) down(s) E : up(s) F : up(s) CS CS down(s) down(s) What is the maximum value of s? Doubt : I think max value of s should be 1 as P and V are atomic operations. Also nowhere the value of s is stored in memory here. But the answer given is 3. What concept am I missing?
s = 0 initiallyA : down(s) B : down(s) CS CS up(s) up(s)C : down(s) D : up(s) CS...
292
views
asked
Sep 27, 2017
Operating System
operating-system
semaphore
+
–
Page:
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register