Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Most answered questions in Programming and DS
#61
31.8k
views
8
answers
55
votes
GATE CSE 2004 | Question: 36
A circularly linked list is used to represent a Queue. A single variable $p$ is used to access the Queue. To which node should $p$ point such that both the operations $\t...
Kathleen
31.8k
views
Kathleen
asked
Sep 18, 2014
DS
gatecse-2004
data-structures
linked-list
normal
+
–
#62
11.2k
views
8
answers
33
votes
GATE CSE 2000 | Question: 1.14
Consider the following nested representation of binary trees: $(X \ Y \ Z)$ indicates $Y$ and $Z$ are the left and right subtrees, respectively, of node $X$. Note that $Y...
Kathleen
11.2k
views
Kathleen
asked
Sep 14, 2014
DS
gatecse-2000
data-structures
binary-tree
easy
+
–
#63
10.2k
views
8
answers
56
votes
GATE CSE 2000 | Question: 1.2
An $n \times n$ array $v$ is defined as follows:$v\left[i,j\right] = i - j$ for all $i, j, i \leq n, 1 \leq j \leq n$The sum of the elements of the array $v$ is$0$$n-1$$n...
Kathleen
10.2k
views
Kathleen
asked
Sep 14, 2014
DS
gatecse-2000
data-structures
array
easy
+
–
#64
10.4k
views
8
answers
33
votes
GATE CSE 1991 | Question: 01,x
Consider the following recursive definition of $fib$:fib(n) := if n = 0 then 1 else if n = 1 then 1 else fib(n-1) + fib(n-2)The number of times $fib$ is called (includin...
Kathleen
10.4k
views
Kathleen
asked
Sep 12, 2014
Programming in C
gate1991
programming
recursion
normal
numerical-answers
+
–
#65
2.7k
views
7
answers
4
votes
NIELIT 2016 DEC Scientist B (CS) - Section B: 13
What will be output if you will compile and execute the following C code? void main() { printf("%d",sizeof(5.2)); }$4$$8$$2$$16$
admin
2.7k
views
admin
asked
Mar 31, 2020
Programming in C
nielit2016dec-scientistb-cs
programming-in-c
output
+
–
#66
1.7k
views
7
answers
1
votes
UGC NET CSE | January 2017 | Part 2 | Question: 23
Which of the following is a valid heap? $a$$b$$c$$d$
go_editor
1.7k
views
go_editor
asked
Mar 24, 2020
DS
ugcnetjan2017ii
data-structures
binary-heap
+
–
#67
21.0k
views
7
answers
32
votes
GATE CSE 2019 | Question: 40
Consider the following statements:The smallest element in a max-heap is always at a leaf nodeThe second largest element in a max-heap is always a child of a root nodeA ma...
Arjun
21.0k
views
Arjun
asked
Feb 7, 2019
DS
gatecse-2019
data-structures
binary-heap
2-marks
+
–
#68
17.4k
views
7
answers
54
votes
GATE CSE 2017 Set 2 | Question: 43
Consider the following snippet of a C program. Assume that swap $(\&x, \&y)$ exchanges the content of $x$ and $y$:int main () { int array[] = {3, 5, 1, 4, 6, 2}; int done...
Arjun
17.4k
views
Arjun
asked
Feb 14, 2017
Programming in C
gatecse-2017-set2
programming
algorithms
numerical-answers
identify-function
+
–
#69
25.8k
views
7
answers
104
votes
GATE CSE 2017 Set 1 | Question: 36
Consider the C functions foo and bar given below:int foo(int val) { int x=0; while(val 0) { x = x + foo(val ); } return val; }int bar(int val) { int x = 0; while(val 0)...
Arjun
25.8k
views
Arjun
asked
Feb 14, 2017
Programming in C
gatecse-2017-set1
programming-in-c
programming
normal
recursion
+
–
#70
19.1k
views
7
answers
38
votes
GATE CSE 2017 Set 1 | Question: 20
Let $T$ be a tree with $10$ vertices. The sum of the degrees of all the vertices in $T$ is ________
Arjun
19.1k
views
Arjun
asked
Feb 14, 2017
DS
gatecse-2017-set1
data-structures
tree
easy
numerical-answers
+
–
#71
35.8k
views
7
answers
88
votes
GATE CSE 2017 Set 1 | Question: 13
Consider the following C code:#include<stdio.h int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return...
Arjun
35.8k
views
Arjun
asked
Feb 14, 2017
Programming in C
gatecse-2017-set1
programming-in-c
programming
pointers
+
–
#72
12.3k
views
7
answers
25
votes
GATE CSE 2017 Set 2 | Question: 54
Consider the following C program.#include<stdio.h int main () { int m=10; int n, n1; n=++m; n1=m++; n ; n1; n-=n1; printf(“%d”, n); return 0; }The output of the prog...
Madhav
12.3k
views
Madhav
asked
Feb 14, 2017
Programming in C
gatecse-2017-set2
programming-in-c
numerical-answers
easy
+
–
#73
1.9k
views
7
answers
10
votes
GATE Overflow | Programming | Test 1 | Question: 3
What will be the output of the following code?#include <stdio.h #include <string.h int main() { char string[] = "Hello"; if(sizeof(string) <= strlen(string)) printf("1");...
Arjun
1.9k
views
Arjun
asked
Oct 18, 2016
Programming in C
go-programming-1
programming-in-c
programming
numerical-answers
+
–
#74
16.1k
views
7
answers
4
votes
ISRO2014-49
Consider a single linked list where $F$ and $L$ are pointers to the first and last elements respectively of the linked list. The time for performing which of the given op...
go_editor
16.1k
views
go_editor
asked
Jul 1, 2016
DS
isro2014
data-structures
linked-list
+
–
#75
7.7k
views
7
answers
9
votes
ISRO2011-19
If node A has three siblings and B is parent of A, what is the degree of A?0345
shibu
7.7k
views
shibu
asked
Jun 15, 2016
DS
isro2011
data-structures
tree
+
–
#76
14.2k
views
7
answers
50
votes
GATE CSE 2016 Set 2 | Question: 35
The following function computes $X^{Y}$ for positive integers $X$ and $Y$.int exp (int X, int Y) { int res =1, a = X, b = Y; while (b != 0) { if (b % 2 == 0) {a =...
Akash Kanase
14.2k
views
Akash Kanase
asked
Feb 12, 2016
Programming in C
gatecse-2016-set2
programming
loop-invariants
normal
+
–
#77
9.0k
views
7
answers
29
votes
GATE CSE 2016 Set 2 | Question: 12
The value printed by the following program is _______.void f (int * p, int m) { m = m + 5; *p = *p + m; return; } void main () { int i=5, j=10; f (&i, j); p...
Akash Kanase
9.0k
views
Akash Kanase
asked
Feb 12, 2016
Programming in C
gatecse-2016-set2
programming-in-c
normal
numerical-answers
parameter-passing
+
–
#78
102k
views
7
answers
1
votes
The maximum number of nodes on level i of a binary tree
Level of a node is distance from root to that node. For example, level of root is 1 and levels of left and right children of root is 2. The maximum number of nodes on lev...
Akanksha Kesarwani
102k
views
Akanksha Kesarwani
asked
Jan 16, 2016
DS
binary-tree
data-structures
+
–
#79
8.2k
views
7
answers
8
votes
ISRO2014-32
What is the output of the following C program?#include<stdio.h void main(void){ int shifty; shifty=0570; shifty=shifty>>4; shifty=shifty<<6; printf("The value of shifty i...
ajit
8.2k
views
ajit
asked
Sep 2, 2015
Programming in C
programming-in-c
isro2014
output
+
–
#80
16.1k
views
7
answers
54
votes
GATE CSE 2015 Set 1 | Question: 33
Consider the following pseudo code, where $x$ and $y$ are positive integers.begin q := 0 r := x while r ≥ y do begin r := r - y q := q + 1 end endThe post condition tha...
makhdoom ghaya
16.1k
views
makhdoom ghaya
asked
Feb 13, 2015
Programming in C
gatecse-2015-set1
programming
loop-invariants
normal
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register