Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2022
Questions

Q33

MCQ2 marks, −0.67Programming

What is printed by the following ANSI C\text{ANSI C} program?

#include<stdio.h>
int main (int argc, char *argv[])
{
    int a[3][3][3] =
    {{1, 2, 3, 4, 5, 6, 7, 8, 9},
        {10, 11, 12, 13, 14, 15, 16, 17, 18},
        {19, 20, 21, 22, 23, 24, 25, 26, 27}};
    int i = 0, j = 0, k = 0;
    for ( i = 0; i < 3; i ++) {
        for ( k = 0; k < 3; k++)
            printf("%d", a[i][j][k]);
        printf ("\n");
    }
    return 0;
}
Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.