// if it's not working acivate this (on macOS):
// #include <stdio.h>

// Main Menu 5: POINTER 

// Main function
void mainMenu_5(int *m)
{
    // Output
    printf("\n*** POINTER MENU ***\n");
    printf("Press: (0) EXIT\n");
    printf("Press: (1) POINTER-A | (2) POINTER-B | (3) POINTER-C | (4) POINTER-D\n");
    printf("Press: (5) POINTER-E | (6) POINTER-F \n");
    printf("Your Input: ");

    // Input
    scanf("%d", m);

    // Output
    printf("\n");

    // create
    int value_1;
    int value_2;
    int value_3;
    int value_4;

    // Switch-case statement
    switch (*m)
    {
        case 0:
                // Exit

                // Assign
                *m = 0;

                // Output
                printf("### EXIT ###\n");
                break;

        case 1:
                // Function: Pointer A, int
                pointer_a();
                break;

        case 2: 
                // Function: Pointer B, array
                pointer_b();
                break;
        
        case 3: 
                // Function: Pointer C, array
                pointer_c();
                break;

        case 4: 
                // Assign
                value_1 = 1234567;

                // Function: Pointer D, address of int to function
                pointer_d(&value_1);

                // Output
                printf("Int value 1: %d\n", value_1);
                break;
        
        case 5:
                // Assign
                value_2 = 7;

                // assign: Address of int to pointer
                int *pointer_1 = &value_2;

                // Function: Pointer E, address of pointer to function
                pointer_e(pointer_1);

                // Output
                printf("Int value 2: %d\n", value_2);
                break;

        case 6:
                // Output
                printf("## POINTER F: Address of pointer to function ###\n\n");

                // Assign
                value_3 = 100;

                // Create
                int *pointer_2;

                // Asssign: Address of int to pointer 
                pointer_2 = &value_3;

                // Output
                printf("Int value 3: %d\n\n", value_3);

                // Function: Pointer F, address of pointer to function
                pointer_f(pointer_2);

                // Output
                printf("Int value 3: %d\n", value_3);
                
        default:
                // Assign
                *m = 0;

                // Output
                printf("### END ###\n");
                break;
    }

    // Output
    printf("\n### POINTER END ###\n");
    printf(".......................\n");
}  