C语言代码错误分析及修正 - 函数参数重定义、字符串类型错误、条件语句使用、函数调用参数错误
#include<stdio.h>\n#include<string.h>\n\nvoid fun(int varA, int varB)\n{\n\tchar m[10];\n\tif (varA + varB > 6) {\n\t\tstrcpy(m, ">6");\n\t} else {\n\t\tstrcpy(m, "<6");\n\t}\n\t\n\tprintf("%s\n", m);\n}\n\nint main(int argc, char const *argv[])\n{\n\tint varA = 6;\n\tint varB = -20;\n\tfun(varA, varB);\n\treturn 0;\n}
原文地址: https://www.cveoy.top/t/topic/p4Wx 著作权归作者所有。请勿转载和采集!