What should I do to get the whole return value of c-program from command line?

后端 未结 2 1782
再見小時候
再見小時候 2021-01-18 14:35

I have a simple C-program \"./my_program\"

#include 

int main (int argc , char **argv) {


   unsigned int return_result = 0x474         


        
2条回答
  •  被撕碎了的回忆
    2021-01-18 14:59

    Exit codes on Unix are restricted to a single byte. If you want to output more, you could write it to stdout or to a file instead.

    Then why does the C standard decree that main returns int and not char? I have no idea...

提交回复
热议问题