GATE CS 2019 · Question 63 · Programming and Data Structures · Numerical answer (NAT) · 2 marks · no negative marks

Consider the following C program:
#include <stdio.h> int main() int a[] = 2, 4, 6, 8, 10; int i, sum = 0, *b = a + 4; for (i = 0; i < 5; i++) sum = sum + (*b - i) - *(b - i); printf ("%d ", sum); return 0;
The output of the above C program is ______.

Answer

Answer 10

Answer from the official GATE CS 2019 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes