AIFA
C Editor
Coding Lab
C Home
Lesson
Courses
CHAPTER 10
C Switch
Write C code and run it directly in the browser.
▶ Run Code
↻ Reset
Clear Output
C Source Code
#include <stdio.h> int main() { int choice = 2; switch (choice) { case 1: printf("One"); break; case 2: printf("Two"); break; default: printf("Other"); } return 0; }
Ready
Program Output
Output will appear here...
AIFA C Compiler
← Previous
📖 Lesson
All Chapters
Next →