How to create a bin file
Improve this question. Braiam Add a comment. Active Oldest Votes. Improve this answer. Lekensteyn Lekensteyn k 61 61 gold badges silver badges bronze badges. Thank you for the answer. I will let you know after trying it. If you wish to do that, you can edit your post to add your summary of the information.
I downvoted the answer because the link is gone now and leads to the wrong answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Related Hot Network Questions. Question feed. In this article, we will discuss how to create a binary file from the given text file. Text files : Text files store data in human-readable form and sequentially. Binary files can store multiple types of data, such as images, audio, text, etc. Problem Statement: The task here is to read data from a text file and create a new binary file containing the same data in binary form. There is no requirement, as such, to store all values in a record in text format.
The internal format can be used to directly store values. An option that is good and can be taken as a choice is to define a structure for our record. Let us look at the methods that would be required to read the text file and write in the binary file.
The function required for reading is fscanf and for writing is fwrite. Reading: fscanf function is used to read the text file containing the customer data. Parameters of fscanf :. Skip to content. Change Language. Related Articles. Table of Contents.
0コメント