1
GATE CSE 1998
MCQ (Single Correct Answer)
+2
-0.6
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 the array is stored in row-major order and the first element of the array is stored at location 100, what is the address of the element A[i] [j]?
A
15i + j + 84
B
15j + i + 84
C
10i + j + 89
D
10j + i + 89
2
GATE CSE 1994
MCQ (Single Correct Answer)
+2
-0.6
In a compact single dimensional array representation for lower triangular matrices (i.e all the elements above the diagonal are zero) of size n $$\times$$ n, non-zero elements (i.e., elements of the lower triangle) of each row are stored one after another, starting from the first row, the index of the (i, j)th element of the lower triangular matrix in this new representation is
A
i + j
B
i + j - 1
C
$$(j - 1) + i{{(i - 1)} \over 2}$$
D
$$i + {{j(j - 1)} \over 2}$$
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12