Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Recent questions in Programming and DS
2
votes
1
answer
61
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 31
How many binary trees with $3$ nodes, $\text{A, B},$ and $\text{C}$ when traversed in post-order will give the sequence $\text{A, B, C}?$ (It is NOT a search tree)
How many binary trees with $3$ nodes, $\text{A, B},$ and $\text{C}$ when traversed in post-order will give the sequence $\text{A, B, C}?$ (It is NOT a search tree)
GO Classes
444
views
GO Classes
asked
Jan 21
DS
goclasses2024-mockgate-12
goclasses
numerical-answers
data-structures
binary-tree
tree-traversal
2-marks
+
–
4
votes
2
answers
62
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 32
The in-order traversal of a binary tree is $\textsf{HFIEJGZ},$ and the post-order traversal of the same tree is $\textsf{HIFJZGE}.$ What will be the total number of nodes in the left sub-tree of the given tree? (It is NOT a search tree)
The in-order traversal of a binary tree is $\textsf{HFIEJGZ},$ and the post-order traversal of the same tree is $\textsf{HIFJZGE}.$ What will be the total number of nodes...
GO Classes
407
views
GO Classes
asked
Jan 21
DS
goclasses2024-mockgate-12
goclasses
numerical-answers
data-structures
binary-tree
tree-traversal
2-marks
+
–
0
votes
3
answers
63
Made Easy Test Series
In a max heap of n elements, the time complexity to find 10th largest element is: a)Θ(n log n) b)Θ(n) c)Θ(1) d)Θ(log n) I personally think it should be Θ(n), as the 10th largest element can be anywhere in the heap, all the elements need to be traversed once to decide that.
In a max heap of n elements, the time complexity to find 10th largest element is:a)Θ(n log n)b)Θ(n)c)Θ(1)d)Θ(log n) I personally think it should be Θ(n), as the 10th...
Mrityudoot
256
views
Mrityudoot
asked
Jan 20
DS
made-easy-test-series
data-structures
+
–
2
votes
4
answers
64
Increment operator
#include <stdio.h> int main() { int a = 5, b; a = ++a + a++ + ++a; printf("%d",a); return 0; } What will be the output of the code?
#include <stdio.h int main() { int a = 5, b; a = ++a + a++ + ++a; printf("%d",a); return 0; }What will be the output of the code?
malaviya_parth
348
views
malaviya_parth
asked
Jan 15
Programming in C
programming-in-c
bad-question
+
–
4
votes
2
answers
65
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 21
Consider the following two blocks of code, found in separate files: /* main.c */ int main() { int i=0; foo(); return 0; } /* foo.c */ int i=1; void foo() { printf( %d , i); } What will happen when you attempt to ... ? It will fail to compile. It will fail to link. It will print " $0$ ". It will print " $1$ ".
Consider the following two blocks of code, found in separate files:/* main.c */ int main() { int i=0; foo(); return 0; }/* foo.c */ int i=1; void foo() { printf(“%d”,...
GO Classes
922
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
recursion
1-mark
+
–
1
votes
1
answer
66
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 22
What will the following print: int a, b, c, *d; a = 0; b = 1 ; c = 2 ; d = & a; (*d) += b+c; d = & b; (*d) += a+b+c ; printf("a= %i b=%i\n", a, b); $a=0, b=3$ $a=3, b=3$ $a=3, b=4$ $a=3, b=7$
What will the following print:int a, b, c, *d; a = 0; b = 1 ; c = 2 ; d = & a; (*d) += b+c; d = & b; (*d) += a+b+c ; printf("a= %i b=%i\n", a, b);$a=0, b=3$$a=3, b=3$$a=3...
GO Classes
413
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
pointers
1-mark
+
–
6
votes
1
answer
67
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 23
What will be the output on the execution of the following code segment? main() { unsigned num1=-1; signed num2=1; if(num1 < num2) printf("less"); else if(num1>num2) printf("greater"); else if(num1==num2) printf("equal"); } greater less equal error
What will be the output on the execution of the following code segment?main() { unsigned num1=-1; signed num2=1; if(num1 < num2) printf("less"); else if(num1>num2) printf...
GO Classes
511
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
output
1-mark
+
–
3
votes
3
answers
68
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 47
What will be the output of the following program? #include<stdio.h> void swap(char **s1, char **s2){ char *tmp; tmp=*s1; *s1=*s2; *s2=tmp; } int main() { char *str[3]= {"orange", "apple", ... %s %s", strs[0], strs[1], strs[2]); } pear apple orange apple pear orange orange apple pear apple orange pea
What will be the output of the following program?#include<stdio.h void swap(char s1, char s2){ char *tmp; tmp=*s1; *s1=*s2; *s2=tmp; } int main() { char *str[3]= {"oran...
GO Classes
366
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
array
array-of-pointers
2-marks
+
–
6
votes
1
answer
69
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 48
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to? int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n==0) return 1; return g(n-1) + f(n); }
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to?int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n...
GO Classes
427
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
numerical-answers
programming
programming-in-c
recursion
2-marks
+
–
6
votes
0
answers
70
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 52
Consider the following binary heap – Suppose the last operation you performed in the binary heap above was inserting the key $x$. What are the possible values of $x?$ $20$ $8$ $13$ $11$
Consider the following binary heap –Suppose the last operation you performed in the binary heap above was inserting the key $x$.What are the possible values of $x?$$20$...
GO Classes
529
views
GO Classes
asked
Jan 13
DS
goclasses2024-mockgate-11
goclasses
data-structures
binary-heap
multiple-selects
2-marks
+
–
2
votes
1
answer
71
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 53
Consider the linked list initially having values $1, 2, 2, 8, 6, 2, 2,$ and let the head be the pointer to the first node of the linked list. Which of the following options correctly represents the final linked list after the function call ... LinkedList will be $1, 8, 6$ Final LinkedList will be $1, 8, 6, 2, 2$ None of the above
Consider the linked list initially having values $1, 2, 2, 8, 6, 2, 2,$ and let the head be the pointer to the first node of the linked list.Which of the following option...
GO Classes
349
views
GO Classes
asked
Jan 13
DS
goclasses2024-mockgate-11
goclasses
data-structures
linked-list
2-marks
+
–
0
votes
0
answers
72
Objects First with Java™: A Practical Introduction Using BlueJ
Write a program in BlueJ Q4. Draw Class Diagram and Object Diagram from the below given Details. public class University { private Student stdob; private Faculty fctob; }
Write a program in BlueJQ4. Draw Class Diagram and Object Diagram from the below given Details. public class University{ private Student stdob; private Faculty ...
Ebrahim
80
views
Ebrahim
asked
Jan 12
Programming in C
java
+
–
0
votes
1
answer
73
Made easy Test series
Can you please explain the whole working of the code
Can you please explain the whole working of the code
Rohit Chakraborty
119
views
Rohit Chakraborty
asked
Jan 11
Programming in C
made-easy-test-series
programming
+
–
1
votes
1
answer
74
Programming
Which of the following is TRUE? A Scope of static variable is within the body of function where it is declared. B Same variable can be declared multiple times within the same function only if it is extern storage class. C Malloc always returns base address of block of memory allocated. D None of the above This is a multiple select question
Which of the following is TRUE?A Scope of static variable is within the body of function where it is declared.B Same variable can be declared multiple times within the sa...
practicalmetal
196
views
practicalmetal
asked
Jan 9
Programming in C
programming-in-c
made-easy-test-series
+
–
0
votes
1
answer
75
ISRO 2024
From a character string of lenth $m$, the number of sub-strings of all lengths that can be formed are: $m^2$ $m$ $m(m+1)/2$ $m(\log m)$
From a character string of lenth $m$, the number of sub-strings of all lengths that can be formed are:$m^2$$m$$m(m+1)/2$$m(\log m)$
Ramayya
183
views
Ramayya
asked
Jan 7
DS
data-structures
+
–
1
votes
3
answers
76
ISRO 2024
In a priority queue, insertion and deletion can be done at Front back Middle Any position
In a priority queue, insertion and deletion can be done atFrontbackMiddleAny position
Ramayya
465
views
Ramayya
asked
Jan 7
DS
isro-2024
priority-queue
data-structures
+
–
1
votes
2
answers
77
ISRO 2024
Pointer p to an array of integers (of size 2 Bytes) is initialized to 200. What is the value of p+3? 206 203 212 204
Pointer p to an array of integers (of size 2 Bytes) is initialized to 200. What is the value of p+3?206203212204
Ramayya
389
views
Ramayya
asked
Jan 7
Programming in C
isro-2024
array-of-pointers
easy
+
–
0
votes
2
answers
78
ISRO 2024
What is the maximum number of comparisons needed to sort 6 items using radix sort, if each number is a 3-digit decimal number? 120 180 210 360
What is the maximum number of comparisons needed to sort 6 items using radix sort, if each number is a 3-digit decimal number?120180210360
Ramayya
485
views
Ramayya
asked
Jan 7
DS
isro-2024
radix-sort
data-structures
+
–
0
votes
0
answers
79
ISRO 2024
In Reeverse Polish notation, expression A*B+C*D is written as AB*CD*+ A*BCD*+ AB*CD+* A*B*CD+ A request to the approver.!! This question is asked in ISRO 2024. Due to insufficient points, couldn’t add ‘isro2024’ tag, Please add it.
In Reeverse Polish notation, expression A*B+C*D is written asAB*CD*+A*BCD*+AB*CD+*A*B*CD+A request to the approver.!!This question is asked in ISRO 2024. Due to insuffici...
Ramayya
140
views
Ramayya
asked
Jan 7
DS
isro-2024
data-structures
+
–
0
votes
0
answers
80
#Float Data Type
#include <iostream> using namespace std; int main() { float a,b,c; cout<<"Enter a="; cin>>a; b=a + (1-1); cout<<"a + (1-1)="<<b<<endl; c=(a+1)-1; cout<<" (a+1)-1="<<c; getchar(); } Here is a is till 1E-7 c gives us a value .but after a= 1E-8 c gives us 0 can you explain how float data type is working here
#include <iostream>using namespace std;int main(){ float a,b,c; cout<<"Enter a="; cin>>a; b=a + (1-1); cout<<"a + (1-1)="<<b<<endl; c=(a+1)-1; cout<...
Rajib Datta Roy
181
views
Rajib Datta Roy
asked
Dec 26, 2023
Programming in C
programming-in-c
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register