Home / C Programming / Control Structures :: Discussion

Discussion :: Control Structures

  1. What will be the value of sum after the following program is executed?

    void main()

    {

    int sum=1, index = 9;

    do{

    index = index – 1;

    sum *= 2;

    }while( index > 9 );

    }

  2. A.

     1

    B.

     2

    C.

     9

    D.

     0.5

    E.

     0.25

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Explanation Not Provided


Be The First To Comment