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)
Getting the size of an array with any datatypeSaddam Abu Ghaida 7.5
Use ++ and --Subyraj P.S 6.4
Never do unary minus on sizeofVaibhav 6.4
Comparisons in C\C++Nikitas Angelinas 6.3
Use makefilecjediknight 6.3
Error handling for newUpesh Jindal 6.3
gets() is bad.Sean 6.2
Free The Memory That You UseUdhaya Kumar.D 6.2
Flowchartsayyapparaju 6.2
Write it out on paperrakesh kumar 6.2
Rounding to an IntegerGorn 6.2
Fastest raise to power.Ezzetabi 6.2
Count number of bits in an integer.Anjani Kumar Mishra 6.2
difference between int* p and int *p declarationomprakash mishra 6.2
C and C++ bit Operations Trickssedfy 6.2
Code Optimization TipsBasker Swaminathan 6.1
Programming TipsJatin Gandhi 6.1
Use Good Variable And Function Namesprog-bman 6.1
Converting numbers to StringsWebmaster 6.1
The power of scanf()Joanna 6.1
Keep fit to program betterLuna Man 6.1
The many meanings of NULLRajat Kochhar 6.1
Test pieces of your code earlyHardi Pertel 6.1
When optimizing code, focus on algorithms firstAlex Allain 6.1
Solve Any Compiler Error EasilyWajahat Karim 6.1
assert() yourself!Kevin Lam 6.1
Don't use strlen in a loop condition.anonytmouse 6.1
loop conditionKrishna 6.1
Run code in Different compilersNaren Varma 6.1
Initialise all variables before useMounish 6.0

Next 30

Help your fellow programmers! Add a tip!