Binary file to ASCII....

S

swetha

HI Every1,
I have a file in binary format. Using a C program i
have to read that file and need to make some changes . So i wanted to
convert that into ACII format.Can any1 suggest me how to do that
please.....

Thanks In Advance....
Swetha..
 
C

cr88192

swetha said:
HI Every1,
I have a file in binary format. Using a C program i
have to read that file and need to make some changes . So i wanted to
convert that into ACII format.Can any1 suggest me how to do that
please.....

question is too vague...

for example, do you want a hexdump?
do you want to transfer binary payload in a textual container (base64)?
do you want to decompose some binary format into a human readable form?
....
 
E

Ed Prochak

HI Every1,
I have a file in binary format. Using a C program i
have to read that file and need to make some changes . So i wanted to
convert that into ACII format.Can any1 suggest me how to do that
please.....

Thanks In Advance....
Swetha..


I can make the change for you and send the result to your instructor.
Just send me the email address of your instructor with the file.

Ed
 
C

cr88192

Ed Prochak said:
I can make the change for you and send the result to your instructor.
Just send me the email address of your instructor with the file.

just wondering:
what exactly in this convinces you it is a homework question?...
I could not tell.

to me it sounds more like a vague newb question...
 
O

osmium

swetha said:
I have a file in binary format. Using a C program i
have to read that file and need to make some changes . So i wanted to
convert that into ACII format.Can any1 suggest me how to do that
please.....

What if you were told to produce a hard copy (printed) version of the file,
could you do that? That's pretty much what an ASCII file is, except it
isn't printed or displayed on a monitor, the resultant output is put in,
well, a file. .

If you couldn't do that, why not? There must be some way, *known to you*,
of representing each datum in the original binary file, no exceptions
permitted.
 
J

James Kuyper

swetha said:
HI Every1,
I have a file in binary format. Using a C program i
have to read that file and need to make some changes . So i wanted to
convert that into ACII format.Can any1 suggest me how to do that
please.....

Binary isn't a format, it's a type of format; basically, the term can be
applied to any file that contains data that isn't stored as text. You
need to know the actual details of the file's binary format in order to
write a program to convert it into ASCII. Find documentation of that
format, and then someone can help you figure it out.
 
S

Sheth Raxit

HI Every1,
I have a file in binary format. Using a C program i
have to read that file and need to make some changes . So i wanted to
convert that into ACII format.Can any1 suggest me how to do that
please.....

1. make your question clear.
Binary file means ELF-etc file or binary data file.

"You can read binary data file <if it was written using fwrite etc>
using fread." <this may be the answer> <very simillar to you read
ascii file>

-Raxit
 
S

santosh

1. make your question clear.
Binary file means ELF-etc file or binary data file.

She made it reasonably clear in a later post that the file was a program
data file consisting of structures.
"You can read binary data file <if it was written using fwrite etc>
using fread."

What are you intending to convey by using angled brackets? Note that
getc() and fgetc() can be used on non-text files too. However it's not
as convenient as fread().
<this may be the answer> <very simillar to you read ascii file>

What's up with all the angled brackets?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top