When I run the following C program the compiler shows segmentation fault(core dumped). I don't understand why is this and how can I retrieve this code.

```
#include <stdio.h>
int power(int x, int n)
{
  if (n = 0)
    return 1;
  else
    return x * power (x, n - 1);
}

int main(void)
{
  int x=3,n=4;
  printf("the answer is:%d\n",power(3,4));
  return 0;
}

```