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)
Increment and decrement counters with rolloverLee Walker 7.9
Use ++ and --Subyraj P.S 6.1
Comparisons in C\C++Nikitas Angelinas 5.8
swap with out using temporaryraghava 5.8
Goto vs. Higher-level control structuresSean 5.8
Make libraries for yourselfValseedian 5.8
Commenting out code with the preprocessorWebmaster 5.8
Use multiple filesThantos 5.8
do not use printf without %s to print a stringpavan kumar 5.8
Common Optimization TipsTravis Fischer 5.8
The power of scanf()Joanna 5.8
Comment!VOX 5.8
Be organisedProphet-Ex 5.7
Member Functions are inline by default (C++)Ash 5.7
beware of loop invarinatsIain 5.7
Solve Any Compiler Error EasilyWajahat Karim 5.7
Standard Loop ProgressionDazzle 5.7
Avoid void main()Webmaster 5.7
Pointer Tips :-)Jatin Gandhi 5.7
LogicHardi Pertel 5.7
The many meanings of NULLRajat Kochhar 5.7
loop conditionKrishna 5.7
gets() is bad.Sean 5.7
Rounding to an IntegerGorn 5.7
Never do unary minus on sizeofVaibhav 5.7
Display Date and Time in C++Govind 5.7
Keep fit to program betterLuna Man 5.7
When optimizing code, focus on algorithms firstAlex Allain 5.7
Free The Memory That You UseUdhaya Kumar.D 5.7
Be careful of Magic behaviour due to compilers manik 5.7

Next 30

Help your fellow programmers! Add a tip!