📚 Practice Mode

Programming (C/C++)

Learn at your own pace with hints and detailed explanations

1 / 30
Multiple Choice

<span style="font-size:10.0pt;font-family:Arial;mso-fareast-font-family:"Times" new="" roman";mso-bidi-font-family:arial;color:black;mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa="">What will be the output of the following function?

include <stdio.h>

void 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);
}

  1. 2 1 15
  2. 1 2 5
  3. 3 2 15
  4. 2 2 2