I am a C beginner and this is my C code:
#include
#include
main()
{
printf(\"Hello, World!\\n\");
return \'sss\';
}
You don't return a string. Applications exit with an integer exit code.
Conventionally, exiting with a return of 0 will always show that your application exited without error / completed. You return an integer other than 0 to show that your application exited abnormally.
You could throw an exception and handle it with a logging method higher in the call stack, or you could just return something other than 0 and make sure you had it documented in your release notes as to what each error integer means.