C Programming Tips
Thread Tags
Adobe Illustrator Adobe InDesign Adobe Photoshop Android Development Android Programming Android Studio Automation Testing C / C++ Programming Career Options College Lounge css digital marketing Digital Marketing / SEO Fireworks Graphic Design Graphic designing Graphics Design Graphics Designing HTML? Illustrator Internship Training logo Design logo designing Magento Photoshop PHP Programming QA react-native Scroll Website SEO Single Page Website Stock Managment System Testing Typography UI UI/UX Development UI Design UI Designing UI development User Interface UX Design Web Designing Website Design Wordpress wpRegister for free!
Registration at Smart Mentors is completely free and takes only a few seconds. By registering you’ll gain:
- Full Posting Privileges.
- Access to Private Messaging.
- Optional Email Notification.
- Ability to Fully Participate.
Register Now, or check out the Site Tour and find out everything Smart Mentors has to offer.
Tagged: C / C++ Programming
This thread contains 1 reply, has 1 voice, and was last updated by Hetal Patel 2 years ago.
- Author Replies
- January 3, 2019 at 10:47 am #51433
What are the best tips for writing a good C code and efficiently debugging it?
- January 3, 2019 at 10:50 am #51434
Hello Hetal,
1. Keep functions small and self-contained. Let the function do just one thing.
2. Have a set of unit tests for each function.
3. Whenever you fix a bug, write a unit test to ensure it is fixed.
4. Design your APIs with 1 in mind.
These points will get you 50% of the way to easier to debug code in any language.Consider C++ though. It’s a more expressive language that can automate some otherwise difficult code. See RAII. It also has ways to make sure certain bad code constructs just fail to compile.
All the Best!
- AuthorPosts
You must be logged in to reply to this thread.Please login or register. Registration is 100% free.