Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2002 | Question 33

Improve Article
Save Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

Consider the following declaration of a two dimensional array in C:




char a[100][100];


Assuming that the main memory is byte-addressable and that the array is stored starting from memory address 0, the address of a [40][50] is :

(A) 4040
(B) 4050
(C) 5040
(D) 5050


Answer: (B)

Explanation:

Address of a[40][50] = 
     Base address + 40*100*element_size + 50*element_size
     0 + 4000*1 + 50*1
     4050


Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!