Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged array
1
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
67
views
piyush512
asked
5 days
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
79
views
Debargha Mitra Roy
asked
Apr 16
Programming in C
array
data-structures
programming-in-c
+
–
7
votes
1
answer
3
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 16
Consider the following C code: double A[2][3] = {{1, 2, 3}, {4, 5, 6}}; Assume that A[0] = 0xFFAA0000 and the sizeof(double) is 8. What will be the value of `A[1]`? 0xFFAA0024 0xFFAA0003 0xFFAA000C 0xFFAA0018
Consider the following C code:double A [3] = {{1, 2, 3}, {4, 5, 6}};Assume that A[0] = 0xFFAA0000 and the sizeof(double) is 8.What will be the value of A ?0xFFAA00240x...
GO Classes
592
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
programming
programming-in-c
array
1-mark
+
–
1
votes
1
answer
4
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
290
views
Mrityudoot
asked
Feb 2
Programming in C
memory-management
programming-in-c
array
+
–
1
votes
1
answer
5
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
176
views
Mrityudoot
asked
Feb 2
Programming in C
array
programming-in-c
+
–
3
votes
1
answer
6
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 47
#include<stdio.h> #include<string.h> char upstr[50]; void putStar (int n,char str[]){ upstr[n] = str[n]; if(n == strlen(str)) return; else upstr[n+1] = '*'; putStar(n+1,str); } int main() { char str[] = " ... , upstr); } What will be the output of the given program? h*e*l*l*o h*e*l*l*o* h*e*l*l* hello
#include<stdio.h #include<string.h char upstr[50]; void putStar (int n,char str[]){ upstr[n] = str[n]; if(n == strlen(str)) return; else upstr[n+1] = '*'; putStar(n+1,str...
GO Classes
343
views
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
array
2-marks
+
–
6
votes
1
answer
7
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 14
What will be the output of the following program? main() { int a[2][2] = { {1,2},{3,4} }; int(*p)[2][2]; p = &a; printf("%d", (*p)[0][0]); } $1$ $3$ $4$ None of these
What will be the output of the following program?main() { int a = { {1,2},{3,4} }; int(*p) ; p = &a; printf("%d", (*p)[0][0]); }$1$$3$$4$None of these
GO Classes
445
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
array
output
1-mark
+
–
3
votes
3
answers
8
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
375
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
array
array-of-pointers
2-marks
+
–
1
votes
1
answer
9
UGC NET CSE | June 2008 | Part 2 | Question: 23
Which of the following is true for a sorted list with ' $n$ ... $\mathrm{O}(\log n)$ time.
Which of the following is true for a sorted list with ' $n$ ' elements?Insertion in a sorted array takes constant time.Insertion in a sorted linear linked list takes cons...
admin
151
views
admin
asked
Jan 6
Others
ugcnetcse-june2008-paper2
sorting
array
time-complexity
+
–
1
votes
1
answer
10
3 Dimensional Array
How is the address written for 3-dimensional arrays? In some answers, I saw (row, column, frame) and in others, it was (frame, row, column) Which one to follow?? Also, how are these arrays stored in the memory?? Please answer
How is the address written for 3-dimensional arrays?In some answers, I saw (row, column, frame) and in others, it was (frame, row, column) Which one to follow??Also, how ...
amitarp818
426
views
amitarp818
asked
Oct 25, 2023
Programming in C
programming-in-c
array
+
–
2
votes
1
answer
11
Made Easy Test Series
You are given an array of elements where each array element represents the MAXIMUM number of jumps that can be made in the forward direction from that element. Now, consider the following array: {1, 3, 5, 8, 9, 2, 6, 7, 6). What is the minimum number of jumps required to reach the end of the array?
You are given an array of elements where each array element represents the MAXIMUM number of jumps that can be made in the forward direction from that element. Now, consi...
Ray Tomlinson
878
views
Ray Tomlinson
asked
Aug 9, 2023
Algorithms
made-easy-test-series
made-easy-booklet
algorithms
data-structures
array
algorithm-design
+
–
2
votes
1
answer
12
Arrays || C Programming
# include <stdio.h> void print(int arr[]) { int n = sizeof(arr)/sizeof(arr[0]); int i; for (i = 0; i < n; i++) printf("%d ", arr[i]); } int main() { int arr[] = {1, 2, 3, 4, 5, 6, 7, 8}; print(arr); return 0; } On GFG output is 1 2 I can’t understand the solution. Help would be appreciated!!
# include <stdio.h void print(int arr[]){ int n = sizeof(arr)/sizeof(arr[0]); int i; for (i = 0; i < n; i++) printf("%d ", arr[i]);} int main(){ int arr[] = ...
Sparsh-NJ
1.2k
views
Sparsh-NJ
asked
Jul 29, 2023
Programming in C
array
programming-in-c
+
–
1
votes
1
answer
13
Arrays, Storage classes
Can an array store elements of different storage classes?
Can an array store elements of different storage classes?
Sparsh-NJ
388
views
Sparsh-NJ
asked
Jul 15, 2023
Programming in C
array
storage-classes-in-c
+
–
1
votes
1
answer
14
made easy workbook
Anmol pratap singh
605
views
Anmol pratap singh
asked
Jul 8, 2023
DS
made-easy-booklet
array
+
–
3
votes
2
answers
15
In QuickSort algorithm, which of the following statements is NOT true regarding the partition process?
In QuickSort algorithm, which of the following statements is NOT true regarding the partition process?a) Partition always divides the array into two non-empty subsets.b) ...
dhruba
1.0k
views
dhruba
asked
Jun 5, 2023
Algorithms
algorithms
quick-sort
time-complexity
array
+
–
0
votes
1
answer
16
DRDO INTERVIEW..
We have stored an element after a few elements in an array, where the array size is unknown, then find the position of in array.
We have stored an element after a few elements in an array, where the array size is unknown, then find the position of in array.
Saurabhgate2024
481
views
Saurabhgate2024
asked
May 14, 2023
Programming in C
programming
array
+
–
4
votes
2
answers
17
GO Classes 2023 | IIITH Mock Test 1 | Question: 8
If we have an array of size $\mathrm{N}$ with only $3$ different values for its elements, what is the probability that the first partition results in a completely sorted array? Assume there are an equal number of each element in the array. $1 / 2$ $1 / 3$ $1 / 4$ $2 / 3$
If we have an array of size $\mathrm{N}$ with only $3$ different values for its elements, what is the probability that the first partition results in a completely sorted ...
GO Classes
888
views
GO Classes
asked
Mar 26, 2023
Algorithms
goclasses2023-iiith-mock-1
goclasses
algorithms
sorting
array
1-mark
+
–
1
votes
1
answer
18
GO Classes 2023 | IIITH Mock Test 1 | Question: 15
In an array-based implementation of a Heap, the right-child of the right-child of the node at index $i,$ if it exists, can be found at what array location? Index of the array starts from $1.$ $4i + 3$ $2i + 1$ $4i + 1$ $2i + 2$
In an array-based implementation of a Heap, the right-child of the right-child of the node at index $i,$ if it exists, can be found at what array location? Index of the a...
GO Classes
975
views
GO Classes
asked
Mar 26, 2023
DS
goclasses2023-iiith-mock-1
goclasses
data-structures
array
binary-heap
1-mark
+
–
1
votes
1
answer
19
Array P&DS | Time Complexity
What is the worst case time complexity of an efficient algorithm (in order of n) to get the last index for an actually filled element, in an array, given the condition that we may not fill the entire initialized array with elements, the array is initialized as “int a[n]; ” [Array may not be filled in a sorted order] O(n) O(1) O(log(n)) O($n^2$)
What is the worst case time complexity of an efficient algorithm (in order of n) to get the last index for an actually filled element, in an array, given the condition th...
Souvik33
680
views
Souvik33
asked
Dec 17, 2022
DS
algorithms
time-complexity
array
+
–
0
votes
1
answer
20
Algorithms
What is the logic applied here.
What is the logic applied here.
Overflow04
515
views
Overflow04
asked
Oct 20, 2022
Algorithms
algorithms
test-series
array
+
–
1
votes
2
answers
21
Ace test series 2023
The return value of ace(4) is int ace(int a) { int x=1; static int k=1; if(a==1) return x; for(;k<a;++k) x=x+ace(k)*ace(a-k); return x; } A.15 B.4 C.10 D.Error
The return value of ace(4) is int ace(int a) { int x=1; static int k=1; if(a==1) return x; for(;k<a;++k) x=x+ace(k)*ace(a-k); return x; }A.15B.4C.10D.Error
Sazia Tabassum
601
views
Sazia Tabassum
asked
Oct 14, 2022
Programming in C
ace-test-series
programming-in-c
array
+
–
Page:
1
2
3
4
5
6
...
10
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register