2 votes 2 votes #include <stdio.h> int main () { int i, j; int a [8] = {1, 2, 3, 4, 5, 6, 7, 8}; for(i = 0; i < 3; i++) { a[i] = a[i] + 1; i++; } i--; for (j = 7; j > 4; j--) { int i = j/2; a[i] = a[i] - 1; } printf ("%d, %d", i, a[i]); } Programming in C programming-in-c output + – Hrithik Vashishtha asked Jul 4, 2022 • edited Jul 15, 2022 by Arjun Hrithik Vashishtha 385 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Shaik Masthan commented Jul 4, 2022 reply Follow Share Why it should be 2 ? Note that line no 12, has no effect on line 15 Trace line 6,7,8 step by step. Before entering into line no 10, i value is 4. 0 votes 0 votes Hrithik Vashishtha commented Jul 4, 2022 reply Follow Share Thank you. 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes answer is 3, 2 sp_gateoverflow answered Jul 20, 2022 sp_gateoverflow comment Share Follow See all 0 reply Please log in or register to add a comment.