GATE CS 2021, set 2 · Question 20 · Programming and Data Structures · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
Consider the following ANSI C program.
#include <stdio.h> int main(){ int arr[4][5]; int i, j; for (i=0; i<4; i++){ for (j=0; j<5; j++){ arr[i][j] = 10*i + j; } } printf("%d", *(arr[1] + 9)); return 0; }
What is the output of the above program?
- (A) 14
- (B) 20
- (C) 24
- (D) 30
Answer
Answer (C)
Answer from the official GATE CS 2021 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes