Sail E0 Webinar
Question
What is the output of this C code?

    int main()

    {

        short i;

        for (i = 1; i >= 0; i++)

            printf("%d\n", i);

    }

Options:
A .  The control won't fall into the for loop
B .  Numbers will be displayed until the signed limit of short and throw a runtime error
C .  Numbers will be displayed until the signed limit of short and program will successfully terminate
D .  This program will get into an infinite loop and keep printing numbers with no errors
Answer: Option C


none



Was this answer helpful ?
Next Question

Submit Solution

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

More Questions on This Topic :


Latest Videos

Latest Test Papers