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
Recent questions in Programming and DS
14
votes
3
answers
151
GATE CSE 2023 | Question: 2
Which one of the following sequences when stored in an array at locations $A[1], \ldots, A[10]$ forms a max-heap? $23,17,10,6,13,14,1,5,7,12$ $23,17,14,7,13,10,1,5,6,12$ $23,17,14,6,13,10,1,5,7,15$ $23,14,17,1,10,13,16,12,7,5$
admin
asked
in
DS
Feb 15, 2023
by
admin
6.5k
views
gatecse-2023
data-structures
binary-heap
1-mark
8
votes
2
answers
152
GATE CSE 2023 | Question: 3
Let $\textsf{SLLdel}$ be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let $\textsf{DLLdel}$ be another function that deletes a node in a doubly-linked list given a pointer to the node ... $\textsf{DLLdel}$ are $O(1)$ $\textsf{SLLdel}$ is $O(n)$ and $\textsf{DLLdel}$ is $O(1)$
admin
asked
in
DS
Feb 15, 2023
by
admin
10.3k
views
gatecse-2023
data-structures
linked-list
1-mark
18
votes
3
answers
153
GATE CSE 2023 | Question: 25
The integer value printed by the $\textsf{ANSI-C}$ program given below is _______________ #include<stdio.h> int funcp(){ static int x = 1; x++; return x; } int main(){ int x,y; x = funcp(); y = funcp()+x; printf("%d\n", (x+y)); return 0; }
admin
asked
in
Programming in C
Feb 15, 2023
by
admin
10.6k
views
gatecse-2023
programming
programming-in-c
output
numerical-answers
1-mark
7
votes
3
answers
154
GATE CSE 2023 | Question: 36
Let $A$ be a priority queue for maintaining a set of elements. Suppose $A$ is implemented using a max-heap data structure. The operation $\text{EXTRACT-MAX} (A)$ extracts and deletes the maximum element from $A$. The operation $\operatorname{INSERT}(A, key )$ inserts a new ... $O(1)$ whereas $\operatorname{INSERT}(A, k e y)$ runs in $O(\log (n))$.
admin
asked
in
DS
Feb 15, 2023
by
admin
6.1k
views
gatecse-2023
data-structures
priority-queue
time-complexity
heap
2-marks
8
votes
2
answers
155
GATE CSE 2023 | Question: 37
Consider the $\text{C}$ function $\text{foo}$ and the binary tree shown. typedef struct node { int val; struct node *left, *right; } node; int foo(node *p) { int retval; if (p == NULL) return 0; else { retval = p->val + foo(p->left) + foo(p->right); printf("%d ", ... $3 \;5\; 8\; 10\; 11\; 13$ $3 \;8 \;16 \;13\; 24\; 50$ $3\; 16\; 8\; 50\; 24\; 13$
admin
asked
in
DS
Feb 15, 2023
by
admin
6.6k
views
gatecse-2023
data-structures
binary-tree
2-marks
6
votes
3
answers
156
GATE CSE 2023 | Question: 49
Consider a sequence $a$ of elements $a_{0}=1, a_{1}=5, a_{2}=7, a_{3}=8, a_{4}=9$, and $a_{5}=2$. The following operations are performed on a stack $S$ and a queue $Q,$ both of which are initially empty. $\textsf{push}$ the ... $S$. $\textsf{pop}$ an element from $S$. The top element of $S$ after executing the above operations is ______________.
admin
asked
in
DS
Feb 15, 2023
by
admin
6.6k
views
gatecse-2023
data-structures
stack
numerical-answers
2-marks
easy
2
votes
1
answer
157
GATE CSE 2023 | Memory Based Question: 41
Which one of the following sequences when stored in an array at locations A[1],...,A[10] forms a max-heap? $23\; 17\; 10\; 6\; 13\; 14\; 1\; 5 \;9 \;12$ $23 \;14 \;19 \;1 \;10 \;13 \;16 \;12 \;7 \;5$ $23 \;17\; 14\; 6\; 13\; 10\; 1\; 5\; 7\; 15$ $23 \;17\; 14\; 7\; 13\; 10\; 1\; 5\; 6\; 12$
closed
GO Classes
asked
in
DS
Feb 5, 2023
by
GO Classes
4.8k
views
memorybased-gatecse2023
goclasses
data-structures
binary-heap
1
vote
1
answer
158
ISRO CS 2018
#include <stdio.h> int main() { int i,j,x; scanf("%d ",x); i=1; j=1; while(i<10){ j=j*i; i=i+1; if(i==x) break; } return 0; }
Rakshita Jadoun
asked
in
Programming in C
Feb 4, 2023
by
Rakshita Jadoun
609
views
isro2018
programming-in-c
0
votes
1
answer
159
#madeeasy
is it ok to mark both and at least option in the case of MSQ, on my view in this question first option will always be true so marking the second is correct?
Dknights
asked
in
Programming in C
Feb 1, 2023
by
Dknights
394
views
programming-in-c
made-easy-test-series
query
3
votes
1
answer
160
Made Easy test series
answer given is 33
TusharKumar
asked
in
Programming in C
Jan 31, 2023
by
TusharKumar
525
views
programming-in-c
output
made-easy-test-series
0
votes
1
answer
161
#selfdoubt
how many topological sort possible for above graph?directions like this question https://gateoverflow.in/39669/gate-cse-2016-set-1-question-11
Dknights
asked
in
Programming in C
Jan 30, 2023
by
Dknights
428
views
programming
topological-sort
directed-acyclic-graph
0
votes
1
answer
162
Programming and Data Structure | Static int | Made Easy Test series (Modified)
Consider the following C code snippets, labeled as P1, P2 and P3, the output of P1 is X , of P2 is Y and of P3 as Z . What is the value of X+Y+Z P1 #include <stdio.h> int f(int n) { static int r=40; if (n==0 | ... 1,r)-r; } else return f(n-1,r)+(2*r); } int main() { printf("%d",f(6,40)); return 0; }
Souvik33
asked
in
Programming in C
Jan 29, 2023
by
Souvik33
452
views
data-structures
programming-in-c
1
vote
1
answer
163
TestBook testSeries board game question
Consider a board game in consist of m n grid. A coin is located at the top-left corner of an m n grid. The coin can only move either down or right at any point in time. The ultimate goal of the game places the coin at the bottom-right corner of the grid. ... path(m-1, n) + path(m, n-1); } Find the number of unique paths if grid order is 5 4. 38 25 35 28
Sahil_Lather
asked
in
Programming in C
Jan 28, 2023
by
Sahil_Lather
371
views
data-structures
programming-in-c
dynamic-programming
0
votes
0
answers
164
TestBook TestSeries BFS Question to find 4th enqueue element
Consider the following graph. If BFS is implemented on the following graph where the root node is 1 then which of the following set of the nodes are present in the queue after performing 4th enqueue operation? 3, 4, 5 4, 6, 5 3, 4 4, 5, 6
Sahil_Lather
asked
in
Programming in C
Jan 28, 2023
by
Sahil_Lather
307
views
data-structures
graph-algorithm
0
votes
0
answers
165
TestBook testseries TLB and C programming combined question
Consider the following C function executed in an OS with paging where the page size is 4 kilobytes. Further, assume that the system employs a 32-entry direct mapped TLB. int *alloc_and_init() { int counter, value=0, size=2048; int ... of the program, what is the number of TLB misses during the execution of the for loop? 0 1 2048 2
Sahil_Lather
asked
in
Programming in C
Jan 28, 2023
by
Sahil_Lather
210
views
operating-system
programming-in-c
data-structures
pointers
0
votes
1
answer
166
TestBook testseries linkedList question
What does the following routine do on doubly linked list. M is some middle node address and N is a newly inserted node address. N → lptr = M ; N → rtptr = M → rptr ; N → lptr → rptr = N ; N → rptr → lptr = N ; Inserts a node to Right of M Left of M Right Most Left Most
Sahil_Lather
asked
in
DS
Jan 28, 2023
by
Sahil_Lather
785
views
data-structures
linked-list
0
votes
1
answer
167
Programming
Someone please explain. Function of ‘^’
Overflow04
asked
in
Programming in C
Jan 24, 2023
by
Overflow04
274
views
programming-in-c
made-easy-test-series
0
votes
0
answers
168
Made Easy
can anyone help me how to approach these type of questions..? And also please attach link of similar questions if possible . thanks in advance
TusharKumar
asked
in
Programming in C
Jan 24, 2023
by
TusharKumar
289
views
0
votes
2
answers
169
Programming and ds
How many number of add and remove operations are required to access 26th element of a queue of 50 elements,so that the original queue remains the same after the access is Note:-Direct accessing through the index is not included.
Sourin Kundu
asked
in
Programming in C
Jan 23, 2023
by
Sourin Kundu
404
views
programming-in-c
0
votes
1
answer
170
Ace Test series |C programming | What will be the output of the following program ?
What will be the output of the following program ? answer is 8 but I am getting 5, please explain where I am wrong
abhinowKatore
asked
in
Programming in C
Jan 18, 2023
by
abhinowKatore
874
views
programming-in-c
recursion
Page:
« prev
1
...
3
4
5
6
7
8
9
10
11
12
13
...
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 questions in Programming and DS
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