Home / General Knowledge / Testing sawaal :: Discussion

Discussion :: Testing sawaal

  1. What will be output when you will execute following c code?

    #include <stdio.h>
    void main()

    {
        int const SIZE = 5;
        int expr;
        double value[SIZE] = { 2.0, 4.0, 6.0, 8.0, 10.0 };
        expr=1|2|3|4;
        printf ( "%f", value[expr] );
    }

  2. A.
    2.000000
    B.
    4.000000
    C.
    8.000000
    D.
    Compilation error

    View Answer

    Workspace

    Answer : Option D

    Explanation :


    Size of any array in c cannot be constantan variable.


Be The First To Comment