C and C++ Programming Tips

Welcome to Cprogramming.com's repository or tips for programming in C and C++. Peruse the archives or add your own tips for others to use!

Sort by clicking on any of the headers.

TipAuthorRating (votes)
Fast multiplicationJean-Fran�ois Geyelin 5.6
merqery in cjeevan 5.0
Initialise all variablesJia.Lu 5.6
The power of scanf()Joanna 6.1
Fast way to reverse the bits in a byteJohn Hite 6.6
XOR swap: Swaping the values of 2 variables.John Rambo 7.3
compiler tipJulian Sutherland 5.5
Prefer pre-increment and pre-decrementKarl 5.5
Automatic Array initialisationkedar 4.7
assert() yourself!Kevin Lam 5.6
Do NOT always check for NULL! (C++)Kevin Lam 5.6
decoding * and inc/dec operator combos like *++p , *p-- ,etckishore 6.8
loop conditionKrishna 5.8
Pointer Memory allocationKrishnamoorthi 5.5
Use templates to prevent memory leakageKunal 5.6
Increment and decrement counters with rolloverLee Walker 7.5
backups using CVS save you lot of spaceLeif 5.4
Doing calculationsLinuxguru 5.5
One instruction per lineLudovic Flender 5.3
Keep fit to program betterLuna Man 5.7
logical error on divisionM.Kumaran 5.6
match the out side world ideas to logical designinmady 5.5
Use the Appropriate VariablesMahesh Kumar.S 5.4
clean up after cin (C++)Major_Small 5.7
Be careful of Magic behaviour due to compilers manik 6.1
Give Proper Names to Your VariablesMaragato 5.6
Turn on all compiler warningsMaragato 5.3
Determining if something was processed in a switch/case constructMarty Corbett 6.5
In C++ a pure abstract base class is a contractMarty Corbett 5.3
String to integerMayur Avhad 5.5

Next 30
Previous 30

Help your fellow programmers! Add a tip!