Consider the following ANSI C program. #include <stdio.h> int main( ) { int…

GATE · 2021 · CS · Set 2 · Computer Science & IT

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?

  1. A.

    14

  2. B.

    20

  3. C.

    24

  4. D.

    30

Attempted by 168 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…