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 ManojK
8
votes
1
answer
1
float vs double
Program 1: #include<stdio.h> int main() { float x = 0.1; if (x == 0.1) printf("IF"); else if (x == 0.1f) printf("ELSE IF"); else printf("ELSE"); } The output of above program is ELSE IF . Program ... getting these weird output and is there any way to predict these outputs on the same processor. Also how comparison is done of two variables in C ?
Program 1:#include<stdio.h int main() { float x = 0.1; if (x == 0.1) printf("IF"); else if (x == 0.1f) printf("ELSE IF"); else printf("ELSE"); }The output of above progra...
5.6k
views
asked
Mar 10, 2017
Programming in C
programming-in-c
ieee-representation
undefined-behaviour
+
–
0
votes
1
answer
2
epsilon nfa
(a)I and II only (b) II and Ill only (c)I, II and III only (d)None of the above
(a)I and II only (b) II and Ill only (c)I, II and III only (d)None of the above
550
views
asked
Feb 4, 2017
Theory of Computation
theory-of-computation
+
–
2
votes
2
answers
3
Memory management
(a) P3, Ps, P3, P2 (b)P2, P5, P3, 426k waits (c)P3, Ps, P2, 426k waits (d)P4, P2, P5, P3
(a) P3, Ps, P3, P2 (b)P2, P5, P3, 426k waits (c)P3, Ps, P2, 426k waits (d)P4, P2, P5, P3
651
views
asked
Feb 4, 2017
Operating System
memory-management
+
–
1
votes
0
answers
4
VirtualGATE2017-1
479
views
asked
Jan 18, 2017
2
votes
4
answers
5
Virtual Gate Test Series: Compiler Design - Stack Allocation
Consider the following two statements$:$ $S_{1}:$ Activation records can have a permanent lifetime in case of static allocation. $S_{2}:$ Activation records can have nested lifetime in case of stack allocation. Which of the option is correct regarding $S_{1}$ and $S_{2}$ respectively True, True True, False False, True False, False
Consider the following two statements$:$ $S_{1}:$ Activation records can have a permanent lifetime in case of static allocation.$S_{2}:$ Activation records can have neste...
1.5k
views
asked
Jan 9, 2017
Compiler Design
compiler-design
runtime-environment
activation-record
virtual-gate-test-series
+
–
0
votes
2
answers
6
Virtual Gate Test Series: Compiler Design - Triples
Which of the following is an advantage of $\text{'Triples'}$ Statements can be moved around Wastage of too much space Space is not wasted Two memory access per operation
Which of the following is an advantage of $\text{'Triples'}$Statements can be moved aroundWastage of too much spaceSpace is not wastedTwo memory access per operation
983
views
asked
Jan 9, 2017
Compiler Design
compiler-design
intermediate-code
virtual-gate-test-series
+
–
2
votes
1
answer
7
Continuity
What should be the value of a,b and c such that the function defined below is continuous at x=0 ? $f\left ( x \right )=\begin{Bmatrix} \left ( 1+ax \right )^{\frac{1}{x}} & x<0 & \\ b & x=0& \\ \frac{(x+c)^{\frac{1}{3}}-1}{x} &x>0 & \end{Bmatrix}$
What should be the value of a,b and c such that the function defined below is continuous at x=0 ? $f\left ( x \right )=\begi...
1.0k
views
asked
Dec 19, 2016
Calculus
calculus
engineering-mathematics
continuity
+
–
4
votes
2
answers
8
Structure in C
#include <stdio.h> struct Point { int x; int y; }; int main() { struct Point p1 = {10, 20}; struct Point p2 = p1; if (p1 == p2) { printf("p1 and p2 are same "); } getchar(); return 0; } What is the output for the above program ? Explain ?
#include <stdio.h struct Point { int x; int y; }; int main() { struct Point p1 = {10, 20}; struct Point p2 = p1; if (p1 == p2) { printf("p1 and p2 are same "); } getchar(...
699
views
asked
Nov 2, 2016
0
votes
1
answer
9
Decidability and reducibility
Consider the language given below $L=\left \{ \left \langle M \right \rangle |M\ is\ TM \ and \ |L(M)|\ is\ prime\right \}$ is it deciable or not ? Explain with fact ?
Consider the language given below$L=\left \{ \left \langle M \right \rangle |M\ is\ TM \ and \ |L(M)|\ is\ prime\right \}$ is it deciable or not ? Explain with fact ?
488
views
asked
Oct 31, 2016
0
votes
1
answer
10
Application of DFS
For an unweighted graph, DFS traversal of the graph produces the minimum spanning tree and all pair shortest path tree Is the above statement is valid ? My doubt is what will be minimum cost spanning for unweighted graph? Every spanning tree is an MST ... how we will find all pair shortest path ?Expain pls? Source:http://www.geeksforgeeks.org/applications-of-depth-first-search/
For an unweighted graph, DFS traversal of the graph produces the minimum spanning tree and all pair shortest path treeIs the above statement is valid ?My doubt is what wi...
3.1k
views
asked
Oct 18, 2016
11
votes
2
answers
11
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
asked
Sep 20, 2016
Compiler Design
compiler-design
viable-prefix
parsing
+
–
1
votes
1
answer
12
Function in C
All functions have file scope. Thus, you cannot define a function within a function. This is why C is not technically a block-structured language.Explain pls ?
All functions have file scope. Thus, you cannot define a function within a function. This is why C is not technically a block-structured language.Explain pls ?
781
views
asked
Sep 9, 2016
Programming in C
programming-in-c
+
–
0
votes
0
answers
13
External variable
By default external variables and functions have the property that all references to them by the same name, even from functions compiled separately, are references to same thing .Explain this ?
By default external variables and functions have the property that all references to them by the same name, even from functions compiled separately, are references to sam...
248
views
asked
Aug 31, 2016
Programming in C
programming-in-c
+
–
1
votes
3
answers
14
Algorithm
In an integer array, there is 1 to 100 number, out of one is duplicate, how to find?Write an efficient algorithm and also determine complexity ?
In an integer array, there is 1 to 100 number, out of one is duplicate, how to find?Write an efficient algorithm and also determine complexity ?
1.4k
views
asked
Aug 25, 2016
Algorithms
algorithms
time-complexity
+
–
4
votes
1
answer
15
Programming
Consider the following program below #include<stdio.h> int *call(); int main(){ int *ptr; ptr=call(); printf("%d",*ptr); return 0; } int * call(){ int x=25; ++x; return &x; } Explain the what the following code is doing ? How to resolve the problem ?
Consider the following program below#include<stdio.h int *call(); int main(){ int *ptr; ptr=call(); printf("%d",*ptr); return 0; } int * call(){ int x=25; ++x; return &x;...
511
views
asked
Aug 24, 2016
Programming in C
programming-in-c
+
–
2
votes
1
answer
16
Programming
For the below C code,what will be the output ? #include<stdio.h> int main() { show(); } void show(char *s) { printf("Welcome to Gate Overflow "); } (A)Welcome to Gate Overflow (B)No Output (C)Compilation Error (D)Infinite Loop
For the below C code,what will be the output ?#include<stdio.h int main() { show(); } void show(char *s) { printf("Welcome to Gate Overflow "); }(A)Welcome to Gate Overfl...
731
views
asked
Aug 20, 2016
1
votes
1
answer
17
Types and Expressions
The qualifier signed or unsigned may be applied to char or any integer.So why does not C have unsigned float ?
The qualifier signed or unsigned may be applied to char or any integer.So why does not C have unsigned float ?
560
views
asked
Jul 19, 2016
Programming in C
programming-in-c
+
–
5
votes
3
answers
18
ISRO2016-30
A complete binary tree with $n$ non-leaf nodes contains $\log_{2}n$ nodes $n+1$ nodes $2n$ nodes $2n+1$ nodes
A complete binary tree with $n$ non-leaf nodes contains$\log_{2}n$ nodes$n+1$ nodes$2n$ nodes$2n+1$ nodes
9.2k
views
asked
Jul 4, 2016
DS
data-structures
binary-tree
isro2016
+
–
10
votes
2
answers
19
ISRO2016-44
Peephole optimization is form of Loop optimization Local optimization Constant folding Data flow analysis
Peephole optimization is form ofLoop optimizationLocal optimizationConstant foldingData flow analysis
11.9k
views
asked
Jul 4, 2016
Compiler Design
compiler-design
code-optimization
isro2016
+
–
11
votes
3
answers
20
ISRO2016-4
If $(\text{G} , .)$ is a group such that $(ab)^{-1}=a^{-1}b^{-1},\forall a,b \in \text{G},$ then $\text{G}$ is a/an Commutative semi group Abelian group Non-abelian group None of these
If $(\text{G} , .)$ is a group such that $(ab)^{-1}=a^{-1}b^{-1},\forall a,b \in \text{G},$ then $\text{G}$ is a/anCommutative semi groupAbelian groupNon-abelian groupNon...
7.5k
views
asked
Jul 4, 2016
Set Theory & Algebra
set-theory&algebra
group-theory
isro2016
+
–
Page:
1
2
3
4
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register