Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?


        int main()

        {

            float f = 1;

            switch (f)

            {

            case 1.0:

                printf("yes\n");

                break;

            default:

                printf("default\n");

            }

        }

  2. A.
    yes
    B.
    yes default
    C.
    Undefined behaviour
    D.
    Compile time error

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    none


Be The First To Comment