Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged array
7
7 votes
1
1 answer
341
341 views
GO Classes DPP | GATE CS | Data Structures | Array vs Linked List
A sequence of $n$ elements is implemented in two ways:As a normal array with contiguous memory and no extra empty slot. As a singly linked list with only a $\texttt{head}...
GO Classes
341
views
asked
Jul 3
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-313
data-structures
goclasses-ds-practice-questions
array
linked-list
multiple-selects
+
–
2
2 votes
3
3 answers
180
180 views
GO Classes DPP | GATE DA | Python & DSA | List Shuffle
A function $\texttt{shuffle(s)}$ takes a sequence $\texttt{s}$ with an even number of elements. It returns a new list by interleaving the first half of $\texttt{s}$ with ...
GO Classes
180
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
array
list
output
+
–
2
2 votes
3
3 answers
149
149 views
GO Classes DPP | GATE DA | Python & DSA | Extend Append
Consider the following Python code:s = [3] s.extend([4, 5]) s.extend([s.append(9), s.append(10)]) print(s)What is the output of the code above?[3, 4, 5, 9, 10][3, 4, 5, N...
GO Classes
149
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
array
output
+
–
2
2 votes
3
3 answers
155
155 views
GO Classes DPP | GATE DA | Python & DSA | Alias Slice
Consider the following Python code:s = [9, 7, 8] a, b = s, s[:] print(a is s, b == s, b is s) print(a.pop()) print(a + b)What is the output of the code above?True True Tr...
GO Classes
155
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
array
+
–
5
5 votes
2
2 answers
288
288 views
GO Classes DPP | GATE CS | C Programming | Structure Assignment
What is the output of the following code?#include <stdio.h struct Book { char name[4]; int pages; }; int main() { struct Book b1 = {"CAT", 50}; struct Book b2; b2 = b1; b...
GO Classes
288
views
asked
Jun 30
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-310
programming-in-c
c-programming
goclasses-c-programming-practice-questions
structure
array
+
–
5
5 votes
2
2 answers
296
296 views
GO Classes DPP | GATE CS | C Programming | Array of Structures
What is the output of the following code?#include <stdio.h struct Student { int roll; int marks; }; int main() { struct Student s[3] = { {1, 70}, {2, 80}, {3, 90} }; s .m...
GO Classes
296
views
asked
Jun 29
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-309
programming-in-c
c-programming
goclasses-c-programming-practice-questions
array
structure
+
–
6
6 votes
1
1 answer
222
222 views
GO Classes DPP | GATE CS | C Programming | String Pointer Update
What is the output of the following code?#include <stdio.h int main() { char str[] = "CODE"; char *p = str; p++; *p = 'A'; printf("%s %c", str, *(p + 2)); return 0; }$\te...
GO Classes
222
views
asked
Jun 23
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-305
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
6
6 votes
1
1 answer
200
200 views
GO Classes DPP | GATE CS | C Programming | String Indexing
What is the output of the following code?#include <stdio.h int main() { char str[] = "GATE"; char *p = str; printf("%c %c %s", str , *(p + 2), p + 1); return 0; }$\texttt...
GO Classes
200
views
asked
Jun 23
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-305
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
6
6 votes
1
1 answer
185
185 views
GO Classes DPP | GATE CS | C Programming | Array Name Not Assignable
What will happen when the following code is compiled?#include <stdio.h int main() { int a[] = {10, 20, 30}; a = a + 1; printf("%d", *a); return 0; }$\texttt{10}$ $\texttt...
GO Classes
185
views
asked
Jun 23
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-305
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
5
5 votes
1
1 answer
182
182 views
GO Classes DPP | GATE CS | C Programming | Invalid Pointer Addition
Consider the following declarations:#include <stdio.h int main() { int a[4] = {6, 4, 1, 2}; int b[8] = {9, 8, 11, 10, 5, 7, 0, 3}; int *p = &a ; int *q = b; printf("%p", ...
GO Classes
182
views
asked
Jun 23
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-305
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
7
7 votes
2
2 answers
229
229 views
GO Classes DPP | GATE CS | C Programming | Array Pointer Expression
What is the output of the following code?#include <stdio.h int main() { int a[] = {5, 10, 15, 20}; int *p = a + 1; printf("%d %d %td", *(p + 1), p , (p + 2) - a); return ...
GO Classes
229
views
asked
Jun 23
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-305
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
8
8 votes
2
2 answers
262
262 views
GO Classes DPP | GATE CS | C Programming | Pointer Indexing
What is the output of the following code?#include <stdio.h int main() { int a[] = {2, 4, 6, 8, 10}; int *p = a + 2; printf("%d %d %td", p[-1], 1[p], p - a); return 0; }$\...
GO Classes
262
views
asked
Jun 22
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-304
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
7
7 votes
3
3 answers
232
232 views
GO Classes DPP | GATE CS | C Programming | Pointer Difference
What is the output of the following code?#include <stdio.h int main() { int a[4] = {6, 4, 1, 2}; int b[8] = {9, 8, 11, 10, 5, 7, 0, 3}; int *p = &a ; int *q = b; int *r =...
GO Classes
232
views
asked
Jun 22
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-304
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
7
7 votes
2
2 answers
227
227 views
GO Classes DPP | GATE CS | C Programming | Shifted Pointer
What is the output of the following code?#include <stdio.h int main() { int a[] = {3, 6, 9, 12, 15}; int *p = a + 1; printf("%d %d %td", *p, *(p + 2), p - a); return 0; }...
GO Classes
227
views
asked
Jun 22
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-304
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
7
7 votes
2
2 answers
237
237 views
GO Classes DPP | GATE CS | C Programming | Same Address
What is the output of the following code?#include <stdio.h int main() { int a[10] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; int *b = a + 4; int *c = &(a[4]); printf("%d...
GO Classes
237
views
asked
Jun 22
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-304
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
7
7 votes
2
2 answers
278
278 views
GO Classes DPP | GATE CS | C Programming | Array Expression
What is the output of the following code?#include <stdio.h int main() { int a[] = {2, 4, 6, 8, 10}; printf("%d %d %d", *a, *(a + 3), 3[a]); return 0; }$\texttt{2 6 8}$ $\...
GO Classes
278
views
asked
Jun 22
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-304
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
array
+
–
5
5 votes
2
2 answers
281
281 views
GO Classes DPP | GATE CS | C Programming | Loop Control
What is the output of the following code?#include <stdio.h int main() { int a[5] = {2, 4, 1, 3, 5}; int i, sum = 0; for (i = 0; i < 5; i++) { if (a[i] % 2 == 0) sum = sum...
GO Classes
281
views
asked
Jun 5
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-289
programming-in-c
c-programming
goclasses-c-programming-practice-questions
array
loop
+
–
2
2 votes
1
1 answer
597
597 views
PW Data Structures Test series 2026
Solution for above question Given : 1076My Solution: 1094My approch:PUSH 50 element from index 99, pos at 49.POP 8 elements, pos at 58.PUSH 10 elemnts, pos at 47.1000+47*...
Vyshakh_Nambiar
597
views
asked
Dec 24, 2025
Programming in C
data-structures
array
+
–
5
5 votes
3
answers
3 answers
624
624 views
Array, accessing array, C programming
Should this question be invalid? t[4] Mentions 4 elements, but question assigns 5 elements.Because according to my knowledge accessing element t[4] (if we consider index ...
Vyshakh_Nambiar
624
views
asked
Dec 8, 2025
Programming in C
programming-in-c
array
programming
+
–
0
0 votes
1
1 answer
301
301 views
Algorithms doubt
You were given an array of distinct elements of size n with indices starting from 0.-Every $(2i)^{th}$ element is pushed into a stack.-Every $(2i+1)^{th}$ element is enqu...
vishnusainune
301
views
asked
Dec 3, 2025
Algorithms
algorithms
time-complexity
stack
queue
data-structures
array
self-doubt
+
–
0
0 votes
0
0 answers
445
445 views
2 d array
#include<stdio.h int main() { int a[] = {{1, 2},{ 3, 4}}; int i, j; int *p[] = { a, a+1, a+2}; for(i=0; i<2; i++) for(j=0; j<2; j++) printf("%d, %d, %d, %d\n", *(*(p+i)+...
ASUR
445
views
asked
Oct 16, 2025
Programming in C
programming-in-c
normal
array
+
–
1
1 vote
2
2 answers
525
525 views
UGC NET CSE | June 2025 | Part 2 | Question: 13
What would be the equivalent pointer expression for referring the array element $\operatorname{ar}[\mathrm{m}][\mathrm{n}][\mathrm{o}]$$^* (^* (^* (\operatorname{ar})+\ma...
Shubham Sharma 2
525
views
asked
Sep 10, 2025
Programming in C
ugcnetcse-june2025
programming-in-c
array
pointers
+
–
1
1 vote
2
2 answers
374
374 views
UGC NET CSE | August 2024 | Part 2 | Question: 5
#include<stdio.h void main() { int arr[]={1, 2, 3, 4, 5}; int *p=arr; printf("%d", *p++); printf("%d", *(p+1)); }Find the output of the above code?$1,2$$1,3$$2,3$$1,4$
Shubham Sharma 2
374
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
pointers
array
output
+
–
0
0 votes
1
1 answer
335
335 views
UGC NET CSE | August 2024 | Part 2 | Question: 19
Consider following C program :#include<stdio.h int main() { int x[]={2,4,6,8,10}; int a, b=0, * y = x+4; for(a = 0; a<5; a++) { b=b+(*y -a) - *(y -a); } printf("%d\n", b)...
Shubham Sharma 2
335
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
pointers
array
output
+
–
0
0 votes
1
1 answer
252
252 views
UGC NET CSE | August 2024 | Part 2 | Question: 21
What will be the output of the following $\text{C}$ code?#include<stdio.h void main() { int arr[5]={10,20,30,40,50}; int *p = (int*) (&arr+1); printf("\%d\%d", *(arr + 1)...
Shubham Sharma 2
252
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
array
pointers
output
+
–
0
0 votes
1
1 answer
332
332 views
UGC NET CSE | December 2023 | Part 2 | Question: 78
Consider the following code segment:int arr [] = {0,1,2,3,4}; int i=1, *ptr; ptr = arr + 2;arrange the following printf statements in the increasing order of their output...
Shubham Sharma 2
332
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-dec2023
programming-in-c
pointers
array
+
–
1
1 vote
1
1 answer
391
391 views
CMI CS 2025 | Part B | Question: 6c
We have an array $A$ of $n$ numbers, where $n$ is a power of $2$.We build a full binary tree on top of the array $A.$ The elements of the array are leaves of the tree, nu...
jothee_new
391
views
asked
Sep 8, 2025
Data Structures
cmi2025
data-structures
array
binary-tree
time-complexity
algorithms
descriptive
+
–
1
1 vote
1
1 answer
292
292 views
CMI CS 2025 | Part B | Question: 6b
We have an array $A$ of $n$ numbers, where $n$ is a power of $2$.We build a full binary tree on top of the array $A.$ The elements of the array are leaves of the tree, nu...
jothee_new
292
views
asked
Sep 8, 2025
Data Structures
cmi2025
data-structures
array
binary-tree
time-complexity
algorithms
descriptive
+
–
2
2 votes
1
1 answer
386
386 views
CMI Data Science 2025 | Part A | Question: 2
The two arguments to the function $\textsf{foo(A, n)}$ in the code below are: $\text{(i)}$ an integer array $\textsf{A}$ indexed from $0$, and $\text{(ii)}$ the number $\...
Shubham Sharma 2
386
views
asked
Jun 20, 2025
Algorithms
cmi2025-datascience
programming-in-c
array
multiple-selects
+
–
2
2 votes
1
1 answer
281
281 views
CMI Data Science 2025 | Part A | Question: 18
The two arguments to the function $\textsf{Mystery(A, n)}$ in the code below are: $\text{(i)}$ an integer array $\textsf{A}$ indexed from $0$, and $\text{(ii)}$ the numbe...
Shubham Sharma 2
281
views
asked
Jun 20, 2025
Algorithms
cmi2025-datascience
programming
array
+
–
Page:
1
2
3
4
5
6
...
14
next »