anonymous
  • anonymous
I want to write my output of a c code into a file using mapviewoffile in C. Can anyone help please. I have already checked the google links available. I am stuck. So, it would be really helpful if u can give a small example.
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
map view of file, what does it mean ? such as Directory Viewer ?? if the one that you meant is Directory Viewer, you can try WINAPI in Win32 Env..
anonymous
  • anonymous
No! mapviewoffile is a function in c through which you can map a part of the file or memory and write to or read from it.
anonymous
  • anonymous
If you are writing to stdout, you can use the shell to redirect output to an arbitrary file like `./mapviewoffile > output.txt'. Otherwise, you might be able to use the FILE objects and the fopen, fclose, fprintf, etc.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

rsmith6559
  • rsmith6559
Don''t foget fflush() !
anonymous
  • anonymous
As I know but if you use the fflush() to clear stdin buffer, it would be cleared and it doesn't show the output
anonymous
  • anonymous
actually, fflush(stdin) is undefined behavior
rsmith6559
  • rsmith6559
Actually, I was referring to between fprintf() and fclose() in agdgdgdgwngo's reply.

Looking for something else?

Not the answer you are looking for? Search for more explanations.