common bugs in C programs

Bob Stout Bob.Stout at p6.f506.n106.z1.fidonet.org
Sun Dec 24 11:27:46 AEST 1989


In an article of <22 Dec 89 03:33:00 GMT>, damerla at uicbert.eecs.uic.edu writes:

 >I am compiling a list of syntax and logical errors I ever made while writing
 >C programs.  Some of these errors are very simple but hard to debug like 
 >typing = in place of ==.  Till now I have compiled about 25 of them and any 
 >contributions to this list will be appreciated.

If you make it a matter of style to write conditionals as (const == var)  
rather than (var == const), your compiler will flag the error for you and make  
your code *much* easier to debug. 



More information about the Comp.lang.c mailing list