Find   


An Affiliate of AIHorizon




This tip submitted by Jatin Gandhi on 2005-10-15 13:06:02. It has been viewed 37714 times.
Rating of 3.1647 with 255 votes

Programming Tips



Here is the simple and most useful tips..,

1) Check for the function prototype for the library function if you don't remember the actual argument type for the library function. e.g., scanf() function.., it expects address of the argument so it should be proveded address of the variable to be filled not the variable itself.

2) Take care that the loop count variable never overflows.., and if so take the overflow into count.
e.g.,
Never expect int variable to count more than 2^( sizeof(int) - 1) (Note : one is substracted for the sign bit.., if it is unsigned we can take full bit length. eg. 2 ^ sizeof(int))






More tips


Add a tip!



-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.