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

  • Home
  • SEARCH
  • 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 4614324
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:41:00+00:00 2026-05-22T01:41:00+00:00

I have been asked this question today. When debugging, there is an error. But

  • 0

I have been asked this question today.

When debugging, there is an error. But after you add one printf() line. No error.
What are errors can cause this.

This is an open question. So just let me say what I thought.

My answer was not logical at that time. (such as, maybe some memory error? maybe have concurrency issue?)
So what to hear sth you may have.

Some people may say this is not a good or not a reasonable question. But when we dealing with interview, we have no choice. We need to say what ever logical and make it make sende. 🙂

  • 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-22T01:41:01+00:00Added an answer on May 22, 2026 at 1:41 am

    The concurrency issue is pretty valid. An I/O operation such as printf takes really long compared to other operations, and this sometimes hides a race condition (the problem doesn’t go away, it just manifests less often – harder to debug).

    Imagine somebody comes up with this flawed idea:

    • Start a thread
    • Initialize some memory location that will be read by that thread

    At this point there’s no telling what will happen. If the thread starts really quick, it will read the memory location before the starting thread has a chance to write it. If however the new thread simply prints “Oh hay, I’m a new thread” before reading the variable, it has a pretty good chance to read valid results. Of course, in 1/10 cases it will fail and it will be a pain to debug.

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

Sidebar

Related Questions

I'm sure this question HAS to have been asked, but after searching through the
This question has been asked before ( link ) but I have slightly different
Similar questions to this one have been asked but none seem to address my
This question may have been asked before, but I couldn't find an answer to
Okay, I know this question have been asked plenty of times already, but I
I have been asked this question and have given this quite some thought but
I have been asked this question, but failed to find an article that describe
I know this question have been asked endless times but I can't find a
Variants of this question have been asked many times, but none of the answers
Variants of this question have been asked several times now here, but my question

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.