Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

C | Loops & Control Structure | Question 15

  • Difficulty Level : Medium
  • Last Updated : 28 Jun, 2021

In the following program, X represents the Data Type of the variable check.

Take a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks, Linked List and many more! Check out our Data Structures in C course to start learning today.

#include <stdio.h>
int main()
    X check;
    switch (check)
        // Some case labels
    return 0;

Which of the following cannot represent X?
(A) int
(B) char
(C) enum
(D) float

Answer: (D)

Explanation: A switch expression can be int, char and enum. A float variable/expression cannot be used inside switch.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :