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 Gangani_Son
4
votes
2
answers
1
What is the return value of following function for 484? What does it to in general?
What is the return value of following function for 484? What does it to in general? bool fun(int n) { int sum = 0; for (int odd = 1; n > sum; odd = odd+2) sum = sum + odd; return (n == sum ... is odd or not (D) True, it checks whether a given number is perfect square. Any one can explain output of above program?
What is the return value of following function for 484? What does it to in general?bool fun(int n){ int sum = 0; for (int odd = 1; n sum; odd = odd+2) sum = ...
2.1k
views
asked
Dec 14, 2018
Programming in C
programming-in-c
functions
programming
loop
+
–
1
votes
1
answer
2
Which of the following condition is sufficient to detect cycle in a directed graph?
Which of the following condition is sufficient to detect cycle in a directed graph? (A) There is an edge from currently being visited node to an already visited node. (B) There is an edge from currently being visited node to ... seen twice in DFS. (D) None of the bove here option B is right, but why not option A?
Which of the following condition is sufficient to detect cycle in a directed graph?(A) There is an edge from currently being visited node to an already visited node.(B) T...
13.4k
views
asked
Dec 12, 2018
Algorithms
graph-theory
depth-first-search
geeksforgeeks-test-series
graph-algorithms
+
–
2
votes
1
answer
3
output of the program
#include <stdio.h> void print(int n, int j) { if (j >= n) return; if (n-j > 0 && n-j >= j) printf("%d %dn", j, n-j); print(n, j+1); } int main() { int n = 8; print(n, 1); } (A) 1 7 2 6 3 5 4 4 4 4 (B) 1 7 2 6 3 5 4 4 (C) 1 7 2 6 3 5 (D) 1 2 3 4 5 6 7 8 Answer is B. anyone can explain how?
#include <stdio.h void print(int n, int j){ if (j >= n) return; if (n-j 0 && n-j >= j) printf("%d %dn", j, n-j); print(n, j+1);} int main(){ int n = ...
7.3k
views
asked
Dec 11, 2018
Programming in C
programming-in-c
programming
recursion
+
–
0
votes
0
answers
4
#gate #1997
A language L is a subset of Pascal with the following constructs: a). Expressions involving the operators ‘+’ and ‘<‘ only b). Assignment statements c). ‘while’ statements and d). Compound statements with the syntax ‘begin…………..end’ Give an unambiguous grammar for L.
A language L is a subset of Pascal with the following constructs:a). Expressions involving the operators ‘+’ and ‘<‘ onlyb). Assignment statementsc). ‘while’ ...
232
views
asked
Dec 4, 2018
Compiler Design
usergate1997
usermod
grammar
+
–
0
votes
1
answer
5
#geeksfoegeeks #gate #2017 #mocktest
Let G be a simple graph with 20 vertices and 8 components. If we delete a vertex in G, then number of components in G should lie between ____. (A) 8 and 20 (B) 8 and 19 (C) 7 and 19 (D) 7 and 20 Answer is (C) but i think also possible (B). anyone explain?
Let G be a simple graph with 20 vertices and 8 components. If we delete a vertex in G, then number of components in G should lie between ____.(A) 8 and 20(B) 8 and 19(C) ...
1.6k
views
asked
Dec 4, 2018
Programming in C
graph-theory
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register