Q -printf() is part of code segment but found in data segment.......why?
Last edited on
I'm not sure your question makes any sense without some more context. This almost sounds like this is out of a text book, where they would have just talked about this in the chapter before the question or something. Could you elaborate a little more?
A is part of B but is found in B.

Not sure if you wrote that wrong because it sounds very obvious. I think printf is in the code segment because all code is in the code segment, right?
Perhaps he made a typo and is actually confused about how it's used but not found in the code?

This is because it's in <cstdio> (stdio.h)

Look for #include <cstdio> or #include <stdio.h> at the top of the program - it's in there.
Last edited on
sorry my mistake Q is

printf() is part of code segment but found in data segment why?
Topic archived. No new replies allowed.