closed by
262 views
0 votes
0 votes
closed with the note: Answered.
Consider the following code.

int x = 0, i;

for (i = 0; i < 10, i++)

            if (i%2 && x++)

                        x += 2;

What will be the value of x?

(a) 11                                                                           (b) 13

(c) 15                                                                           (d) 17
closed by

Related questions

1 votes
1 votes
2 answers
1
Khushal Kumar asked Jul 7, 2017
640 views
#include <stdio.h int x = 20; int f1() { x = x+10; return x;} int f2() { x = x-5; return x;} int main() { int p = f1() + f2(); printf ("p = %d", p); return 0; }
4 votes
4 votes
1 answer
2
ritwik_07 asked Jun 10, 2023
462 views
#include<stdio.h #include<string.h #define MAX(x, y) ((x) (y) ? (x) : (y)) int main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i, j, k); return ...