Enum Comparison

Easy Enumerations & Typedef
Solve in Playground →

Problem Statement

Write a C program using an enum for status (ACTIVE=1, INACTIVE=0) to compare two user states and print whether they match.

Input Format

Two space-separated integers (0 or 1).

Output Format

Print 'Match' if both statuses are equal, otherwise 'Mismatch'.

Constraints

Status values are 0 or 1.

Sample Input

1 1

Sample Output

Match

Explanation

Both enum status values are equal (1 and 1).

Starter Code

#include <stdio.h>

enum Status { INACTIVE = 0, ACTIVE = 1 };

int main() {
    int s1, s2;
    if (scanf("%d %d", &s1, &s2) == 2) {
        // 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