Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?


        int main()

        {

            int *p = NULL;

            for (foo(); p; p = 0)

                printf("In for loop\n");

                printf("After loop\n");

        }

  2. A.
    In for loop after loop
    B.
    Compile time error
    C.
    Infinite loop
    D.
    Depends on the value of NULL

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    none


Be The First To Comment