Arrays · Data Structures · GATE CSE
Start PracticeMarks 1
GATE CSE 2021 Set 1
Let P be an array containing n integers. Let t be the lowest upper bound on the number of comparisons of the array elements, required to find the mini...
GATE CSE 2020
Consider the following C program.
#include < stdio.h >
int main () {
int a [4] [5] = {{1, 2, 3, 4, 5},
{6, 7, 8, ...
GATE CSE 2005
A program P reads in 500 integers in the range [0, 100] representing the cores of 500 students. It then print the frequency of each score above 50. Wh...
GATE CSE 2004
A single array A[1..MAXSIZE] is used to implement two stacks, The two stacks grow from opposite ends of the array. Variables top1 and top2 (top1 < ...
GATE CSE 2000
An n $$\times$$ n array v is defined as follows V [i, j] = i - j for all i, j, $$1 \le i \le n,\,1 \le j \le n$$ The sum of the elements of the array ...
GATE CSE 2000
Suppose you are given an array s[1..n] and a procedure reverse (s, i, j) which reverse the order of elements in s between positions i and j (both incl...
Marks 2
GATE CSE 2024 Set 1
An array $[82, 101, 90, 11, 111, 75, 33, 131, 44, 93]$ is heapified. Which one of the following options represents the first three elements in the hea...
GATE CSE 2014 Set 1
Consider the following C functions in which size is the number of elements in the array E:
int MyX(int *E, unsigned int size){
int Y = 0;
int Z;
in...
GATE CSE 2004
Two matrices M1 and M2 are to be stored in arrays A and B respectively. Each array can be stored either in row-major or column-major order in contiguo...
GATE CSE 1998
Let A be a two dimensional array declared as follows:
A : array [ 1... 10] [1... 15] of integer;
Assuming that each integer takes one memory locations...
GATE CSE 1994
In a compact single dimensional array representation for lower triangular matrices (i.e all the elements above the diagonal are zero) of size n $$\tim...