Cond 1?cond 2?cond 3?:exp 1:exp 2:exp 3:exp 4;is equivalent to which of the following?a.if cond 1exp 1;else if cond 2exp 2;else if cond 3exp 3;elseexp 4;b.if cond 1if cond 2if cond 3exp 1;else exp 2;else exp 3;else exp 4;c.if cond 1 && cond 2 && cond 3exp 1 |exp 2|exp 3|exp 4; d.if cond 3exp 1;else if cond 2exp 2;else if cond 3exp 3;elseexp 4;

D
This question is related to TCS Interview

Showing Answers 1 - 4 of 4 Answers

vicky

  • Dec 22nd, 2005
 

Hi all,

Answer for this question is (a).

  Was this answer useful?  Yes

madhu

  • Nov 13th, 2007
 

ans is B


if (cond 1)

{    if ( cond 2)

   {        if (cond 3)

        {              exp 1

        }

        else

        {              exp2

        }

   }

   else

   {       exp 3

   }

}

else

{    exp 4

}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions