Break it down:
int a[5] = { 5, 3, 15, 20, 25 } ;
int i, j, k = 1, m ;
a[1] = a[1] + 1;
i = a[1] ;
j = a[1] ;
a[1] = a[1] + 1;
m = a[i] ;
i = i + 1;
printf ( "\n%d %d %d %d", i, j, m, a[1] ) ;
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Look at line 6. Your incrementing a[1] which equals 3 by 1 so i = 4.
Look at line 8. Your incrementing i so that would make i = 5.
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
why arent u initialising i or l, it may get garbage value!
Read the code more carefully. The first use of i assigns a value to it. There's also no l , so I assume you meant either j or m , both of which follow the same process as i .
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401