Computer Science, asked by roshanlenka421, 9 months ago

int a=5;

int c=(a%2==0)?1:0;

System.out.print(c);​

Answers

Answered by ayasmitamanna146
2

Answer:

0

Explanation:

because here,a=5 which%2 is not equals to 0.Therefore,the value of c is not 1 .It jumps to the other value and hence the other value is zero(0).So in the printing statement it will print the value of c i.e. 0.

Answered by Oreki
2

Output:

0

Explanation:

As 5 is not divisible by 2, c = 0.

Similar questions