0

I am trying to debug a simple C application.

Edwin
  • 1
  • 1
  • Welcome to Stack Overflow. Please read [the help pages](http://stackoverflow.com/help), take the SO [tour], read [ask], as well as [this question checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/). – Some programmer dude Nov 25 '22 at 09:11
  • 1
    Have you considered the *possiblity* that the compiler might also contain the code for well-known library functions, or have code that generates the code for them on the fly, for instance? I'm not saying that's how the Microsoft compiler is implemented, just pointing out the possiblity. Also, your question is rather long, a bit rambling, and hard to follow. You also switch `printf()` in the topic to `print()` in the text, which is confusing. Please try to clean it up and make it more clear and focused. Thanks. – unwind Nov 25 '22 at 09:19
  • 1
    Use a [debugger](https://stackoverflow.com/questions/25385173/what-is-a-debugger-and-how-can-it-help-me-diagnose-problems) to *step into* the `printf` function, and see what happens, and where you end up. – Some programmer dude Nov 25 '22 at 11:06
  • If you're compiling C like `printf("Hello\n");`, note that most compilers will replace it with a call to `puts("Hello");` because that's a simpler function. – Peter Cordes Nov 25 '22 at 11:24
  • 1
    MS refactored the stdio library years ago and placed many of the functions in header files so you likely won't see many functions in actual libraries. You might be able to choose a toolset in the options for something earlier than th 2015 toolset where the functions would still be in library files. – Michael Petch Nov 25 '22 at 11:47
  • Although this other question https://stackoverflow.com/questions/33721059/call-c-standard-library-function-from-asm-in-visual-studio is about assembly the answers in a way describe the root cause of the issue you are seeing in C++. – Michael Petch Nov 25 '22 at 12:04
  • Chances are it's not going to be at the same address every time. It ends up being wherever the computer decides to load the library – puppydrum64 Nov 28 '22 at 16:16

0 Answers0