The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
73 views

A  1070

B  1071

C  1072

D  1073

asked in Programming by Junior (637 points) | 73 views
0
C?
0
1073 is the answer.

1 Answer

0 votes
Ans will be 1073

The main point of question is , without the $1$st and last row - all other row contains 3 elements

Now, the matrix contains $50\times 50$ elements.

So, finding $P\left [ 25,26 \right ]$ not a last element of the matrix. We only have to consider $1$ st row with $2$ elements. Other all rows with $3$ elements

Now for $P\left [ 25,26 \right ]$  it will be $2+3\times 24=1074$

But here array start with $1000$

So, address of $P\left [ 25,26 \right ]$ will be $1$ less, i.e. $1073$
answered by Veteran (111k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,540 questions
54,099 answers
187,269 comments
71,006 users