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)
Set the most significant bit of an int Alphonse Ajayan 6.2
swap with out using temporaryraghava 6.1
Do NOT always check for NULL! (C++)Kevin Lam 6.1
Make pointer and reference arguments constAkshay 6.1
creating a messagebox on WindowsAmarjeet Kawathe 6.1
Free The Memory That You UseUdhaya Kumar.D 6.1
Passing a pointer to a functionIrfaan Kamo 6.1
Never do unary minus on sizeofVaibhav 6.1
Use Good Variable And Function Namesprog-bman 6.1
Error handling for newUpesh Jindal 6.1
Use makefilecjediknight 6.1
Initialise all variables before useMounish 6.1
When optimizing code, focus on algorithms firstAlex Allain 6.1
Fastest raise to power.Ezzetabi 6.1
gets() is bad.Sean 6.0
Test pieces of your code earlyHardi Pertel 6.0
The many meanings of NULLRajat Kochhar 6.0
Count number of bits in an integer.Anjani Kumar Mishra 6.0
Run code in Different compilersNaren Varma 6.0
Effective Modularity in ProgrammingSharma PCS 6.0
One instruction per lineLudovic Flender 6.0
.c is used for c while .cpp is used for c++G.P. 6.0
Make backupsVox 6.0
Reuse Old CodeTimofei Gerasimov 6.0
Pointer arithmetic trickinessvishesh jain 6.0
gets is dangerouscarl johnson 6.0
Always check for NULL (in C)Webmaster 6.0
Executing system commandsSean 6.0
Copy constructorAli Nawkhas Murad 6.0
String to integerMayur Avhad 5.9

Next 30
Previous 30

Help your fellow programmers! Add a tip!