Constants and Enums

#include <stdio.h>

// Enum for days of the week
enum Days { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };

int main() {
    // Constants and enums
    const double PI = 3.14159;
    enum Days today = Wednesday;

    printf("Value of PI: %f\n", PI);
    printf("Today is day number: %d\n", today);

    return 0;
}
chevron_left
chevron_right

Leave a comment

Your email address will not be published. Required fields are marked *

Comment
Name
Email
Website