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
Hot questions in Programming and DS
19
votes
4
answers
101
GATE CSE 2021 Set 1 | Question: 37
Consider the following$\text{ ANSI C}$ program. #include <stdio.h> int main() { int i, j, count; count=0; i=0; for (j=-3; j<=3; j++) { if (( j >= 0) && (i++)) count = ... and output $10$ when executed The program will compile successfully and output $8$ when executed The program will compile successfully and output $13$ when executed
Arjun
asked
in
Programming in C
Feb 18, 2021
by
Arjun
8.8k
views
gatecse-2021-set1
programming-in-c
2-marks
32
votes
7
answers
102
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
78
votes
4
answers
103
GATE CSE 2006 | Question: 57
Consider this C code to swap two integers and these five statements: the code void swap (int *px, int *py) { *px = *px - *py; *py = *px + *py; *px = *py - *px; } S1: will generate a compilation error S2: may generate a ... procedure correctly for some but not all valid input pointers S5: may add or subtract integers and pointers S1 S2 and S3 S2 and S4 S2 and S5
Rucha Shelke
asked
in
Programming in C
Sep 26, 2014
by
Rucha Shelke
20.8k
views
gatecse-2006
programming
programming-in-c
normal
pointers
81
votes
6
answers
104
GATE CSE 2003 | Question: 6
Let $T(n)$ be the number of different binary search trees on $n$ distinct elements. Then $T(n) = \sum_{k=1}^{n} T(k-1)T(x)$, where $x$ is $n-k+1$ $n-k$ $n-k-1$ $n-k-2$
Kathleen
asked
in
DS
Sep 16, 2014
by
Kathleen
22.2k
views
gatecse-2003
normal
binary-search-tree
39
votes
6
answers
105
GATE CSE 1996 | Question: 1.13
An advantage of chained hash table (external hashing) over the open addressing scheme is Worst case complexity of search operations is less Space used is less Deletion is easier None of the above
Kathleen
asked
in
DS
Oct 9, 2014
by
Kathleen
13.7k
views
gate1996
data-structures
hashing
normal
75
votes
5
answers
106
GATE CSE 2007 | Question: 47
Consider the process of inserting an element into a $Max \: Heap$, where the $Max \: Heap$ is represented by an $array$. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of $comparisons$ performed is: $\Theta(\log_2n)$ $\Theta(\log_2\log_2n)$ $\Theta(n)$ $\Theta(n\log_2n)$
Kathleen
asked
in
DS
Sep 21, 2014
by
Kathleen
19.4k
views
gatecse-2007
data-structures
binary-heap
normal
3
votes
3
answers
107
GATE CSE 2024 | Set 1 | Question: 8
Consider the following $\mathrm{C}$ program: #include <stdio.h> int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; } Which one of the following ... The program prints $9$ as output The program prints $10$ as output The program gets stuck in an infinite loop The program prints $6$ as output
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
5.5k
views
gatecse2024-set1
programming
programming-in-c
41
votes
6
answers
108
GATE CSE 2016 Set 2 | Question: 37
Consider the following program: int f (int * p, int n) { if (n <= 1) return 0; else return max (f (p+1, n-1), p[0] - p[1]); } int main () { int a[] = {3, 5, 2, 6, 4}; printf(" %d", f(a, 5)); } Note: $\max (x, y)$ returns the maximum of $x$ and $y$. The value printed by this program is ________.
Akash Kanase
asked
in
Programming in C
Feb 12, 2016
by
Akash Kanase
13.6k
views
gatecse-2016-set2
programming-in-c
normal
numerical-answers
recursion
29
votes
2
answers
109
GATE CSE 2000 | Question: 2.20
The value of $j$ at the end of the execution of the following C program: int incr (int i) { static int count = 0; count = count + i; return (count); } main () { int i, j; for (i = 0; i <= 4; i++) j = incr (i); } is: $10$ $4$ $6$ $7$
Kathleen
asked
in
Programming in C
Sep 14, 2014
by
Kathleen
14.9k
views
gatecse-2000
programming
programming-in-c
easy
65
votes
9
answers
110
GATE IT 2004 | Question: 13
Let $P$ be a singly linked list. Let $Q$ be the pointer to an intermediate node $x$ in the list. What is the worst-case time complexity of the best-known algorithm to delete the node $x$ from the list ? $O(n)$ $O(\log^2 n)$ $O(\log n)$ $O(1)$
Ishrat Jahan
asked
in
DS
Nov 1, 2014
by
Ishrat Jahan
24.8k
views
gateit-2004
data-structures
linked-list
normal
ambiguous
53
votes
7
answers
111
GATE IT 2005 | Question: 12
The numbers $1, 2, .\dots n$ are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains $p$ nodes. The first number to be inserted in the tree must be $p$ $p + 1$ $n - p$ $n - p + 1$
Ishrat Jahan
asked
in
DS
Nov 3, 2014
by
Ishrat Jahan
13.3k
views
gateit-2005
data-structures
normal
binary-search-tree
25
votes
3
answers
112
GATE CSE 2003 | Question: 19, ISRO2009-24
Suppose the numbers $7, 5, 1, 8, 3, 6, 0, 9, 4, 2$ ... $9 \ 8 \ 6 \ 4 \ 2 \ 3 \ 0 \ 1 \ 5 \ 7$
Kathleen
asked
in
DS
Sep 16, 2014
by
Kathleen
23.4k
views
gatecse-2003
binary-search-tree
easy
isro2009
9
votes
9
answers
113
ISRO2014-73
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$ $30$ $60$ $90$ $120$
ajit
asked
in
DS
Sep 23, 2015
by
ajit
14.6k
views
isro2014
data-structures
tree
combinatory
41
votes
11
answers
114
GATE IT 2007 | Question: 30
Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are: $isEmpty (Q)$ - returns true if the queue is empty, false otherwise. $delete (Q)$ - deletes the element at the front of the queue ... the front of the queue $Q$ and inserts it at the rear keeping the other elements in the same order Empties the queue $Q$
Ishrat Jahan
asked
in
DS
Oct 29, 2014
by
Ishrat Jahan
16.2k
views
gateit-2007
data-structures
queue
normal
41
votes
4
answers
115
GATE CSE 2015 Set 3 | Question: 54
Consider the following C program: #include<stdio.h> int f1(void); int f2(void); int f3(void); int x=10; int main() { int x=1; x += f1() + f2 () + f3() + f2(); printf("%d", x); return 0; } int f1() { int x = 25; x++; return x;} int f2() { static int x = 50; x++; return x;} int f3() { x *= 10; return x;} The output of the program is ______.
go_editor
asked
in
Programming in C
Feb 16, 2015
by
go_editor
11.8k
views
gatecse-2015-set3
programming
programming-in-c
normal
numerical-answers
64
votes
7
answers
116
GATE IT 2005 | Question: 50
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most $2$. If the height of the tree is $h > 0$, then the minimum number of nodes in the tree is $2^{h-1}$ $2^{h-1} + 1$ $2^h - 1$ $2^h$
Ishrat Jahan
asked
in
DS
Nov 3, 2014
by
Ishrat Jahan
22.5k
views
gateit-2005
data-structures
binary-tree
normal
6
votes
3
answers
117
ISRO2017-16
Given two statements Insertion of an element should be done at the last node of the circular list Deletion of an element should be done at the last node of the circular list Both are true Both are false First is false and second is true None of the above
sh!va
asked
in
DS
May 7, 2017
by
sh!va
10.5k
views
isro2017
data-structures
linked-list
bad-question
62
votes
3
answers
118
GATE CSE 2001 | Question: 2.18
Consider the following three C functions: $[P1]$ int *g(void) { int x = 10; return (&x); } $[P2]$ int *g(void) { int *px; *px = 10; return px; } $[P3]$ int *g(void) { int *px; px = (int*) malloc (sizeof(int)); *px = 10; ... of the above three functions are likely to cause problems with pointers? Only $P3$ Only $P1$ and $P3$ Only $P1$ and $P2$ $P1, P2$ and $P3$
Kathleen
asked
in
Programming in C
Sep 14, 2014
by
Kathleen
24.0k
views
gatecse-2001
programming
programming-in-c
normal
pointers
44
votes
5
answers
119
GATE CSE 2006 | Question: 10
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
Rucha Shelke
asked
in
DS
Sep 16, 2014
by
Rucha Shelke
20.7k
views
gatecse-2006
data-structures
binary-heap
easy
73
votes
5
answers
120
GATE CSE 2016 Set 2 | Question: 34
A complete binary min-heap is made by including each integer in $[1, 1023]$ exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth $0$. The maximum depth at which integer $9$ can appear is _________.
Akash Kanase
asked
in
DS
Feb 12, 2016
by
Akash Kanase
25.8k
views
gatecse-2016-set2
data-structures
binary-heap
normal
numerical-answers
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
...
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