Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1015269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:22:34+00:00 2026-05-16T10:22:34+00:00

I am interested to know on what things I need to concentrate on debugging

  • 0

I am interested to know on what things I need to concentrate on debugging c code without a debugger. What are the things to look for?

Generally I look for the following:

  1. Check whether correct value and type is being passed to a function.
  2. Look for unallocated and uninitialized variables
  3. Check for function syntax and function is used in right way.
  4. Check for return values
  5. Check for locks are used in the right way.
  6. Check for string termination
  7. Returning a varible in stack memory from a function
  8. Off by one errors
  9. Normal syntax errors
  10. Function declaration errors

Any structured approach is very much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:22:35+00:00Added an answer on May 16, 2026 at 10:22 am

    Most of these errors will be picked up by passing the appropriate warning flags to the compiler.

    However from the original list, points 1, 5, 6, 7, 8 are very much worth checking as a human, some compiler/flag combinations however will pick up on unhandled values, pointers to automatic memory, and off-by-one errors in array indexing etc.

    You may want to take a look at such things as mudflap, valgrind, efence and others to catch runtime cases you’re unaware of. You might also try splint, to augment your static analysis.

    For the unautomated side of things, try statically following the flow of your program for particular cases, especially corner cases, and verify to yourself that it appears to do the right thing. Try writing unit tests/test scripts. Be sure to use some automated checking as discussed above.

    If your emphasis is on testing without any test execution, splint might very well be the best place to start. The technique you want to research is called static code analysis.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are many things that all programmers should know, but I am particularly interested
I am interested to know what strategies people have to keep their code AND
I am interested to know whether anyone has written an application that takes advantage
I'm developing a POS system and I need to check whether the database tables
I'd be interested to know whether there are programming languages which have shorthand equality
I'm interested to know if there's any sites out there that has implemented CardSpace
I'm interested to know what approach people are taking in developing automated unit tests
I am interested to know how the DNS requests to political sites differ in
Question: I'm interested to know the best practice for killing a long standing operation
I am interested to know how an URL-based api key restriction works, such as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.