Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MacOS中的C程序慢启动_C_Gcc_Macos Mojave - Fatal编程技术网

MacOS中的C程序慢启动

MacOS中的C程序慢启动,c,gcc,macos-mojave,C,Gcc,Macos Mojave,我正在学习c编程教程,这是一个非常简单的c文件hello.c: #include <stdio.h> int main(void) { int num; printf("Hello world! Give me an integer:\n"); scanf("%d", &num); printf("Thanks! I've always been fond of %d.\n", num); return 0; } #包括 内部主(空

我正在学习c编程教程,这是一个非常简单的c文件
hello.c

#include <stdio.h>

int main(void) {
    int num;
    printf("Hello world! Give me an integer:\n");
    scanf("%d", &num);
    printf("Thanks! I've always been fond of %d.\n", num);
    return 0;
}
#包括
内部主(空){
int-num;
printf(“你好,世界!给我一个整数:\n”);
scanf(“%d”和&num);
printf(“谢谢!我一直喜欢%d.\n”,num);
返回0;
}
资料来源:

然后使用
gcc hello.c
然后
/a.out
在我看到《你好,世界》之前,似乎有一个停顿!给我一个整数:从
/a.out
开始,然后点击return


为什么会这样?如何改进这一启动?

这与C代码无关。它必须与操作系统加载和启动程序所需的时间有关。我认为这个问题不属于stackoverflow。也许是个更好的地方,但我不确定这和C代码无关。它必须与操作系统加载和启动程序所需的时间有关。我认为这个问题不属于stackoverflow。也许是个更好的地方,但我不确定