When I run the code, my ide, VSCODE, stated zsh: bus error  ./a.out. From my reading, bus error is caused by pointers. Correct me if I'm wrong
This is a college assignment, I need to write a program in C containing:
-Control Structure (Selection & repetition)
-Functions ( return & non-return value functions)
-Arrays
-Pointers
-structures
-File
If you have any suggestions for my code, do let me know. This is my first time learning C.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define SAFARIADULT 70
#define SAFARIKIDS 50
#define WATERPARKADULT 100
#define WATERPARKKIDS 80
#define LEGOLANDADULT 150
#define LEGOLANDKIDS 130
void display1();
char option();
void safari1(int amount[2], char location[10] );
void waterpark1(int amount[2], char location[10] );
void legoland1(int amount[2], char location[10] );
struct data
{
    int promo;
    char name[20];
    int date_in;
    int date_out;
    int totalday;
    float total;
    float afterpromo;
};
void get_data(struct data user);
void promo(struct data user);
void display2(struct data user, char location[10], int amount[2]);
int main()
{
    char choice;
    int amount[2];
    char location[10];
    display1();
    choice = option ();
    switch (choice)
    {
    case '1':
        safari1(amount, location);
        break;
    case '2':
        waterpark1(amount, location);
        break;
    
    case '3':
        legoland1( amount, location);
        break;
    default:
        printf("Invalid choice! Program will terminate. Thank you");
        exit (0);
    }
}
void display1()
{
    printf("\n");
    printf("******[ Welcome To Theme Park MMU ]******");
    printf("\n              Ticket Website             ");
    printf("\n-----------------------------------------");
    printf("\n Here is the option to choose: ");
    printf("\n        Place       \tAdult \tKid");
    printf("\n \t1- Safari \tRm%d \tRm%d", SAFARIADULT, SAFARIKIDS);
    printf("\n \t2- Waterpark \tRm%d \tRm%d", WATERPARKADULT, WATERPARKKIDS);
    printf("\n \t3- Legoland \tRm%d \tRm%d", LEGOLANDADULT, LEGOLANDKIDS);
    printf("\n-----------------------------------------");
    printf("\n");
}
char option()
{
    char option;
    printf("Your Choice (1-3) : ");
    scanf("%c", &option);
    return option;
}
void safari1(int amount[2], char location[10])
{
    strcpy("Safari", location);
    int child, adults;
    amount[0] = child;
    amount[1] = adults;
    printf("Amount of child : ");
    scanf("%d", &child);
    printf("Amount of adult : ");
    scanf("%d", &adults);
    struct data user;
    get_data(user);
    user.total = child * SAFARIKIDS + adults * SAFARIADULT;
    promo(user);
    display2(user, location, amount);
}
void legoland1(int amount[2], char location[10])
{
    strcpy("Legoland", location);
    int child, adults;
    amount[0] = child;
    amount[1] = adults;
    printf("Amount of child : ");
    scanf("%d", &child);
    printf("Amount of adult : ");
    scanf("%d", &adults);
    struct data user;
    get_data(user);
    user.total = child * LEGOLANDKIDS + adults * LEGOLANDADULT;
    promo(user);
    display2(user, location, amount);
}
void waterpark1(int amount[2], char location[10])
{
    strcpy("Waterpark", location);
    int child, adults;
    amount[0] = child;
    amount[1] = adults;
    printf("Amount of child : ");
    scanf("%d", &child);
    printf("Amount of adult : ");
    scanf("%d", &adults);
    struct data user;
    get_data(user);
    user.total = child * WATERPARKKIDS + adults * WATERPARKADULT;
    promo(user);
    display2(user, location, amount);
}
void get_data(struct data user)
{
    fflush(stdin);
    printf("Name : ");
    gets(user.name);
    printf("Date In : ");
    scanf("%d", &user.date_in);
    printf("Date Out : ");
    scanf("%d", &user.date_out);
    user.totalday = user.date_out - user.date_in;
}
void promo(struct data user)
{
    char code[5];
    fflush(stdin);
    printf("Promo Code : ");
    gets(code);
    if (strcmp(code,"promo")==0)
    {
        user.afterpromo = user.total * 0.9;
        printf("Your code is valid!!");
        user.promo = 1;
    }
    else
    {
        printf("Invalid Code !\n");
        user.promo = 0;
    }   
}
void display2(struct data user, char location[10], int amount[2])
{
    printf("-----------------------------------");
    printf("Name \t: %s", user.name);
    printf("Location \t: %s", location);
    printf("Date in \t: %d", user.date_in);
    printf("Date out \t: %d", user.date_out);
    printf("Total day \t: %d days", user.totalday);
    printf("Number of kids : %d", amount[0]);
    printf("Number of adults : %d", amount[1]);
    printf("Total Price \t: RM%.2f", user.total);
    if (user.promo == 1)
    {
       printf("Promo Code \t: Yes");
    }
    else
    {
        printf("Promo Code \t: No");
    }
    printf("Final Price \t: RM%.2f", user.afterpromo);
}
 
    