adplus-dvertising
frame-decoration

Question

What will be the output of the program ?
#include <stdio.h>
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.

3,2,15

b.

2,3,20

c.

2,1,15

d.

1.2.5

Posted under C Programming

Answer: (a).3,2,15

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the program ?