/* Defining the enum */ enum vals {val1, val2, val3}; /* Setting a variable to an enum's value */ vals some_val; some_val = val3;