【找问题】看看这个程序哪里怪怪的
之前的帖子编译的程序: https://2libra.com/post/programming-languages/zWTWfog
因为 GCC 版本问题,编译的文件很大,我在 Linux 下编译只有 8kb,Windows 下编译 55kb,然后我又处理了一下(猜猜我做了什么处理)
源码:
复制
#include <stdio.h> void getme(){ printf("Hello,I'm a C program.\n"); } int print(){ printf("Please input your ID:"); char id[20]; scanf("%s",&id); printf("Your ID is:%s\n",id); printf("Please call getme function.\n"); } int main(){ print(); return 0; }
Linux gcc:
复制
gcc (Debian 4.9.2-10) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Windows gcc(Git Bash MinGW64):
复制
gcc.exe (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 6.4.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
测试命令:
复制
python -c 'print("a"*40+"\xb6\x05\x40")'|./test.exe
提取地址: https://wiki.shikangsi.com/file/download?code=wxmytf2V
提取码:wxmytf2V