摘要
本文通过具体实例讲解了C语言程序设计过程的几个常见错误:(1)使用未定义的变量;(2)进行非法运算;(3)输入数据的方式与要求不符;(4)循环语句中的死循环;(5)复合语句漏掉花括号;(6)利用“==”比较字符串是否相等;(7)误把“=”作为关系运算中的“等于”运算符;(8)指针变量未正确赋值之前就引用。
This article common explainned C language programming process several through the concrete example wrong: (1) uses the variable which has not defined; (2) carries on the illegal operation; (3) data-in way and request not symbol; (4) in cyclic sentence endless loop; (5) the compound statement leaves out the brace; (6) uses the comparison character string is whether equal; (7) took by mistake in the relational operation "is equal to" the operator; (8) before indicator variable not correct evaluation quotes.
出处
《电脑知识与技术》
2006年第10期177-178,共2页
Computer Knowledge and Technology
关键词
C语言
错误分析
C language
Error analysis