in Programming in C
413 views
0 votes
0 votes

Answer is C . But i want to know what is segmentation fault?

in Programming in C
413 views

1 Answer

3 votes
3 votes
Best answer
The cause of segmentation fault here is Stack Overflow. As there's no termination condition, main() recursively calls itself, thus overflowing the stack and leading to Segmentation Fault.
selected by

2 Comments

By the way, seg fault occurs when one tries to access an illegal memory location (address).
2
2
thanks bro lakshay
1
1