Computer Science, asked by mishti102, 15 days ago

please help me its urgent class 10 ICSE
if u dont know then dont answer or spam please

Attachments:

Answers

Answered by anindyaadhikari13
3

\texttt{\textsf{\large{\underline{Question 2}:}}}

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

\rule{300}{2}

\texttt{\textsf{\large{\underline{Question 3}:}}}

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.

\rule{300}{2}

\texttt{\textsf{\large{\underline{Question 4}:}}}

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


anindyaadhikari13: Thanks for the brainliest ^_^
Answered by ay8076191
1

Explanation:

hmmm di sab theek chal raha hai mera bf bhi theek hai accha di loi baat nahi

Similar questions