Teaching UGC NET Mock Test Series 2025 (Paper 1 & 2) Programming and Data Structure Programming in C Array
Consider following C program:
#include < stdio.h >int main() { int x[] = {2, 4, 6, 8, 10}; int a, b = 0, *y = x + 4; for(a = 0; a < 5; a++) { b = b + (*y - a) - *(y - a); } printf("%d\n", b); return 0; }
What will be the output of the above C program?
1
4
2
6
3
8
4
10