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)
Converting numbers to StringsWebmaster 5.7
Clever ways to avoid using if statementsA. Karthick Pandia Samy 5.7
Temporariless SwapGuille 5.6
Dont't use scanf() when reading sentencesRomnico 5.6
Don't use strlen in a loop condition.anonytmouse 5.6
Use STL containers instead of C arraysSang-drax 5.6
Do NOT always check for NULL! (C++)Kevin Lam 5.6
Executing system commandsSean 5.6
difference between int* p and int *p declarationomprakash mishra 5.6
logical error on divisionM.Kumaran 5.6
getchar() returns an intRob 5.6
assert() yourself!Kevin Lam 5.6
Flowchartsayyapparaju 5.6
Using _strtime and _strdate to get the timeAli Jafar 5.6
Be careful when storing pointers inside unionssingam kiran reddy 5.6
clean up after cin (C++)Major_Small 5.6
Run code in Different compilersNaren Varma 5.6
Don't use fflush(stdin)Shakti 5.6
Better coding style for comparisonnids 5.6
Turn off optimization when debuggingAshok Kumar 5.6
Test pieces of your code earlyHardi Pertel 5.6
Programming TipsJatin Gandhi 5.6
initalization of objectsmohit dhawan 5.6
Use Good Variable And Function Namesprog-bman 5.6
Get a copy of the standardThantos 5.6
Use templates to prevent memory leakageKunal 5.6
Fastest raise to power.Ezzetabi 5.6
Always check for NULL (in C)Webmaster 5.6
Use makefilecjediknight 5.6
Always write if statements with bracesWebmaster 5.6

Next 30
Previous 30

Help your fellow programmers! Add a tip!