Read a .out file and print its contents

0 vercetti tommy · October 29, 2014
I have to create a c program that can read the contents of a file with ascii characters and convert them to their original values e.g. 009 = /t. 
Any help would be much appreciated :)

Post a Reply

Replies

Oldest  Newest  Rating
0 Youknees Adoro · November 2, 2014
These codes do not directly answer the given problem, but it can help.

you have to first write the Ascii characters using the following code:

(you have to change the location of the file in my code, replace it with the file location of your  .txt file)
it automatically creates the .txt file if you haven't made one yet.

/images/forum/upload/2014-11-02/aaf259c2951b5c67c5ce56f0a89bcfed.PNG






the second set of codes is for reading the ascii characters


Notice that the mode "w" is change to "r" because these codes are for reading






/images/forum/upload/2014-11-02/88d840d327852d952ae7d371034674f4.PNG




this is the list of ascii characters

/images/forum/upload/2014-11-02/0812dd81cb94d6a9bcd29e820194fdd2.png
  • 1

C

107,124 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator