Top

Discussion

Predict the output of below code:

#include

int main()
{
    int a[5] = {5, 1, 15, 20, 25};
    int i, j, m;
    i = ++a[1];
    j = a[1]++;
    m = a[i++];
    printf("%d, %d, %d", i, j, m);
    return 0;
}

 

  • A.2,5,15
  • B.3, 2, 15
  • C.1,2,5
  • D.12,15,1

Answer: B

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment