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
4
votes
1
answer
31
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 42
The provided C code is a version of the C string library function strlen(), which calculates the length of a given string. unsigned int mystrlen(char *c) { unsigned int i = 0; /* Your code here. */ } Which line of code creates a working and ... != '\0') i++; return i; while (*(c + i) != '\0') ++i; return i;
The provided C code is a version of the C string library function strlen(), which calculates the length of a given string.unsigned int mystrlen(char *c) { unsigned in...
GO Classes
431
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
programming
programming-in-c
strings
multiple-selects
2-marks
+
–
4
votes
1
answer
32
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 43
What will be the output of the following C program? #include <stdio.h> void Mickey(int**, int, int); void Mouse(int, int*); int main() { int a = 2, b = 3, c = 4; int *points = &a; Mickey(&points, b, c); printf("%d", ... x; *p = **points+1; Mouse(z, p); return; } void Mouse(int z, int *p) { *p = *p+1; return; }
What will be the output of the following C program?#include <stdio.h>void Mickey(int , int, int);void Mouse(int, int*);int main(){ int a = 2, b = 3, c = 4; int *poi...
GO Classes
429
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
numerical-answers
programming
programming-in-c
functions
2-marks
+
–
5
votes
2
answers
33
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 44
Let $B$ be a binary search tree (BST) with eight nodes filled with the following set of eight integer keys $A=\{10,2,5,3,20,15,9,22\}$. The order in which these keys were inserted to create $B$ is not known. However ... are required to verify if all eight keys of $A$ are present in $B$. How many leaf nodes are present in B?
Let $B$ be a binary search tree (BST) with eight nodes filled with the following set of eight integer keys $A=\{10,2,5,3,20,15,9,22\}$. The order in which these keys were...
GO Classes
506
views
GO Classes
asked
Feb 5
DS
goclasses2024-mockgate-14
numerical-answers
data-structures
binary-search-tree
2-marks
+
–
7
votes
1
answer
34
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 45
Consider a stack whose elements are unsigned integers and support the following operations: PUSH a: Pushes the element 'a' onto the stack. ADD: Adds the two topmost elements, removes them, and pushes the result. SQR: ... once, count it as many times as it is used. Your final count should include initial 3 PUSH instructions.
Consider a stack whose elements are unsigned integers and support the following operations:PUSH a: Pushes the element 'a' onto the stack.ADD: Adds the two topmost element...
GO Classes
549
views
GO Classes
asked
Feb 5
DS
goclasses2024-mockgate-14
numerical-answers
data-structures
stack
2-marks
+
–
4
votes
1
answer
35
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 54
Consider the following pseudocode procedure. Which of the following best describes procedure mystery? It returns a list of numbers from 1 to $n$. It prints every third number from 1 to $n$. It returns the sum of the numbers from 1 to $\mathrm{n}$. It returns the sum of the multiples of 3 from 1 to $n$.
Consider the following pseudocode procedure.Which of the following best describes procedure mystery?It returns a list of numbers from 1 to $n$.It prints every third numbe...
GO Classes
250
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
programming
programming-in-c
functions
2-marks
+
–
0
votes
0
answers
36
Memory Based GATE DA 2024 | Question: 20
Consider the following Python code: S[1] = [1] x = [6, 3, 5, 4, 10] for i in range(2, len(x)): S[i] = [1] if x[i - 1]
Consider the following Python code:S = x = [6, 3, 5, 4, 10]for i in range(2, len(x)): S[i] = if x[i - 1]
GO Classes
118
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
0
votes
0
answers
37
Memory Based GATE DA 2024 | Question: 21
What does the following Python code do? \begin{verbatim} def fun(D, S_1, S_2): if S_1 < S_2: D[S_1], D[S_2] = D[S_2], D[S_1] fun(D, S_1 + 1, S_2 - 1) \end{verbatim}
What does the following Python code do?\begin{verbatim}def fun(D, S_1, S_2): if S_1 < S_2: D[S_1], D[S_2] = D[S_2], D[S_1] fun(D, S_1...
GO Classes
105
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
2
votes
2
answers
38
Memory Based GATE DA 2024 | Question: 23
Consider a binary tree. Among the following traversal combinations, which of them can uniquely construct the tree? Inorder + Preorder Preorder + Postorder Only Inorder Inorder + Postorder
Consider a binary tree. Among the following traversal combinations, which of them can uniquely construct the tree?Inorder + PreorderPreorder + PostorderOnly InorderInorde...
GO Classes
343
views
GO Classes
asked
Feb 4
DS
gate2024-da-memory-based
goclasses
data-structures
binary-tree
tree-traversal
+
–
0
votes
1
answer
39
Memory Based GATE DA 2024 | Question: 24
Consider a doubly linked list with the following operations: - Insert First (\texttt{InsertFirst}) \\ - Insert Last (\texttt{InsertLast}) \\ - Remove First (\texttt{RemoveFirst}) \\ - Remove Last (\texttt{RemoveLast}) The following operations are ... \ & a = \text{RemoveLast} \end{aligned} \] What is the value of \(a\) after these operations?
Consider a doubly linked list with the following operations:- Insert First (\texttt{InsertFirst})\\- Insert Last (\texttt{InsertLast})\\- Remove First (\texttt{RemoveFirs...
GO Classes
223
views
GO Classes
asked
Feb 4
DS
gate2024-da-memory-based
goclasses
data-structures
linked-list
numerical-answers
+
–
0
votes
1
answer
40
Memory Based GATE DA 2024 | Question: 40
Match the following: $ \begin{array}{|p{0.3\linewidth}|p{0.6\linewidth}|} \hline \textbf{Technique} & \textbf{Characteristic} \\ \hline FIFO & (ii) Queue \\ \hline Look Up & (i) Hash Table\\ \hline LIFO & (iii) Stack \\ \hline \end{array} $
Match the following:$$\begin{array}{|p{0.3\linewidth}|p{0.6\linewidth}|} \hline \textbf{Technique} & \textbf{Characteristic} \\ \hline FIFO & ...
GO Classes
194
views
GO Classes
asked
Feb 4
DS
gate2024-da-memory-based
goclasses
data-structures
stack
+
–
0
votes
0
answers
41
Memory Based GATE DA 2024 | Question: 49
Consider the following Python code: def countchildren(l, i): Some code Given lists if i > 2: return 1 ans = 1 for i in l.keys(): ans = ans + countchildren(l,i) return ans Example usage l = dict() l[1] = [2, 3] l[2] = [3, 4, 5] l[3] = [6, 7, 8] result = countchildren(l,1) print(result)
Consider the following Python code:def countchildren(l, i): Some code Given lists if i 2: return 1 ans = 1 for i in l.k...
GO Classes
118
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
0
votes
0
answers
42
Memory Based GATE DA 2024 | Question: 55
Data Structure question: Binary tree question having four options involving no of internal nodes, leaf nodes, height etc.
Data Structure question: Binary tree question having four options involving no of internal nodes, leaf nodes, height etc.
GO Classes
219
views
GO Classes
asked
Feb 4
DS
gate2024-da-memory-based
goclasses
data-structures
binary-tree
+
–
1
votes
1
answer
43
Array, Memory Allocation
In what cases does an uninitialized array have values = 0 and for which cases does it have values = garbage values. How to differentiate?
In what cases does an uninitialized array have values = 0 and for which cases does it have values = garbage values. How to differentiate?
Mrityudoot
289
views
Mrityudoot
asked
Feb 2
Programming in C
memory-management
programming-in-c
array
+
–
1
votes
1
answer
44
Array
Does C support fractional Indices? float x = some fraction; Is float a[x] valid declaration?
Does C support fractional Indices?float x = some fraction;Is float a[x] valid declaration?
Mrityudoot
175
views
Mrityudoot
asked
Feb 2
Programming in C
array
programming-in-c
+
–
6
votes
1
answer
45
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 16
Suppose we constructed the binary search tree shown by starting with an empty tree and inserting one element at a time from an input sequence, without any rotations or other manipulations. Which of the following assertions about the order of elements in ... $29$ came before $42.$ $3$ came before $14$ and $16$ came before $28.$
Suppose we constructed the binary search tree shown by starting with an empty tree and inserting one element at a time from an input sequence, without any rotations or ot...
GO Classes
469
views
GO Classes
asked
Jan 28
DS
goclasses2024-mockgate-13
goclasses
data-structures
binary-search-tree
1-mark
+
–
3
votes
1
answer
46
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 17
Suppose that a binary min-heap stores six elements with priorities $10,20,30,40,50$, and $60$ in its array $\text{A}.$ What is the largest of these items that could be stored in $\text{A}[2]?$ (indexing starts from zero)
Suppose that a binary min-heap stores six elements with priorities $10,20,30,40,50$, and $60$ in its array $\text{A}.$ What is the largest of these items that could be st...
GO Classes
505
views
GO Classes
asked
Jan 28
DS
goclasses2024-mockgate-13
goclasses
numerical-answers
data-structures
binary-heap
1-mark
+
–
5
votes
1
answer
47
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 18
What will be output printed by the following program? #include<stdio.h> main() { int c=4; switch(c) { c=c-1; case 4: printf("IITB "); break; default: printf("IISc "); case 3: printf("IITM "); case ... ;IITD"); } } $\text{IITB IITM}$ $\text{IITB IISc IITM}$ $\text{IITB}$ $\text{IITB IITM IITD}$
What will be output printed by the following program?#include<stdio.h main() { int c=4; switch(c) { c=c-1; case 4: printf("IITB ")...
GO Classes
408
views
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
output
1-mark
+
–
4
votes
0
answers
48
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 19
What will be the output of the following program? #include <stdio.h> int main() { int a[2][2] = { {1, 2}, {3, 4} }; int (*p)[2][2]; p = &a; printf("%d", (*p)[0][1]); return 0; } $1$ $2$ $3$ $4$
What will be the output of the following program?#include <stdio.h int main() { int a = { {1, 2}, {3, 4} }; int (*p) ; p = &a; printf("%d", (*p)[0] ); return 0; }$1$$2...
GO Classes
330
views
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
array-of-pointers
1-mark
+
–
3
votes
1
answer
49
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 36
Let $\mathrm{T}$ be the smallest AVL tree of height $h$. How many nodes does it have, if the smallest AVL tree of height $h-2$ has $m$ nodes and the smallest AVL tree of height $h-3$ has $k$ nodes? $m+k+2$ $m+2 k$ $2 m+k$ $2 m+k+2$
Let $\mathrm{T}$ be the smallest AVL tree of height $h$. How many nodes does it have, if the smallest AVL tree of height $h-2$ has $m$ nodes and the smallest AVL tree of ...
GO Classes
389
views
GO Classes
asked
Jan 28
DS
goclasses2024-mockgate-13
goclasses
data-structures
avl-tree
2-marks
+
–
4
votes
2
answers
50
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 37
Consider the null-terminated linked list of four integers $\textsf{1->2->3->4->NULL},$ and the variable 'list' points to the head of the linked list. Upon running the provided code, the linked list gets divided ... X:list->next->next>next = list->next>next; LINE Y: list = list->next->next;
Consider the null-terminated linked list of four integers $\textsf{1->2->3->4->NULL},$ and the variable 'list' points to the head of the linked list. Upon running the pro...
GO Classes
452
views
GO Classes
asked
Jan 28
DS
goclasses2024-mockgate-13
goclasses
data-structures
linked-list
2-marks
+
–
Page:
« prev
1
2
3
4
5
6
7
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register