tejal777 wrote:

could you please elaborate a bit?

How did the right-hand side change from -x to mod x?

Right hand did not change from -x to mod |x|, rather left hand side itself is equal to |x|.

Okay, consider this: what is the value of \(\sqrt{5^2}\)? It is {-5,5} That means it is |5|.

So \(\sqrt{x^2}=|x|\).

Now \(|x| = -x\). So x = 0 or negative. Thus the value of x cannot be determined.

Considering statement 1 and 2 together you can find out that value of x is -3.

One IMPORTANT CLUE to remember: In DS, both statement 1 and statement 2 ALWAYS RETURN THE SAME RESULT. So when in doubt just check the result from other statement. As statement 1 in this case represents the value of x as either 3 or -3, statement 2 CANNOT return the value of x as ZERO.

_________________________________________

Consider KUDOS for good posts