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)
Turn off optimization when debuggingAshok Kumar 5.6
Use templates to prevent memory leakageKunal 5.6
char *pa; and char a[];avdtech 5.6
take advantage of array indiciesDave 5.6
Use the Appropriate VariablesMahesh Kumar.S 5.5
Indent your ProgramPrashant Sahay 5.5
Doing calculationsLinuxguru 5.5
increment and decrement on pointerRAJKUMAR 5.4
Give Proper Names to Your VariablesMaragato 5.4
Check the return value of scanf( )citizen 5.4
Put braces around if statement code, part 2PING 5.3
match the out side world ideas to logical designinmady 5.3
Don't modify a variable more than once in a single statementGanga R Jaiswal 5.3
One instruction per lineLudovic Flender 5.2
Compiling 32-bit code on a 64-bit machinevinay Kumar 5.2
Checking if two arrays are equalUnnikrishnan T A 4.8
Benefits of a Lookup TableAli Nawkhas Murad 4.6
Tips for writing programs for beginnerspradeep 4.5
Determining if something was processed in a switch/case constructMarty Corbett 4.3
Operator precedence shortcutsai shanker 4.3
take care while using new and deleterajender 4.2
Dynamic memory allocation of 2d arraysnandam 3.7
Rounding a floating point number to a near-fractionSteven 3.5
Understanding the win32 data typesMuhammad Shahid 3.2
Increment and decrement counters with rolloverLee Walker 3.2
Don't increment the same variable multiple times in one statementsidra 3.0
Never return a non-const pointer to a data member!hussain hani 3.0
Cute but dangerous code, finding the larger integer without using comparisonsPrakash Samy 3.0
Tip for MacroSankareswari 1.0
Fast way to reverse the bits in a byteJohn Hite 1.0

Next 30
Previous 30

Help your fellow programmers! Add a tip!