Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?


       int main()

        {

            int i = 0;

            for (foo(); i == 1; i = 2)

                printf("In for loop\n");

                printf("After loop\n");

        }

        int foo()

        {

            return 1;

        }

  2. A.
    After loop
    B.
    In for loop after loop
    C.
    Compile time error
    D.
    Infinite loop

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    none


Be The First To Comment