Month Days Check Dry Run in C

Month Days Check is an interactive C dry run visualizer from the If programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.

This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.

Month Days Check Program Code

#include <stdio.h>
int main() {
    int month;
    scanf("%d", &month);

    if (month == 2)
        printf("28 or 29 days");
    else if (month == 4 || month == 6 || month == 9 || month == 11)
        printf("30 days");
    else if (month >= 1 && month <= 12)
        printf("31 days");
    else
        printf("Invalid month");

    return 0;
}

View the complete If programs page.

Program Console Month Days Check Topic: C Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.