Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
No answer
No selected answer
No upvoted answer
Previous GATE
Featured
Questions without an upvoted answer in Programming and DS
0
votes
0
answers
1
Arrays
Consider an integer upper triangular 2D array arr[–8 to +7][–8 to +7] having base address 1000. If the size of the integer is 4 bytes, the address of the element present at location arr[–6][4] is- ____________.
Consider an integer upper triangular 2D array arr[–8 to +7][–8 to +7] having base address 1000. If the size of the integer is 4 bytes, the address of the element pres...
piyush512
7
views
piyush512
asked
2 hours
ago
DS
array
data-structures
+
–
0
votes
1
answer
2
C Programming - Arrays & Pointer (NAT)
#include <stdio.h> int main() { int a[3][2] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; } (Assume size of int to be $2$ bytes.) The output is __________.
#include <stdio.h int main() { int a[3] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; }(Assume size of int to be $2$ bytes.)T...
Debargha Mitra Roy
51
views
Debargha Mitra Roy
asked
3 days
ago
Programming in C
array
data-structures
programming-in-c
+
–
0
votes
0
answers
3
Bitwise Operator - C Programming
Problem Statement: Class teacher to IX-C wants to store whether a particular student has passed in exams. The class has a strength of $32$ students. Their roll numbers lie in the range: $[1, 32]$. The teacher used bits of an integer to store ... Bitwise OR (|) operator and count number of set bits d. Apply Bitwise AND (&) operator and count number of set bits
Problem Statement: Class teacher to IX-C wants to store whether a particular student has passed in exams. The class has a strength of $32$ students. Their roll numbers li...
Debargha Mitra Roy
117
views
Debargha Mitra Roy
asked
Apr 12
Programming in C
programming-in-c
operator-precedence
boolean-algebra
+
–
1
votes
0
answers
4
GATE CSE SET-1 2024
My question is that can we use command line arguments without use of main function's parameters argc and *argv?
My question is that can we use command line arguments without use of main function's parameters argc and *argv?
RahulVerma3
144
views
RahulVerma3
asked
Mar 22
Programming in C
programming-in-c
programming
+
–
0
votes
0
answers
5
GATE 2024 CSE1
I have a question that can we use command line arguments without main function arguments? int main(int argc, char **argv){ }
I have a question that can we use command line arguments without main function arguments?int main(int argc, char argv){}
RahulVerma3
142
views
RahulVerma3
asked
Mar 16
Programming in C
gatecse2024-set1
programming-in-c
+
–
0
votes
1
answer
6
class question self doubt
#include<stdio.h> #include<conio.h> int main(){ int a[][3]={ {4,14,24},{5,15,25},{6,16,26}}; int *p[3]; int **ptr=p; p[0]=a; p[1]=a+1; p[2]=a+2; ++*p; ++p[0]; ++**ptr; ++*p[0]; ++ptr; ++*ptr; --*p[1]; --*ptr; ++ptr; --p[ ... ("\n%d,%d,%d",a[0][2],a[1][1],a[2][0]); printf("\n%d,%d,%d",*p[0],*p[1],*p[2]); } what is the output of above program
#include<stdio.h>#include<conio.h>int main(){ int a[][3]={ {4,14,24},{5,15,25},{6,16,26}}; int *p[3]; int ptr=p; p[0]=a; p =a+1; p =a+2; ++*p; ...
Emankashyap
187
views
Emankashyap
asked
Mar 1
1
votes
0
answers
7
I have purchased the IIIT Hyderabad 2024 test series but i can't find the test series anywhere
Khushbu Chaudhary
104
views
Khushbu Chaudhary
asked
Feb 25
0
votes
1
answer
8
s.balaguruswami
Find the error of the following IP addresses. If the IP is valid, check its Class and determine whether the address is Unicast or Multicast. i) 237.15.2.1 ii) 256.1.8.9 iii) 114.34.2.8 iv) 255.254.0.1 v) 8.8.8.8
Find the error of the following IP addresses. If the IP is valid, check its Class and determine whether the address is Unicast or Multicast.i) 237.15.2.1ii) 256.1.8.9iii)...
Sheikh Rafi
104
views
Sheikh Rafi
asked
Feb 24
1
votes
1
answer
9
GATE DS&AI 2024 | Question: 11
Consider performing uniform hashing on an open address hash table with load factor $\alpha=\frac{n}{m}<1$, where $n$ elements are stored in the table with $m$ slots. The expected number of probes in an unsuccessful search is at most $\frac{1}{1-\alpha}$. Inserting ... $\frac{1}{1-\alpha}$ $1+\frac{\alpha}{2}$ $\frac{1}{1+\alpha}$
Consider performing uniform hashing on an open address hash table with load factor $\alpha=\frac{n}{m}<1$, where $n$ elements are stored in the table wi...
Arjun
790
views
Arjun
asked
Feb 16
DS
gate-ds-ai-2024
data-structures
hashing
uniform-hashing
+
–
0
votes
1
answer
10
GATE DS&AI 2024 | Question: 28
Consider the following Python code: def count(child_dict, i): if i not in child_dict.keys(): return 1 ans $=1$ for $j$ in child_dict[i]: ans $+=$ count (child_dict, j) return ans child_dict $=$ dict () child_dict $[0]=[1,2]$ child_dict $[1]=[3,4,5]$ ... $)$ ) Which ONE of the following is the output of this code? $6$ $1$ $8$ $9$
Consider the following Python code:def count(child_dict, i):if i not in child_dict.keys():return 1ans $=1$for $j$ in child_dict[i]:ans $+=$ count (child_dict,...
Arjun
832
views
Arjun
asked
Feb 16
Programming in Python
gate-ds-ai-2024
programming
+
–
1
votes
1
answer
11
GATE CSE 2024 | Set 2 | Question: 38
Let $\mathrm{S} 1$ and $\mathrm{S} 2$ be two stacks. $\mathrm{S} 1$ has capacity of $4$ elements. $\mathrm{S} 2$ has capacity of $2$ elements. $\text{S1}$ already has $4$ elements: $100,200,300$, and $400$ ... output sequences can be generated by using the above operations? $100,200,400,300$ $200,300,400,100$ $400,200,100,300$ $300,200,400,100$
Let $\mathrm{S} 1$ and $\mathrm{S} 2$ be two stacks. $\mathrm{S} 1$ has capacity of $4$ elements. $\mathrm{S} 2$ has capacity of $2$ elements. $\text{S1}$ ...
Arjun
2.0k
views
Arjun
asked
Feb 16
DS
gatecse2024-set2
data-structures
stack
multiple-selects
+
–
3
votes
3
answers
12
GATE CSE 2024 | Set 1 | Question: 8
Consider the following $\mathrm{C}$ program: #include <stdio.h> int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; } Which one of the following ... The program prints $9$ as output The program prints $10$ as output The program gets stuck in an infinite loop The program prints $6$ as output
Consider the following $\mathrm{C}$ program:#include <stdio.h int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; }Whi...
Arjun
6.0k
views
Arjun
asked
Feb 16
Programming in C
gatecse2024-set1
programming
programming-in-c
+
–
4
votes
1
answer
13
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
421
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
numerical-answers
programming
programming-in-c
functions
2-marks
+
–
0
votes
0
answers
14
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
115
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
0
votes
0
answers
15
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
101
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
2
votes
2
answers
16
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
334
views
GO Classes
asked
Feb 4
DS
gate2024-da-memory-based
goclasses
data-structures
binary-tree
tree-traversal
+
–
0
votes
0
answers
17
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
116
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
0
votes
0
answers
18
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
216
views
GO Classes
asked
Feb 4
DS
gate2024-da-memory-based
goclasses
data-structures
binary-tree
+
–
1
votes
1
answer
19
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
166
views
Mrityudoot
asked
Feb 2
Programming in C
array
programming-in-c
+
–
4
votes
0
answers
20
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
329
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
21
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
381
views
GO Classes
asked
Jan 28
DS
goclasses2024-mockgate-13
goclasses
data-structures
avl-tree
2-marks
+
–
2
votes
1
answer
22
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 4
What are the sequence of popped-out values if the sequence of operations - $\textsf{push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop}$ are performed on a stack? $2, 2, 1, 1, 2$ $2, 2, 1, 1, 1$ $2, 1, 2, 2, 1$ $2, 1, 2, 2, 2$
What are the sequence of popped-out values if the sequence of operations - $\textsf{push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop}$ are performed o...
GO Classes
340
views
GO Classes
asked
Jan 21
DS
goclasses2024-mockgate-12
goclasses
data-structures
stack
1-mark
easy
+
–
2
votes
4
answers
23
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
349
views
malaviya_parth
asked
Jan 15
Programming in C
programming-in-c
bad-question
+
–
3
votes
3
answers
24
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
0
answers
25
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
+
–
0
votes
0
answers
26
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
27
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
+
–
0
votes
2
answers
28
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
29
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
30
#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
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register