标签:argv HERE 程序 return ORC font clu nbsp include
return从当前函数返回而exit结束正在运行的程序
示例:
[wangml@iZwz976helaylvgqok97prZ testForC]$ ./exit.test q [wangml@iZwz976helaylvgqok97prZ testForC]$ ./exit.test a Here! [wangml@iZwz976helaylvgqok97prZ testForC]$ cat exit.test.c #include <stdio.h> #include <stdlib.h> void testExit(char ch); int main(int argc, char **argv) { char ch; scanf("%c", &ch); testExit(ch); printf("Here!\n"); return 0; } void testExit(char ch) { if (ch == ‘q‘) { exit(1); } return; }
标签:argv HERE 程序 return ORC font clu nbsp include
原文地址:https://www.cnblogs.com/lnlin/p/9400508.html