1.

What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input).#include <stdio.h> int main() { int var; printf("Enter a value between 1 to 2: "); scanf("%d", &var); switch (var, var + 1) { case 1: printf("Option 1."); break; case 2: printf("Option 2."); break; default : printf("Default option."); } }

A. Option 1.
B. Option 2.
C. Default option.
D. Compilation Error
E. None of these
Answer» D. Compilation Error


Discussion

No Comment Found

Related MCQs