GATE CS 2021 (Afternoon) — Question 20

Programming in CPointers, Multi-Dimensional Arrays, StructuresMCQ1 mark · −1/3 if wrongMedium

Consider the following ANSI C program:
c
1#include <stdio.h>
2int main( ) {
3    int arr[4] [5] ;
4    int i, j;
5    for (i = 0; i < 4; i++) {
6        for (j = 0; j < 5; j++) {
7            arr[i] [j] = 10 * i + j;
8        }
9    }
10    printf("%d", *(arr[1] + 9));
11    return 0;
12}
13
What is the output of the above program?
  1. A
    14
  2. B
    20
  3. C
    24
  4. D
    30
Practise the full 2021-AN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAFree All-India Mock — every SundayA full GATE CS paper, exactly 180 minutes, ranked across India with your GATE score.
Practise more on Pointers, Multi-Dimensional Arrays, StructuresTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group