Awesome q2a theme
Ask us anything
Toggle navigation
Email or Username
Password
Remember
Login
Register
|
I forgot my password
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Blogs
Previous Year
Exams
Recent questions and answers in Programming
0
votes
0
answers
Applied topic test
" if we assume uniform hashing, what is the probability that a collision will occur in a hash table with 100 buckets and 2 keys?" Doesn't this question means that we have a hash table in which there are already 2 keys, and we have ... probability of collision for the next insertion? Or it is asking the probability of collision in the table for these two keys insertion?
asked
2 days
ago
in
Programming
by
Ankita87077
(
9
points)
|
11
views
hashing
0
votes
1
answer
TEST series :TESTBOOK
answered
3 days
ago
in
Programming
by
zxy123
(
2.9k
points)
|
24
views
test
0
votes
0
answers
Book: Gate Overflow Question no. 4.7.20 in the Programming in C section
asked
5 days
ago
in
Programming
by
hadarsh
(
5
points)
|
13
views
pointers
programming
0
votes
0
answers
tifr previous year self doubt loop invariant
https://gateoverflow.in/19251/tifr2010-b-37 by counter example like for a= 2 and b =1 the loop does not terminate thus remaining options are A and D. But I'm having problem getting D as answer my answer is A as at any random example say a ... *b , so I go with Option A. considering this comment of the.brahmin.guy how it is not terminating using a=2 nd b
asked
Jan 8
in
Programming
by
eyeamgj
(
25
points)
|
16
views
selfdoubt
+1
vote
0
answers
Made easy Topicwise DS
"Consider the following array of elements <40, 35, 20, 10, 15, 16, 17, 8, 4, 30>. The minimum number of interchanges needed to convert it into a min-heap is _________ using built heap method." I am getting 7.
asked
Jan 6
in
Programming
by
anurags228
(
23
points)
|
23
views
heap
binary-tree
data-structures
0
votes
0
answers
Made Easy Topic Wise DS
The number of min heap trees are possible with 15 distinct elements such that every leaf node must be greater than all non-leaf nodes of the tree are ________. According to me, the answer should be 80* 8! The given answer is different.
asked
Jan 6
in
Programming
by
anurags228
(
23
points)
|
38
views
binary-tree
data-structures
+2
votes
0
answers
https://gateoverflow.in/204076 gate 2008 question on structure
asked
Jan 4
in
Programming
by
jainanmol123
(
13
points)
|
19
views
selfdoubt
0
votes
1
answer
TGA Material
Code: #include <stdio.h> #define TOTAL_ELEMENTS(sizeof(array))/sizeof(array[0]) int array[ ]={23,34,17,204,99,16}; int main() { int d; printf("%d",TOTAL_ELEMENTS); for (d=-1;d<=(TOTAL_ELEMENTS - 2);d++) printf ("%d",array[d+1]); return 0; } What is the output of the above code?
answered
Dec 31, 2020
in
Programming
by
wander
(
287
points)
|
27
views
arrays
0
votes
1
answer
The Gate Academy Material
Q. What does the following program do when the input is unsigned 16-bit integer? #include<stdio.h> main() { unsigned int num; int i; scanf("%u",&num); for(i=0;i<16;i++) { printf("%d.",(num << i&1 <<15 ... all even bits from num (B) it prints all odd bits from num (C) it prints binary equivalent of num (D) none of the above
answered
Dec 31, 2020
in
Programming
by
wander
(
287
points)
|
15
views
selfdoubt
0
votes
0
answers
TGA material
Q. What does the following program do when the input is unsigned 16-bit integer? #include<stdio.h> main() { unsigned int num; int i; scanf("%u",&num); for(i=0;i<16;i++) { printf("%d.",(num << i&1 <<15)?1:0 ... it prints all even bits from num (B) it prints all odd bits from num (C) it prints binary equivalent of num (D) none of the above
asked
Dec 30, 2020
in
Programming
by
Enolx.21
(
25
points)
|
9
views
programming
+1
vote
1
answer
TGA material
For the code: int z,x=5,y=-10,a=4,b=2; z=x++---y*b/a; The value of z will be_______
answered
Dec 29, 2020
in
Programming
by
zxy123
(
2.9k
points)
|
25
views
infix-prefix
0
votes
1
answer
What would be the output of following program and why?
answered
Dec 29, 2020
in
Programming
by
zxy123
(
2.9k
points)
|
29
views
programming
0
votes
0
answers
data structures and algorithm analysis in java by mark allen weiss
asked
Dec 27, 2020
in
Programming
by
emankamal
(
5
points)
|
16
views
trees
+1
vote
1
answer
GATE2005-1, ISRO2017-55 Video Solution
What does the following C-statement declare? int (*f) (int * ); A function that takes an integer pointer as argument and returns an integer A function that takes an integer as argument and returns an integer pointer A pointer ... pointer as argument and returns an integer A function that takes an integer pointer as argument and returns a function pointer
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
13
views
gate2005
programming
programming-in-c
easy
isro2017
video-solution
+1
vote
1
answer
GATE2016-1-15 Video Solution
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); print f("%d\n", a); } The output of the program is _________.
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
17
views
gate2016-1
programming-in-c
easy
numerical-answers
video-solution
0
votes
1
answer
GATE2017-2-14 Video Solution
Consider the following function implemented in C: void printxy(int x, int y) { int *ptr; x=0; ptr=&x; y=*ptr; *ptr=1; printf(“%d, %d”, x, y); } The output of invoking $printxy(1,1)$ is: $0, 0$ $0, 1$ $1, 0$ $1, 1$
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
12
views
gate2017-2
programming-in-c
programming
video-solution
+1
vote
1
answer
GATE2016-2-12 Video Solution
The value printed by the following program is _______. void f (int * p, int m) { m = m + 5; *p = *p + m; return; } void main () { int i=5, j=10; f (&i, j); print f ("%d", i+j); }
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
12
views
gate2016-2
programming-in-c
normal
numerical-answers
video-solution
+1
vote
1
answer
GATE2010-11 Video Solution
What does the following program print? #include<stdio.h> void f(int *p, int *q) { p=q; *p=2; } int i=0, j=1; int main() { f(&i, &j); printf("%d %d\n", i,j); return 0; } $2 \ 2$ $2 \ 1$ $0 \ 1$ $0 \ 2$
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
13
views
gate2010
programming
programming-in-c
easy
video-solution
+1
vote
1
answer
GATE2019-53 Video Solution
Consider the following C program: #include <stdio.h> int main() { int a[] = {2, 4, 6, 8, 10}; int i, sum=0, *b=a+4; for (i=0; i<5; i++) sum=sum+(*b-i)-*(b-i); printf("%d\n", sum); return 0; } The output of the above C program is _______
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
14
views
gate2019
numerical-answers
programming-in-c
programming
video-solution
+1
vote
1
answer
GATE2015-3-26 Video Solution
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 _______.
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
10
views
gate2015-3
programming
programming-in-c
normal
numerical-answers
video-solution
+1
vote
1
answer
GATE2006-IT-51 Video Solution
Which one of the choices given below would be printed when the following program is executed? #include <stdio.h> int a1[] = {6, 7, 8, 18, 34, 67}; int a2[] = {23, 56, 28, 29}; int a3[] = {-12, 27, -31}; int *x[] = {a1, a2, a3}; void print(int *a[]) { printf("%d, ... (x); } $8, -12, 7, 23, 8$ $8, 8, 7, 23, 7$ $-12, -12, 27, -31, 23$ $-12, -12, 27, -31, 56$
answered
Dec 27, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
15
views
gate2006-it
programming
programming-in-c
normal
video-solution
+1
vote
1
answer
GATE2015-3-7 Video Solution
Consider the following C program segment. # include <stdio.h> int main() { char s1[7] = "1234", *p; p = s1 + 2; *p = '0'; printf("%s", s1); } What will be printed by the program? $12$ $120400$ $1204$ $1034$
answered
Dec 26, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
18
views
gate2015-3
programming
programming-in-c
normal
video-solution
+1
vote
1
answer
GATE2011-22 Video Solution
What does the following fragment of C program print? char c[] = "GATE2011"; char *p = c; printf("%s", p + p[3] - p[1]); $GATE2011$ $E2011$ $2011$ $011$
answered
Dec 26, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
15
views
gate2011
programming
programming-in-c
normal
video-solution
+1
vote
1
answer
GATE2006-IT-49 Video Solution
Which one of the choices given below would be printed when the following program is executed ? #include <stdio.h> struct test { int i; char *c; }st[] = {5, "become", 4, "better", 6, "jungle", 8, "ancestor", 7, " ... $\text{etter, u, 6, ungle}$ $\text{cetter, k, 6, jungle}$ $\text{etter, u, 8, ncestor}$
answered
Dec 26, 2020
in
Programming
by
amitkhurana512
(
35
points)
|
15
views
gate2006-it
programming
programming-in-c
normal
video-solution
0
votes
0
answers
Pre increment and post increment
int main() { int x=8,y=1; while(x>=y) { x=--x-x--; y=--y-y++; } printf("%d %d",y,x); what is the output?? please give detail solution.
asked
Dec 26, 2020
in
Programming
by
Manasi_123
(
5
points)
|
10
views
selfdoubt
0
votes
0
answers
PREVIOUS YEAR STATIC and GLOBAL SCOPE
https://gateoverflow.in/89082/gate1989-8b WHAT IS CORRECT ANSWER PLEASE SEE…. I M GETTING 0
asked
Dec 25, 2020
in
Programming
by
eyeamgj
(
25
points)
|
13
views
compiler-design
0
votes
0
answers
#self doubt on c programming
c+ = p&1; //c and p are integers How the above statement is executed..either c= (c+p)&1 or c= c+(p&1).
asked
Dec 18, 2020
in
Programming
by
BHOJARAM
(
13
points)
|
6
views
data-structures
0
votes
0
answers
introduction to Arrays section from geeksforgeeks
Is it possible to declare any array of below type? // declare an array of user specified size int n = 10; int arr2[n];
asked
Dec 16, 2020
in
Programming
by
suryavasu1012
(
9
points)
|
11
views
arrays
0
votes
0
answers
TESTSERIES-ME
I am getting 48 as a answer! please clear whether the given answer is correct or there is any mistake?
asked
Dec 6, 2020
in
Programming
by
Sinchit
(
17
points)
|
48
views
data-structures
0
votes
1
answer
C- Programming Question on Pointers
What will be the output of the following program? #include "stdio.h" int main() { char a[] = { 'P', 'Q', 'R', 'S' }; char* p = &a[0]; *p++; printf("%c ", *++p); } According to my solution As we know that ... answer comes out to be Q , but when I ran the program, then it showed my R as the output. Can someone please help me with this?
answered
Dec 2, 2020
in
Programming
by
zxy123
(
2.9k
points)
|
38
views
programming
pointers
arrays
+1
vote
1
answer
Made Easy Test Series 2021
Which of the following conditions is/are not equivalent to the condition (!((x>=y)&&(y>=z)))? a)(!(x>=z)) b)(x<=z) c)((x<y)&&(y<z)) d)((x<y)||(y<z))
answered
Nov 30, 2020
in
Programming
by
kalin
(
153
points)
|
30
views
cprogramming
+1
vote
1
answer
NIELIT NIC STA 2020 set-C ques 80
Given array is {1,2,4,3}. Bubble sort is used to sort it. How many passes will be done to sort the array? 4 2 1 3 Answer given is 3 but I am getting 2. Need to confirm before challenging the key :)
answered
Nov 26, 2020
in
Programming
by
zxy123
(
2.9k
points)
|
34
views
sorting
+1
vote
1
answer
NIELIT NIC STA 2020 set-C ques63
A recursive problem like tower of hanoi can be rewritten without recursion using: stack priority queue graph cycle They are saying without recursion. What this means? Recursion is done using stack, so shouldn’t we eliminate option A?
answered
Nov 26, 2020
in
Programming
by
zxy123
(
2.9k
points)
|
26
views
recursion
0
votes
1
answer
Made Easy Test
Can someone explain how to find the complexity of this code( in a detailed way)
answered
Nov 22, 2020
in
Programming
by
kalin
(
153
points)
|
23
views
programming
+1
vote
2
answers
#made-easy-test-series
consider the below function mystery(a,b) { if(a<0 or b<0) return 0; else if (a==0) return b+1; else if(b==0) return mystery(a-1,1); else return mystery(a-1,mystery(a,b-1)); } what would be the value of mystery(3,3)? ans is 61.I am not able to solve it in less time.can someone explain how to solve such type of questions?
answered
Nov 17, 2020
in
Programming
by
kalin
(
153
points)
|
60
views
programming
0
votes
1
answer
#made-easy-test-series
which of the following relationship holds in general between the scope of a variable and the lifetime of a variable(in a language like c)? a)the scope of a variable is contained in the lifetime of the variable b)the scope of a variable is same as the ... c)the scope of a variable is disjoint from the scope of the variable d)none of the above ans is a.can someone explain?
answered
Nov 17, 2020
in
Programming
by
zxy123
(
2.9k
points)
|
29
views
programming
+1
vote
1
answer
Gate 2007 IT
Consider the standard implementation of a queue, all functions have their usual meanings. My doubt here is - we are deleting the front and then recursively calling the function again till the queue becomes. So we the last element will remain, we will delete it and ... empty queue, so in the next time the condition will become false, then how the insert(Q,i) statement will get executed?
answered
Nov 17, 2020
in
Programming
by
zxy123
(
2.9k
points)
|
22
views
datastructures
0
votes
0
answers
Gate cs 2007
struct CellNode { struct CellNode *leftChild; int element; struct CellNode *rightChild; }; int Getvalue (struct CellNode *ptr) { int value = 0; if (ptr != NULL) { if ((ptr->leftChild == NULL) && (ptr->rightChild == NULL)) value = 1; else value ... will be the value of val 0 or 1(I think we still are taking 0 based on the answer) P.S. trying to getting better at recursion
asked
Nov 17, 2020
in
Programming
by
Abhineet Singh
(
23
points)
|
15
views
datastructures
+1
vote
2
answers
Self doubt:Programming
#include <stdio.h> int main(void) { int b=-1,a=-2; while(+(+b--)!=1){ b-=a++; } printf("%d",b); return 0; } What will be output of this code? I thought output should be 1, but getting no output. Plz tell me why no output here?
answered
Nov 15, 2020
in
Programming
by
_sajalrai_
(
563
points)
|
48
views
programming
selfdoubt
0
votes
0
answers
#made-easy #binary-search-tree
select the correct statements .binary search trees(regardless of the order in which values are inserted into the tree). a)always have multiple links per node b)can be sorted efficiently c)always have the same shape for a particular set of data d)are non linear data structures ans is a,b,d can someone explain a,b part?
asked
Nov 15, 2020
in
Programming
by
404 found
(
31
points)
|
25
views
data-structures
To see more, click for all the
questions in this category
.
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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users
2021 Jan 11 - 17
zxy123
450 Points
Abhisheksmile94
78 Points
kalin
60 Points
donniedarko
16 Points
Abhineet Singh
8 Points
Allica
8 Points
Shaik Masthan
8 Points
Enolx.21
6 Points
Sahil91
6 Points
aditi19
6 Points
Weekly Top User (excluding moderators) will get free access to
GATE Overflow Test Series for GATE 2021
Recent Posts
New GATEOverflow PDFs
Guidelines to users
No Recent Blog Comments
Recent questions and answers in Programming
8,957
questions
3,118
answers
14,337
comments
95,787
users