void fib(int **arr, int n) {
	*arr = malloc(sizeof(int) * n);
    int firstPointer = 0;
    int secondPointer = 1;
    if (n == 1){
        *arr[0] = 0;
    }
    for (int i = 0; i < n; i++) {
        if (i == 0) {
            *arr[0] = firstPointer;
        }
        else if (i == 1) {
            *arr[1] = secondPointer;
        }
        else {
            *arr[i] = firstPointer + secondPointer;
            firstPointer += 1;
            secondPointer += 1;
        }
    }
}
How do you get rid of the segmentation fault?