Computer Science, asked by dnreddy1960, 9 months ago

What will be the output of the
following C code?
#include <stdio.h>
int main()
{
int x;
x = 10;
if(x > 10)
X-=
10;
else if (x >= 0)
x += 00;
else if(x)
x += 10;
else
x -= 10;
printf("%d\n",x);
return 0;
-10
10
11
9​

Answers

Answered by zinc916
2

Answer:

10 because first else if condition is true

so it adds zero to x

Similar questions