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 viewed questions in Programming and DS
58
votes
3
answers
121
GATE CSE 2016 Set 1 | Question: 15
Consider the following C program. # include <stdio.h> void mystery (int *ptra, int *ptrb) { int *temp; temp = ptrb; ptrb =ptra; ptra = temp; } int main () { int a = 2016, b=0, c= 4, d = 42; mystery (&a, &b); if (a < c) mystery (&c, &a); mystery (&a, &d); printf("%d\n", a); } The output of the program is _________.
Sandeep Singh
asked
in
Programming in C
Feb 12, 2016
by
Sandeep Singh
18.0k
views
gatecse-2016-set1
programming-in-c
easy
numerical-answers
parameter-passing
2
votes
1
answer
122
ISRO2008-71
The time required to search an element in a linked list of length n is $O(\log_2 n)$ $O(n)$ $O(1)$ $O(n^2)$
go_editor
asked
in
DS
Jun 13, 2016
by
go_editor
17.8k
views
isro2008
data-structures
linked-list
time-complexity
44
votes
4
answers
123
GATE CSE 2008 | Question: 60
What is printed by the following C program? int f(int x, int *py, int **ppz) { int y, z; **ppz += 1; z = **ppz; // corrected z = *ppz; to z = **ppz; *py += 2; y = *py; x += 3; return x+y+z; } void main() { int c, *b, **a; c = 4; b = &c; a = &b; printf("%d", f(c, b, a)); } $18$ $19$ $21$ $22$
Kathleen
asked
in
Programming in C
Sep 12, 2014
by
Kathleen
17.7k
views
gatecse-2008
programming
programming-in-c
normal
parameter-passing
48
votes
4
answers
124
GATE CSE 2000 | Question: 2.16
Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited `in a postorder, inorder and preorder traversal respectively, of a complete binary tree. Which of the following is always true? LASTIN = LASTPOST LASTIN = LASTPRE LASTPRE = LASTPOST None of the above
Kathleen
asked
in
DS
Sep 14, 2014
by
Kathleen
17.6k
views
gatecse-2000
data-structures
binary-tree
normal
3
votes
1
answer
125
what is the difference between type conversion and type casting in c ?
Vivek Jain
asked
in
Programming in C
May 10, 2016
by
Vivek Jain
17.6k
views
55
votes
6
answers
126
GATE CSE 2003 | Question: 90
Consider the function $f$ defined below. struct item { int data; struct item * next; }; int f(struct item *p) { return ((p == NULL) || (p->next == NULL)|| ((p->data <= p ->next -> data) && f(p- ... order of data value the elements in the list are sorted in non-increasing order of data value not all elements in the list have the same data value
Kathleen
asked
in
DS
Sep 17, 2014
by
Kathleen
17.5k
views
gatecse-2003
data-structures
linked-list
normal
61
votes
5
answers
127
GATE CSE 2014 Set 1 | Question: 10
Consider the following program in C language: #include <stdio.h> main() { int i; int*pi = &i; scanf("%d",pi); printf("%d\n", i+5); } Which one of the following statements is TRUE? Compilation fails. Execution ... $5$ more than the address of variable $i$. On execution, the value printed is $5$ more than the integer value entered.
go_editor
asked
in
Programming in C
Sep 26, 2014
by
go_editor
17.4k
views
gatecse-2014-set1
programming
programming-in-c
easy
pointers
67
votes
2
answers
128
GATE IT 2005 | Question: 13
A function $f$ defined on stacks of integers satisfies the following properties. $f(∅) = 0$ and $f (push (S, i)) = max (f(S), 0) + i$ for all stacks $S$ and integers $i$. If a stack $S$ contains the integers $2, -3, 2, -1, 2$ in order from bottom to top, what is $f(S)$? $6$ $4$ $3$ $2$
Ishrat Jahan
asked
in
DS
Nov 3, 2014
by
Ishrat Jahan
17.3k
views
gateit-2005
data-structures
stack
normal
2
votes
3
answers
129
UGC NET CSE | July 2018 | Part 2 | Question: 28
The maximum number of comparisons needed to sort 9 items using radix sort is (assume each item is 5 digit octal number): 45 72 360 450
Pooja Khatri
asked
in
DS
Jul 13, 2018
by
Pooja Khatri
17.1k
views
ugcnetcse-july2018-paper2
data-structures
radix-sort
67
votes
4
answers
130
GATE CSE 2006 | Question: 13
A scheme for storing binary trees in an array $X$ is as follows. Indexing of $X$ starts at $1$ instead of $0$. the root is stored at $X[1]$. For a node stored at $X[i]$, the left child, if any, is stored in $X[2i]$ and the right child, if any, in $X[2i+1]$. To be able to store any binary tree on n vertices the minimum size of $X$ should be $\log_2 n$ $n$ $2n+1$ $2^n-1$
Rucha Shelke
asked
in
DS
Sep 17, 2014
by
Rucha Shelke
17.1k
views
gatecse-2006
data-structures
binary-tree
normal
42
votes
5
answers
131
GATE IT 2008 | Question: 76
A binary tree with $n > 1$ nodes has $n_1$, $n_2$ and $n_3$ nodes of degree one, two and three respectively. The degree of a node is defined as the number of its neighbours. $n_3$ can be expressed as $n_1 + n_2 - 1$ $n_1 -2$ $[((n_1 + n_2)/2)]$ $n_2 - 1$
Ishrat Jahan
asked
in
DS
Oct 29, 2014
by
Ishrat Jahan
16.9k
views
gateit-2008
data-structures
binary-tree
normal
54
votes
7
answers
132
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
72
votes
4
answers
133
GATE CSE 2015 Set 2 | Question: 33
Which one of the following hash functions on integers will distribute keys most uniformly over $10$ buckets numbered $0$ to $9$ for $i$ ranging from $0$ to $2020$? $h(i) = i^2 \text{mod } 10$ $h(i) = i^3 \text{mod } 10$ $h(i) = (11 \ast i^2) \text{mod } 10$ $h(i) = (12 \ast i^2) \text{mod } 10$
go_editor
asked
in
DS
Feb 12, 2015
by
go_editor
16.9k
views
gatecse-2015-set2
data-structures
hashing
normal
55
votes
3
answers
134
GATE CSE 2014 Set 1 | Question: 3
Let $G=(V,E)$ be a directed graph where $V$ is the set of vertices and $E$ the set of edges. Then which one of the following graphs has the same strongly connected components as $G$ ? $G_1$ = $(V,E_1)$ ... $u$ to $v$ in $E\}$ $G_4$ = $(V_4,E)$ where $V_4$ is the set of vertices in $G$ which are not isolated
go_editor
asked
in
DS
Sep 26, 2014
by
go_editor
16.9k
views
gatecse-2014-set1
data-structures
graph-theory
ambiguous
37
votes
5
answers
135
GATE CSE 1998 | Question: 1.24
Which of the following statements is false? A tree with a $n$ nodes has $(n – 1)$ edges A labeled rooted binary tree can be uniquely constructed given its postorder and preorder traversal results. A complete binary tree with $n$ internal nodes has $(n + 1)$ leaves. The maximum number of nodes in a binary tree of height h is $2^{h+1} - 1$
Kathleen
asked
in
DS
Sep 25, 2014
by
Kathleen
16.8k
views
gate1998
data-structures
tree
multiple-selects
normal
33
votes
10
answers
136
GATE CSE 2017 Set 1 | Question: 6
Let $T$ be a binary search tree with $15$ nodes. The minimum and maximum possible heights of $T$ are: Note: The height of a tree with a single node is $0$. $4$ and $15$ respectively. $3$ and $14$ respectively. $4$ and $14$ respectively. $3$ and $15$ respectively.
Arjun
asked
in
DS
Feb 14, 2017
by
Arjun
16.6k
views
gatecse-2017-set1
data-structures
binary-search-tree
easy
2
votes
3
answers
137
The minimum number of temporary variables needed to swap the contents of two variables?
The minimum number of temporary variables needed to swap the contents of two variables is: (a) 1 (b) 2 (c) 3 (d) 0
goku
asked
in
Programming in C
Sep 14, 2015
by
goku
16.6k
views
programming
65
votes
6
answers
138
GATE CSE 2016 Set 2 | Question: 36
Consider the following New-order strategy for traversing a binary tree: Visit the root; Visit the right subtree using New-order; Visit the left subtree using New-order; The New-order traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5 - 2 ^ 6 7 * 1 + - is given ... $1 \ 7 \ 6 * + \ 2 \ 5 \ 4 \ 3 \ * \ - \wedge -$
Akash Kanase
asked
in
DS
Feb 12, 2016
by
Akash Kanase
16.6k
views
gatecse-2016-set2
data-structures
binary-tree
normal
33
votes
4
answers
139
GATE CSE 2021 Set 1 | Question: 2
Let $P$ be an array containing $n$ integers. Let $t$ be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of $n$ elements. Which one of the following choices is correct ... $t>\lceil \log_2(n)\rceil \text{ and } t\leq n$
Arjun
asked
in
DS
Feb 18, 2021
by
Arjun
16.5k
views
gatecse-2021-set1
data-structures
array
1-mark
33
votes
4
answers
140
GATE CSE 2007 | Question: 38, ISRO2016-27
The following postfix expression with single digit operands is evaluated using a stack: $8 \ 2 \ 3 \ {}^\hat{} ∕ \ 2 \ 3 * + 5 \ 1 * -$ Note that $^\hat{}$ is the exponentiation operator. The top two elements of the stack after the first $*$ is evaluated are $6, 1$ $5, 7$ $3, 2$ $1, 5$
Kathleen
asked
in
DS
Sep 21, 2014
by
Kathleen
16.5k
views
gatecse-2007
data-structures
stack
normal
infix-prefix
isro2016
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
12
...
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