Question discussion

Given the following code snippet, what is the value of the variable c?

359226Medium DSSSB TGT Computer Science 0 replies 0 views
0
Given the following code snippet, what is the value of the variable c?
int a, b, c;
a = b = c = 15;
c = c + 10;
  • AUndefined
  • B10
  • C25
  • D15
Correct answer: C

Explanation

a = b = c = 15 sets all three to 15, then c = c + 10 makes c 25.

Discussion 0

Nobody has replied yet. Start the discussion!