Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Most answered questions in Programming and DS
55
votes
8
answers
61
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 $\text{enQueue}$ and $\text{deQueue}$ can be performed in constant time? rear node front node not possible with a single pointer node next to front
Kathleen
asked
in
DS
Sep 18, 2014
by
Kathleen
30.9k
views
gatecse-2004
data-structures
linked-list
normal
33
votes
8
answers
62
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$ and $Z$ may be $NULL$ ... $(1 \ (2 \ 3 \ 4) \ (5 \ 6 \ 7))$ $(1 \ (2 \ 3 \ NULL) \ (4 \ 5))$
Kathleen
asked
in
DS
Sep 14, 2014
by
Kathleen
10.9k
views
gatecse-2000
data-structures
binary-tree
easy
55
votes
8
answers
63
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^2 - 3n +2$ $n^2 \frac{\left(n+1\right)}{2}$
Kathleen
asked
in
DS
Sep 14, 2014
by
Kathleen
9.8k
views
gatecse-2000
data-structures
array
easy
32
votes
8
answers
64
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 (including the first call) for evaluation of $fib(7)$ is___________.
Kathleen
asked
in
Programming in C
Sep 12, 2014
by
Kathleen
10.1k
views
gate1991
programming
recursion
normal
numerical-answers
4
votes
7
answers
65
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
asked
in
Programming in C
Mar 31, 2020
by
admin
2.5k
views
nielit2016dec-scientistb-cs
programming-in-c
output
1
vote
7
answers
66
UGC NET CSE | January 2017 | Part 2 | Question: 23
Which of the following is a valid heap? $a$ $b$ $c$ $d$
go_editor
asked
in
DS
Mar 24, 2020
by
go_editor
1.5k
views
ugcnetjan2017ii
data-structures
binary-heap
32
votes
7
answers
67
GATE CSE 2019 | Question: 40
Consider the following statements: The smallest element in a max-heap is always at a leaf node The second largest element in a max-heap is always a child of a root node A max-heap can be constructed from a binary search tree in $\Theta(n)$ time A binary search tree ... time Which of the above statements are TRUE? I, II and III I, II and IV I, III and IV II, III and IV
Arjun
asked
in
DS
Feb 7, 2019
by
Arjun
20.5k
views
gatecse-2019
data-structures
binary-heap
2-marks
54
votes
7
answers
68
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 =0; int i; while (done==0) { done =1; for (i=0; i<=4; i ... i-1]) { swap(&array[i], &array[i-1]); done =0; } } } printf( %d , array[3]); } The output of the program is _______
Arjun
asked
in
Programming in C
Feb 14, 2017
by
Arjun
16.9k
views
gatecse-2017-set2
programming
algorithms
numerical-answers
identify-function
103
votes
7
answers
69
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) { x ... in: Return of $6$ and $6$ respectively. Infinite loop and abnormal termination respectively. Abnormal termination and infinite loop respectively. Both terminating abnormally.
Arjun
asked
in
Programming in C
Feb 14, 2017
by
Arjun
25.3k
views
gatecse-2017-set1
programming-in-c
programming
normal
recursion
38
votes
7
answers
70
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
asked
in
DS
Feb 14, 2017
by
Arjun
18.7k
views
gatecse-2017-set1
data-structures
tree
easy
numerical-answers
86
votes
7
answers
71
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; x = assignval (x,0); ... and not as shown. compiles successfully but execution may result in dangling pointer. compiles successfully but execution may result in memory leak.
Arjun
asked
in
Programming in C
Feb 14, 2017
by
Arjun
35.2k
views
gatecse-2017-set1
programming-in-c
programming
pointers
25
votes
7
answers
72
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 program is ______
Madhav
asked
in
Programming in C
Feb 14, 2017
by
Madhav
11.8k
views
gatecse-2017-set2
programming-in-c
numerical-answers
easy
10
votes
7
answers
73
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"); printf("0"); } ______
Arjun
asked
in
Programming in C
Oct 18, 2016
by
Arjun
1.8k
views
go-programming-1
programming-in-c
programming
numerical-answers
4
votes
7
answers
74
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 operations depends on the length of the linked list? Delete the first element of the list Interchange the first two elements of the list Delete the last element of the list Add an element at the end of the list
go_editor
asked
in
DS
Jul 1, 2016
by
go_editor
15.9k
views
isro2014
data-structures
linked-list
9
votes
7
answers
75
ISRO2011-19
If node A has three siblings and B is parent of A, what is the degree of A? 0 3 4 5
shibu
asked
in
DS
Jun 15, 2016
by
shibu
7.4k
views
isro2011
data-structures
tree
50
votes
7
answers
76
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 = a * a; b = b/2; } else {res = res * a; b = b - 1; } } return res; } Which one of the following ... $X^{Y} = a^{b}$ $(res * a)^{Y} = (res * X)^{b}$ $X^{Y} = res * a^{b}$ $X^{Y} = (res * a)^{b}$
Akash Kanase
asked
in
Programming in C
Feb 12, 2016
by
Akash Kanase
13.9k
views
gatecse-2016-set2
programming
loop-invariants
normal
29
votes
7
answers
77
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); printf ("%d", i+j); }
Akash Kanase
asked
in
Programming in C
Feb 12, 2016
by
Akash Kanase
8.8k
views
gatecse-2016-set2
programming-in-c
normal
numerical-answers
parameter-passing
1
vote
7
answers
78
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 level i of a binary tree is In the following answers, the operator '^' indicates power a) 2^i-1 b)2^i c)2^i+1 d)2^(i+1/2)
Akanksha Kesarwani
asked
in
DS
Jan 16, 2016
by
Akanksha Kesarwani
101k
views
binary-tree
data-structures
8
votes
7
answers
79
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 is %o \n",shifty); } The value of shifty is 15c0 The value of shifty is 4300 The value of shifty is 5700 The value of shifty is 2700
ajit
asked
in
Programming in C
Sep 2, 2015
by
ajit
8.0k
views
programming-in-c
isro2014
output
54
votes
7
answers
80
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 end The post condition that needs to be satisfied after the program terminates is $\{ r = qx + y \wedge r < y\}$ ... $\{ y = qx + r \wedge 0 < r < y\}$ $\{ q + 1 < r - y \wedge y > 0\}$
makhdoom ghaya
asked
in
Programming in C
Feb 13, 2015
by
makhdoom ghaya
15.5k
views
gatecse-2015-set1
programming
loop-invariants
normal
Page:
« prev
1
2
3
4
5
6
7
8
9
...
309
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Programming
(4.1k)
DS
(2.0k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Aptitude Overflow