Sail E0 Webinar
Question
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");

    }

Options:
A .  In for loop after loop
B .  Compile time error
C .  Infinite loop
D .  Depends on the value of NULL
Answer: Option B


none



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers