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
46
votes
6
answers
61
GATE CSE 2012 | Question: 35
Suppose a circular queue of capacity $(n −1)$ elements is implemented with an array of $n$ elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, $REAR = FRONT = 0$. The conditions to detect ... : $(REAR+1) \mod n == FRONT$ full: $(FRONT+1) \mod n == REAR$ empty: $REAR == FRONT$
gatecse
asked
in
DS
Sep 26, 2014
by
gatecse
24.0k
views
gatecse-2012
data-structures
queue
normal
62
votes
3
answers
62
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
65
votes
9
answers
63
GATE CSE 2016 Set 1 | Question: 38
Consider the weighted undirected graph with $4$ vertices, where the weight of edge $\{i,j\}$ is given by the entry $W_{ij}$ in the matrix $W$ ... integer value of $x$, for which at least one shortest path between some pair of vertices will contain the edge with weight $x$ is ___________.
Sandeep Singh
asked
in
DS
Feb 12, 2016
by
Sandeep Singh
23.9k
views
gatecse-2016-set1
data-structures
graph-theory
normal
numerical-answers
42
votes
12
answers
64
GATE CSE 2015 Set 3 | Question: 25
Consider a binary tree T that has $200$ leaf nodes. Then the number of nodes in T that have exactly two children are ______.
go_editor
asked
in
DS
Feb 14, 2015
by
go_editor
23.9k
views
gatecse-2015-set3
data-structures
binary-tree
normal
numerical-answers
1
vote
1
answer
65
The process of accessing data stored in a serial access memory is similar to manipulating data on a
The process of accessing data stored in a serial access memory is similar to manipulating data on a (A) heap (B) queue (C) stack (D) binary tree
Meenakshi Sharma
asked
in
Programming in C
Jul 11, 2017
by
Meenakshi Sharma
23.8k
views
25
votes
3
answers
66
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
101
votes
7
answers
67
GATE CSE 2002 | Question: 2.12
A weight-balanced tree is a binary tree in which for each node, the number of nodes in the left sub tree is at least half and at most twice the number of nodes in the right sub tree. The maximum possible height (number of nodes on the path from the root to the furthest ... which of the following? $\log_2 n$ $\log_{\frac{4}{3}} n$ $\log_3 n$ $\log_{\frac{3}{2}} n$
Kathleen
asked
in
DS
Sep 15, 2014
by
Kathleen
23.3k
views
gatecse-2002
data-structures
binary-tree
normal
0
votes
0
answers
68
DataStructureDeQueue
Suppose a dequeue is stored in a circular array with N memory cells. At which of the following condition is the dequeue is full? (i) LEFT = N and RIGHT = 1 (ii) LEFT = RIGHT + 1 (iii) LEFT = 1 and RIGHT = N (iv) LEFT = RIGHT - 1 + N (i) and (iii) (iii) and (iv) (ii) and (iii) (i) and (iv)
Abhisek Tiwari 4
asked
in
DS
Feb 24, 2019
by
Abhisek Tiwari 4
23.2k
views
61
votes
4
answers
69
GATE CSE 2016 Set 1 | Question: 10
A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT ($n$ refers to the number of items in the queue) ? Both operations can be performed in $O(1)$ ... both operations will be $\Omega (n)$. Worst case time complexity for both operations will be $\Omega (\log n)$
Sandeep Singh
asked
in
DS
Feb 12, 2016
by
Sandeep Singh
23.2k
views
gatecse-2016-set1
data-structures
queue
normal
35
votes
2
answers
70
GATE CSE 2020 | Question: 22
Consider the following C program. #include <stdio.h> int main () { int a[4] [5] = {{1, 2, 3, 4, 5}, {6, 7,8, 9, 10}, {11, 12, 13, 14, 15}, {16, 17,18, 19, 20}}; printf(“%d\n”, *(*(a+**a+2)+3)); return(0); } The output of the program is _______.
Arjun
asked
in
Programming in C
Feb 12, 2020
by
Arjun
23.2k
views
gatecse-2020
numerical-answers
programming-in-c
array
1-mark
38
votes
3
answers
71
GATE CSE 2020 | Question: 46
Consider the following C functions. int fun1(int n) { static int i= 0; if (n > 0) { ++i; fun1(n-1); } return (i); } int fun2(int n) { static int i= 0; if (n>0) { i = i+ fun1 (n) ; fun2(n-1) ; } return (i); } The return value of $\text{fun}2 (5)$ is _________
Arjun
asked
in
Programming in C
Feb 12, 2020
by
Arjun
23.2k
views
gatecse-2020
numerical-answers
programming-in-c
recursion
2-marks
22
votes
8
answers
72
GATE CSE 2005 | Question: 36
In a complete $k$-ary tree, every internal node has exactly $k$ children. The number of leaves in such a tree with $n$ internal node is: $nk$ $(n-1)k + 1$ $n(k-1) +1$ $n(k-1)$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
23.0k
views
gatecse-2005
data-structures
tree
normal
35
votes
4
answers
73
GATE CSE 1994 | Question: 1.17, UGCNET-Sep2013-II: 32
Linked lists are not suitable data structures for which one of the following problems? Insertion sort Binary search Radix sort Polynomial manipulation
Kathleen
asked
in
DS
Oct 4, 2014
by
Kathleen
23.0k
views
gate1994
data-structures
linked-list
normal
ugcnetsep2013ii
54
votes
7
answers
74
GATE CSE 1996 | Question: 4
A binary search tree is used to locate the number $43$ ...
Kathleen
asked
in
DS
Oct 9, 2014
by
Kathleen
22.8k
views
gate1996
data-structures
binary-search-tree
normal
descriptive
3
votes
2
answers
75
UGC NET CSE | June 2012 | Part 2 | Question: 50
To represent hierarchical relationship between elements, which data structure is suitable? Dequeue Priority Tree All of the above
go_editor
asked
in
DS
Jul 5, 2016
by
go_editor
22.5k
views
data-structures
ugcnetcse-june2012-paper2
tree
easy
64
votes
7
answers
76
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
27
votes
6
answers
77
GATE CSE 2004 | Question: 4, ISRO2009-26
The following numbers are inserted into an empty binary search tree in the given order: $10, 1, 3, 5, 15, 12, 16$. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)? $2$ $3$ $4$ $6$
Kathleen
asked
in
DS
Sep 18, 2014
by
Kathleen
22.5k
views
gatecse-2004
data-structures
binary-search-tree
easy
isro2009
61
votes
11
answers
78
GATE CSE 2015 Set 3 | Question: 26
Consider the following C program #include<stdio.h> int main() { static int a[] = {10, 20, 30, 40, 50}; static int *p[] = {a, a+3, a+4, a+1, a+2}; int **ptr = p; ptr++; printf("%d%d", ptr-p, **ptr); } The output of the program is _______.
go_editor
asked
in
Programming in C
Feb 15, 2015
by
go_editor
22.4k
views
gatecse-2015-set3
programming
programming-in-c
normal
numerical-answers
pointers
77
votes
1
answer
79
GATE CSE 2015 Set 3 | Question: 48
Consider the following C program: #include<stdio.h> int main() { int i, j, k = 0; j=2 * 3 / 4 + 2.0 / 5 + 8 / 5; k-=--j; for (i=0; i<5; i++) { switch(i+k) { case 1: case 2: printf("\n%d", i+k); ... : printf("\n%d", i+k); default: printf("\n%d", i+k); } } return 0; } The number of times printf statement is executed is _______.
go_editor
asked
in
Programming in C
Feb 16, 2015
by
go_editor
22.3k
views
gatecse-2015-set3
programming
programming-in-c
switch-case
normal
numerical-answers
68
votes
5
answers
80
GATE CSE 2017 Set 1 | Question: 55
The output of executing the following C program is _______________ . #include<stdio.h> int total(int v) { static int count = 0; while(v) { count += v&1; v >>= 1; } return count; } void main() { static int x=0; int i=5; for(; i>0; i--) { x = x + total(i); } printf("%d\n", x); }
srestha
asked
in
Programming in C
Feb 14, 2017
by
srestha
22.3k
views
gatecse-2017-set1
programming
programming-in-c
normal
numerical-answers
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