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)
do not use printf without %s to print a stringpavan kumar 7.3
Put braces around if statement code, part 2PING 5.3
Tips for writing programs for beginnerspradeep 2.7
Cute but dangerous code, finding the larger integer without using comparisonsPrakash Samy 3.0
Indent your ProgramPrashant Sahay 5.5
Use Good Variable And Function Namesprog-bman 6.1
Be organisedProphet-Ex 6.9
High performance loopingRachana 6.8
swap with out using temporaryraghava 8.0
The many meanings of NULLRajat Kochhar 6.6
take care while using new and deleterajender 2.8
finding size of variable without using sizeof()Rajesh punia 5.2
increment and decrement on pointerRAJKUMAR 3.6
Write it out on paperrakesh kumar 6.5
Full Abstract class/InterfaceRamakrishna 6.4
Unexpected struct behavior in Borlands Turbo C++ 3Raza Sayed 6.3
Multiply rather than DivideReese Moore 6.9
Fix all compiler warningsrickey 6.2
getchar() returns an intRob 6.2
Dont't use scanf() when reading sentencesRomnico 6.5
Getting the size of an array with any datatypeSaddam Abu Ghaida 0.0
Convert String to SYSTEMTIMESaddam Abu Ghaida 0.0
Operator precedence shortcutsai shanker 4.3
Use virtual functions instead of type checkingSajan 8.3
Arguments for MainSajan 5.0
Use STL containers instead of C arraysSang-drax 5.9
Goto vs. Higher-level control structuresSean 5.7
Executing system commandsSean 5.9
gets() is bad.Sean 6.0
Keep a cool head when programmingSentralia 6.8

Next 30
Previous 30

Help your fellow programmers! Add a tip!