Date Structure

Easy Structures & Unions
Solve in Playground →

Problem Statement

Write a C program to read two dates and check whether they are equal.

Input Format

Two lines, each containing day, month, and year separated by spaces.

Output Format

Print 'Equal' if both dates match exactly, otherwise 'Not Equal'.

Constraints

Valid calendar dates.

Sample Input

15 8 2024
15 8 2024

Sample Output

Equal

Explanation

Compares day, month, and year fields of both Date structures.

Starter Code

#include <stdio.h>

struct Date {
    int d, m, y;
};

int main() {
    struct Date d1, d2;
    if (scanf("%d %d %d %d %d %d", &d1.d, &d1.m, &d1.y, &d2.d, &d2.m, &d2.y) == 6) {
        // 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