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)
Initialise all variablesJia.Lu 5.6
Don't use fflush(stdin)Shakti 5.6
initalization of objectsmohit dhawan 5.6
Get a copy of the standardThantos 5.6
Be careful when storing pointers inside unionssingam kiran reddy 5.6
getchar() returns an intRob 5.6
Turn off optimization when debuggingAshok Kumar 5.6
Use templates to prevent memory leakageKunal 5.6
Always check for NULL (in C)Webmaster 5.6
char *pa; and char a[];avdtech 5.6
Benefits of inline functionsAli Nawkhas Murad 5.6
take advantage of array indiciesDave 5.6
Safely using strncpyoliv29 5.6
Use the Appropriate VariablesMahesh Kumar.S 5.5
Indent your ProgramPrashant Sahay 5.5
use of ! operatormrinal jha 5.5
Passing array elements to functionsUmer khan 5.5
Long variable namesCarl 5.5
Pointer arithmetic hackVivek Ahlawat 5.5
Doing calculationsLinuxguru 5.5
increment and decrement on pointerRAJKUMAR 5.5
Fix all compiler warningsrickey 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
What is a friend function?Ali Nawkhas Murad 5.3
match the out side world ideas to logical designinmady 5.3
Operator Associativity and HierarchyAvinash 5.3
backups using CVS save you lot of spaceLeif 5.3
Don't modify a variable more than once in a single statementGanga R Jaiswal 5.3

Next 30
Previous 30

Help your fellow programmers! Add a tip!