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
1
vote
2
answers
201
Malloc | Free | Dangling Pointer | Prog. & DS
MSQ Consider the following C snippet: #include <stdio.h> int main() { int *ptr = (int*) malloc(100*sizeof(int)); *ptr=33; printf("%d %d\n",ptr,*ptr); // Line X free(ptr); *ptr=37; printf("%d %d\n",ptr,* ... *ptr) is 0 as in Line Y, the allocated heap is freed, and we cannot update it anymore, as ptr is now a dangling pointer
Souvik33
asked
in
Programming in C
Nov 28, 2022
by
Souvik33
630
views
data-structures
pointers
programming-in-c
0
votes
0
answers
202
Consider the following function cosmo(): int cosmo(int n) { for (i = 1; i <= n; i++) { for(i= 1; i <= 1; 1₂++) { for(i=1; i <= 1; iz ++) { **** ( for(i=1;i<= ₁; i++) { } count++; Initially, the value of the variable count is zero. Also assume the variables are declared before use. Then the value returned by the function call cosmo(8) when the value of m is equal to 6, will be
damz1499
asked
in
Programming in C
Nov 11, 2022
by
damz1499
316
views
programming-in-c
0
votes
1
answer
203
Data structures and algorithms
Consider the last four digits of your register number and form the following numbers: 1. first digit 2. second digit 3. third digit 4. fourth digit 5. 2 digit number with the first two digits 6. 2 digit number with the last two digits ... inserted into a hash table whose description is given above and the contents of the table after insertion are to be clearly given.
Karthi2003
asked
in
DS
Nov 7, 2022
by
Karthi2003
491
views
data-structures
hashing
linear-probing
0
votes
3
answers
204
Stacks
The maximum size of the operator stack when converting the following infix to postfix expression a ^ b * c * d + e * f ^ g (assume that “^” has highest precedence and right associativity) and also output the postfix expression.
vivek1211
asked
in
Programming in C
Nov 6, 2022
by
vivek1211
715
views
data-structures
stack
infix-prefix
0
votes
1
answer
205
Ace Test Series Data Structure Q9
Which data structure would be most appropriate to implement a collection of values with the following 3 characteristics Singly link list with head and tail pointer Doubly link list with only head pointer Binary tree Array
Souvik33
asked
in
DS
Nov 2, 2022
by
Souvik33
857
views
data-structures
linked-list
test-series
stack
queue
2
votes
0
answers
206
igate test series
AVL tree is binary search tree with additional property that difference between height of left sub-tree and right sub-tree of any node can’t be more than 1 if n is the number of nodes in a AVL tree . The maximum value of n for which the difference between the minimum height and maximum height of AVL tree is <2 _________ ?
jugnu1337
asked
in
DS
Nov 1, 2022
by
jugnu1337
483
views
i-gate-test-series
programming
binary-search-tree
avl-tree
1
vote
0
answers
207
Ace Academy Test Series Qn#7
A hash function h maps 16-bit inputs to 8 bit hash values. What is the largest k such that in any set of 1000 inputs, there are atleast k inputs that h maps to the same hash value? 3 4 10 64
Souvik33
asked
in
DS
Oct 30, 2022
by
Souvik33
399
views
ace-test-series
data-structures
hashing
pigeonhole-principle
discrete-mathematics
0
votes
0
answers
208
Ace Academy Test Series
A hash function h maps 16-bit inputs to 8 bit hash values. What is the largest k such that in any set of 1000 inputs, there are atleast k inputs that h maps to the same hash value? 3 4 10 64
closed
Souvik33
asked
in
DS
Oct 30, 2022
by
Souvik33
325
views
ace-test-series
data-structures
hashing
pigeonhole-principle
discrete-mathematics
0
votes
1
answer
209
Self-Doubt: Stack Overflow in LinkedList
Can there be “Stack Overflow” in Linked list Implementation of stack? If Yes, how?
Abhrajyoti00
asked
in
DS
Oct 29, 2022
by
Abhrajyoti00
728
views
stack
data-structures
linked-list
–4
votes
2
answers
210
Data Structure- Tree & Graphs
*MSQ* The following figure depicts a a. A tree and only tree b. A tree with 3 nodes c. A graph (Since every tree is a graph) d. A graph and only graph
Souvik33
asked
in
Programming in C
Oct 27, 2022
by
Souvik33
646
views
data-structures
tree
graph-theory
multiple-selects
normal
bad-question
0
votes
0
answers
211
Class P { void f(int i) { print(i); } } Class Q subclass of P { void f(int i) { print(2*i); } } Now consider the following program fragment: P x = new Q(); Q y = new Q(); P z = new Q(); x.f(1); ((P)y).f(1); z.f(1); Here ((P)y) denotes a typecast of y to P. The output produced by executing the above program fragment will be (A) 1 2 1 (B) 2 1 1 (C) 2 1 2 (D) 2 2 2
Jeetmoni saikia
asked
in
Programming in C
Oct 16, 2022
by
Jeetmoni saikia
285
views
programming-in-c
output
normal
0
votes
0
answers
212
made easy test series
Neelu Lalchandani
asked
in
Programming in C
Oct 16, 2022
by
Neelu Lalchandani
349
views
made-easy-test-series
programming-in-c
functions
1
vote
2
answers
213
Ace test series 2023
The return value of ace(4) is int ace(int a) { int x=1; static int k=1; if(a==1) return x; for(;k<a;++k) x=x+ace(k)*ace(a-k); return x; } A.15 B.4 C.10 D.Error
Sazia Tabassum
asked
in
Programming in C
Oct 14, 2022
by
Sazia Tabassum
591
views
ace-test-series
programming-in-c
array
0
votes
1
answer
214
yashwant kanetkar chapter 5 A(F) 18th edition
i dont know why the answer is not coming for the following snippet. I COULD NOT UNDERSTAND EXPLAINATION IN YASHWANT KANETKAR BOOK int main() { float x=1.1; while(x==1.1) { printf(“%f\n”,x); x=x-0.1; } return0; }
SHWETAV SUMAN
asked
in
Programming in C
Oct 14, 2022
by
SHWETAV SUMAN
234
views
programming-in-c
output
reference-book
0
votes
0
answers
215
Consider the following class definitions in a hypothetical Object Oriented language that supports inheritance and uses dynamic binding. The language should not be assumed to be either Java or C++, though the syntax is similar. Class P { void f(int i) { print(i); } } Class Q subclass of P { void f(int i) { print(2*i); } } Now consider the following program fragment: P x = new Q(); Q y = new Q(); P z = new Q(); x.f(1); ((P)y).f(1); z.f(1); Here ((P)y) denotes a typecast of y to P. The output produced by executing the above program fragment will be (A) 1 2 1 (B) 2 1 1 (C) 2 1 2 (D) 2 2 2
Jeetmoni saikia
asked
in
Programming in C
Oct 10, 2022
by
Jeetmoni saikia
566
views
programming
object-oriented-programming
1
vote
0
answers
216
AVL Trees
Given a skew tree what will be the time complexity to balance the tree? What will be the algorithm for this?
Chaitanya Kale
asked
in
Programming in C
Oct 9, 2022
by
Chaitanya Kale
396
views
avl-tree
data-structures
time-complexity
1
vote
1
answer
217
Programming Question
An object whose contents cannot be changed once the object is created is called: (a) Immutable object (b) Mutable object (c) Smart object (d) Rich object
rsansiya111
asked
in
Programming in C
Oct 7, 2022
by
rsansiya111
357
views
java
object-oriented-programming
0
votes
1
answer
218
this similar question was discussed in GO classes C programming video lectures by (sachin mittal sir.)
SHWETAV SUMAN
asked
in
Programming in C
Oct 6, 2022
by
SHWETAV SUMAN
337
views
programming-in-c
0
votes
0
answers
219
Data Structure
Not able to understand the last option.
Overflow04
asked
in
DS
Oct 2, 2022
by
Overflow04
305
views
data-structures
binary-search-tree
made-easy-test-series
0
votes
1
answer
220
Programming
I am getting 5 as output, but the answer is 4, please verify
Overflow04
asked
in
DS
Oct 2, 2022
by
Overflow04
368
views
made-easy-test-series
binary-search-tree
Page:
« prev
1
...
6
7
8
9
10
11
12
13
14
15
16
...
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