Consider this code:
int main() { return 10'000; }
I compile it and run it:
$ g++ main.cpp -o p
$ ./p
$ echo $?
16
Why the output of $?
is 16
? I also tried with Online Compiler too:
And the process return value is 16. What I'm missing?
My environment:
- OS: Arch Linux x86_64 Linux 5.13.10
- Compiler: GCC 11.1.0
- Compiler Additional Flags:
-Wall -Wextra -Wpedantic