Computer Sciences > Gate 2019 > C Programming
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\n", sum);
    return 0;
}
The output of above C program is __________

Correct : 10

Similar Questions

Consider the following two functions void fun1(int n){ &nbsp; &nbsp; if(n == 0) return; &nbsp; &nbsp; &nbsp; printf(β€œ%d”, n); &nbsp; &nbsp; fun2(n-2); &...
#175 MCQ
Consider the C functions foo and bar given below: int foo(int val) { &nbsp; &nbsp; int x = 0; &nbsp; &nbsp; while (val > 0) &nbsp; &nbsp; { &nbsp; &nbsp; &nbs...
#190 MCQ
What is printed by the following ANSI C program? #include&lt;stdio.h&gt; int main(int argc, char *argv[]) { &nbsp; &nbsp; int a[3][3][3] = &nbsp; &nbsp; {{...
#311 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......