void fib(int **fib_sequence, int n){
        //create an array based on n
        int i;
        fib_sequence = malloc(sizeof(int*));
        if (n==1){
                fib_sequence[0] = malloc(2*sizeof(int));
                fib_sequence[0][0] = 0;
                fib_sequence[0][1] = 1;
        }
        else{
                fib_sequence[0][0] = 0;
                fib_sequence[0][1] = 1;
                for (i=2; i<n; i++){
                        fib_sequence[0][i] = fib_sequence[0][i-1] + fib_sequence[0][i-2];
                }
        }
}

int main(int argc, char **argv) {
    /* do not change this main function */
    int count = strtol(argv[1], NULL, 10);
    //int count = 2;
    int *fib_sequence;

    fib(&fib_sequence, count);
    for (int i = 0; i < count; i++) {
        printf("%d ", fib_sequence[i]);
    }
    free(fib_sequence);
    return 0;
}

allocates memory to a given array and stores values of the fibonacci sequence up to n numbers
