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)
Don't increment the same variable multiple times in one statementsidra 7.3
Be careful when storing pointers inside unionssingam kiran reddy 5.7
Rounding a floating point number to a near-fractionSteven 7.0
Use ++ and --Subyraj P.S 6.2
Get a copy of the standardThantos 5.6
Use multiple filesThantos 6.1
Reuse Old CodeTimofei Gerasimov 5.4
think before you codeTimofei Gerasimov 5.4
Common Optimization TipsTravis Fischer 5.7
Free The Memory That You UseUdhaya Kumar.D 5.7
What is pointer arithmetic?Umer khan 5.1
Passing array elements to functionsUmer khan 5.5
Checking if two arrays are equalUnnikrishnan T A 5.3
Error handling for newUpesh Jindal 5.4
Never do unary minus on sizeofVaibhav 5.7
Make libraries for yourselfValseedian 6.1
Compiling 32-bit code on a 64-bit machinevinay Kumar 6.6
Pointer arithmetic trickinessvishesh jain 5.2
Pointer arithmetic hackVivek Ahlawat 5.5
Make backupsVox 5.4
Comment!VOX 5.9
Solve Any Compiler Error EasilyWajahat Karim 5.9
Avoid void main()Webmaster 5.8
Commenting out code with the preprocessorWebmaster 5.9
Converting numbers to StringsWebmaster 5.7
Always check for NULL (in C)Webmaster 5.6
Always write if statements with bracesWebmaster 5.6
Use <constant> == <value>Webmaster 5.3
Modifying const variablesWiro Sableng 5.5
fast input functionYashpreet singh 6.8

Next 30
Previous 30

Help your fellow programmers! Add a tip!