Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Which statement ensures that the variable number will store an even value when x = 3?
int number = x % 2 == 0 ? x + 1 : x;
int number = x % 2 == 1 ? --x : x + 2;
int number = x % 2 == 0 ? x + 1 : x++;
int number = x % 2 == 0 ? x : x + 1;
int number = x % 2 == 0 ? 2 : 4;
int number = x % 2 == 1 ? x++ : x;
int number = x % 2 == 1 ? --x + 1: x + 1;
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!