[Solved] Segmentation fault when function returns
Omitting the return statement from a function whose return type is not void is cause for undefined behavior. when i change the return type of int there is no problem. That’s a valid form of undefined behavior. It can be considered lucky/unlucky depending on how you view it. I consider it unlucky since the problem … Read more