please help me its urgent class 10 ICSE
if u dont know then dont answer or spam please
Answers
Variables given:
> p = 5
> q = 19
Given Expression:
> int n = (q - p) > (p - q) ? (q - p) : (p - q)
> int n = (19 - 5) > (5 - 19) ? (19 - 5) : (5 - 19)
> int n = 14 > -14 ? 14 : -14
As 14 > 14 is true:
> int n = true ? 14 : -14
> int n = 14 (As condition is true, first expression is evaluated)
Answer: n = 14
Variable Given:
> y = 10
Given Expression:
> int z = (++y * (y++ + 5))
> int z = (11 * (y++ + 5)) (y becomes 11, pre-increment)
> int z = (11 * (11 + 5)) (y remains same, post-increment)
> int z = (11 * 16) (y becomes 12)
> int z = 176
Answer: z = 176 and y = 12.
Variables given:
> a = 5
> b = 9
Given Expression:
> a += a++ - ++b + a
> a = a + a++ - ++b + a
> a = 5 + 5 - ++b + a (a remains 5, post-increment)
> a = 10 - ++b + a (a becomes 6)
> a = 10 - 10 + a (b becomes 10, pre-increment)
> a = 0 + 6
> a = 6
Answer: a = 6 and b = 10
Explanation:
hmmm di sab theek chal raha hai mera bf bhi theek hai accha di loi baat nahi