Felix Felix - 1 year ago 97
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".


Thanks in advance.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download