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)
Using _strtime and _strdate to get the timeAli Jafar 5.7
Temporariless SwapGuille 5.7
Benefits of a Lookup TableAli Nawkhas Murad 5.7
Clever ways to avoid using if statementsA. Karthick Pandia Samy 5.7
assert() yourself!Kevin Lam 5.6
Run code in Different compilersNaren Varma 5.6
Turn off optimization when debuggingAshok Kumar 5.6
Do NOT always check for NULL! (C++)Kevin Lam 5.6
Initialise all variablesJia.Lu 5.6
logical error on divisionM.Kumaran 5.6
Flowchartsayyapparaju 5.6
Executing system commandsSean 5.6
finding size of variable without using sizeof()Rajesh punia 5.6
Give Proper Names to Your VariablesMaragato 5.6
Use STL containers instead of C arraysSang-drax 5.6
Always check for NULL (in C)Webmaster 5.6
Always write if statements with bracesWebmaster 5.6
Fastest raise to power.Ezzetabi 5.6
Better coding style for comparisonnids 5.6
Don't use fflush(stdin)Shakti 5.6
Operator precedence shortcutsai shanker 5.6
Programming TipsJatin Gandhi 5.6
Use makefilecjediknight 5.6
Use Good Variable And Function Namesprog-bman 5.6
char *pa; and char a[];avdtech 5.6
initalization of objectsmohit dhawan 5.6
Test pieces of your code earlyN/A 5.6
Fast multiplicationJean-Fran´┐Żois Geyelin 5.6
Use templates to prevent memory leakageKunal 5.6
Get a copy of the standardThantos 5.6

Next 30
Previous 30

Help your fellow programmers! Add a tip!