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)
Programming TipsJatin Gandhi 5.6
Pointer Tips :-)Jatin Gandhi 5.8
Fast multiplicationJean-François Geyelin 5.5
merqery in cjeevan 4.8
Initialise all variablesJia.Lu 5.7
The power of scanf()Joanna 5.9
Fast way to reverse the bits in a byteJohn Hite 1.0
XOR swap: Swaping the values of 2 variables.John Rambo 1.0
compiler tipJulian Sutherland 5.4
Prefer pre-increment and pre-decrementKarl 5.4
Automatic Array initialisationkedar 3.7
Do NOT always check for NULL! (C++)Kevin Lam 5.6
assert() yourself!Kevin Lam 5.6
decoding * and inc/dec operator combos like *++p , *p-- ,etckishore 1.0
loop conditionKrishna 5.7
Pointer Memory allocationKrishnamoorthi 5.5
Use templates to prevent memory leakageKunal 5.6
Increment and decrement counters with rolloverLee Walker 7.7
backups using CVS save you lot of spaceLeif 5.3
Doing calculationsLinuxguru 5.5
One instruction per lineLudovic Flender 5.0
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.3
Use the Appropriate VariablesMahesh Kumar.S 5.5
clean up after cin (C++)Major_Small 5.6
Be careful of Magic behaviour due to compilers manik 5.3
Give Proper Names to Your VariablesMaragato 5.4
Turn on all compiler warningsMaragato 5.2
In C++ a pure abstract base class is a contractMarty Corbett 5.1

Next 30
Previous 30

Help your fellow programmers! Add a tip!