Question:

What gets printed?

int array[2][2] = {0, 1, 2, 3};
int i;
int sum = 0;

for (i =0; i < 4; ++i){

    int x, y;

    x = i % 2;

    if (x){
        y = 0;
    }
    else{
        y = 1;
    }
    sum += array[x][y];
}

printf("%d\n", sum);

Answers:


Keywords:

© 2017 QuizBucket.org