Felix Felix - 19 days ago 11
C Question

Why does it always show "Process returned 18 (0*12)" if I don't use "return 0"?

I was just trying to see what happen if I don't use "return o". So every time I didn't use "return 0" at the end of the program, it was showing "Process returned 18 (0*12)" if I don't use "return 0".

Why?

Thanks in advance.

Answer

If you omit the return statement from a non-void function, you're invoking Undefined Behavior. Anything can happen.