Home / C Programming / Expressions :: Discussion

Discussion :: Expressions

  1. Are the following two statement same?

    1. a
    2. (a

  2. A.

    Yes

    B.

    No

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No, the expressions 1 and 2 are not same.

    1. a This statement can be rewritten as,

     if(a 20)
     {    
        b = 30; 
    } 
    else
     {    
        c = 30; 
    } 

     

    2. (a This statement can be rewritten as,

     if(a 20)
     {     
        //Nothing here 
    }
    else
     {
         c = 30;
     } 
    


Be The First To Comment