Test your Coding Ability

Report
Poll

Please briefly explain why you feel this question should be reported .

Report
Cancel

Results

What is the output of the following ?

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

in progress 1
Aptitude Admin 10 months 2 Answers 1183 views 0

Answers ( 2 )

  1. Admin

    Please briefly explain why you feel this answer should be reported .

    Report
    Cancel

    Ans : A

    Solution:
    Pre increment operator is used to increment variable value by 1 before assigning the value to the variable. Post increment operator is used to increment variable value by 1 after assigning the value to the variable.

  2. Please briefly explain why you feel this answer should be reported .

    Report
    Cancel

    3 12 15

Leave an answer

Browse

Captcha Click on image to update the captcha .