-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
short k;
for (k = 1; k >= 0; k++)
printf("%d\n", k);
}
-
- Numbers will be displayed until the signed limit of short and throw a runtime error
- This program will get into an infinite loop and keep printing numbers with no errors
- The control won’t fall into the for loop
- Numbers will be displayed until the signed limit of short and program will successfully terminate
- None of these
Correct Option: D
Numbers will be displayed until the signed limit of short and program will successfully terminate