?
Solved

Writing a file using C

Posted on 2012-03-23
3
Medium Priority
?
253 Views
Last Modified: 2012-08-13
Attached is a file I am using to write read from one file and write to another.  Below is what is printed on the screen with the printf statement that is in the while loop.  Using the fputc command can I expect the information is going to the output file.  If the number 176 is printed on the screen I need 176 to go to the output file and not an ASCII equivalent.
THANKS!

176 0 0 176 32 115 192 27 186 0 0 186 32 114 202 27 176 7 100 186 7 69 240 67 16 76 2 1 2 0 247 240 67 16 76 2 1 0 1 16 247 186 91 36 240 67 16 76 2 1 34 0 247 240 67 16 76 2 1 32 66 0 247 176 93 35 240 67 16 76 2 1 34 0 247 240 67 16 76 2 1 32 66 0 247 186 93 70 240 67 16 76 2 1 64 6 0 247 240 67 16 76 2 1 90 1 247 240 67 16 76 2 1 86 64 247 240 67 16 76 2 1 87 64 247 176 94 40 240 67 16 76 8 0 17 127 247 186 94 0 240 67 16 76 8 10 17 127 247 177 94 0 240 67 16 76 8 1 17 127 247 240 67 16 76 2 1 74 0 87 247 240 67 16 76 2 1 12 64 247 240 67 16 76 2 1 13 64 247 240 67 16 76 2 1 2 0 247 240 67 16 76 2 1 0 1 16 247 176 91 28 184 0 127 184 32 0 200 0 185 0 127 185 32 0 201 0 240 67 16 76 48 42 5 20 247 240 67 16 76 48 46 5 20 247 240 67 16 76 48 51 5 40 247 240 67 16 76 48 36 5 0 247 240 67 16 76 48 51 4 73 247 184 7 55 184 91 45 185 7 76 178 7 88 179 7 65 179 10 100 179 91 40 179 93 35 179 0 0 179 32 127 195 27 180 7 65 180 10 100 180 91 40 180 93 20 181 7 55 181 0 0 181 32 127 197 49 182 7 71 182 10 70 182 91 42 182 93 0 182 0 0 182 32 127 198 0 183 7 66 183 10 20 183 91 40 183 93 10 183 0 0 183 32 127 199 25 240 67 126 1 0 27 16 28 247 240 67 16 76 2 1 0 1 17 247 240 67 16 76 2 1 12 64 247 240 67 16 76 2 1 13 64 247 240 67 16 76 2 1 12 64 247 240 67 16 76 2 1 13 64 247 240 67 16 76 2 1 2 0 247 240 67 16 76 2 1 0 1 17 247 176 91 28 240 67 16 76 2 1 32 65 0 247 240 67 16 76 2 1 44 64 247 240 67 16 76 2 1 45 64 247 240 67 16 76 2 1 44 64 247 240 67 16 76 2 1 45 64 247 240 67 16 76 2 1 34 0 247 240 67 16 76 2 1 32 65 0 247 176 93 35
midiio.c
0
Comment
Question by:sargent240
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Infinity08 earned 2000 total points
ID: 37760101
If you want the output file to be exactly like what you get on standard output, why not use fprintf instead of fputc ?
0
 

Author Comment

by:sargent240
ID: 37760652
let me check it out.  Thanks for the response, I'll let you know.
0
 

Author Closing Comment

by:sargent240
ID: 37774946
That's a keeper, Thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Six Sigma Control Plans

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question