Menu System

Medium Enumerations & Typedef
Solve in Playground →

Problem Statement

Write a C program using an enum for menu choices (MENU_START=1, MENU_SETTINGS=2, MENU_EXIT=3) to print corresponding menu selection messages.

Input Format

A single integer choice (1 to 3).

Output Format

Print 'Starting Game', 'Opening Settings', 'Exiting', or 'Invalid Choice'.

Constraints

1 <= Choice <= 3

Sample Input

2

Sample Output

Opening Settings

Explanation

Choice 2 matches MENU_SETTINGS.

Starter Code

#include <stdio.h>

enum Menu { MENU_START = 1, MENU_SETTINGS, MENU_EXIT };

int main() {
    int choice;
    if (scanf("%d", &choice) == 1) {
        // Write your code here
    }
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used