answersLogoWhite

0

FILE* f

f = fopen ("file name", "br");

... fread (f, ...);

fclose (f);

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Programming files in binary access mode in qbasic?

In QBasic, programming files in binary access mode allows you to read from and write to files using binary data rather than text. You can open a file in binary mode using the OPEN statement with the FOR BINARY option. This mode is particularly useful for handling non-text data, such as images or compiled objects, as it provides direct control over the byte-level representation. Use the GET and PUT statements to read from and write to the binary file.


What is difference between binary file and Excel file?

When referring to Excel 2007, there are two file types you can use when you save a file, XML and binary. If you save the file as binary, then there is no difference between the two. If you save the file as XML, then the XML file contains XML formatting data (explanation beyond the scope of this question) and the binary file is formatted for computers to read directly.


How do you read a value from .pdf file using winrunner TSL scripting?

try with file_open command it will work. if not possible asume that as a image and then using coordinates you can get a value bye chanti


How do you make a command on Ubuntu 9.04?

Anything can be made into a command on a Linux system. The steps are easy. First, using any text editor (vim, emacs, etc.) create a text file. Put anything you want to do in this file. Save the file. Make sure the file you just created has read and execute permissions (chmod). That's it! Now you have a command that you can execute in Linux.


What command can be used to take full access of a file?

To take full access of a file in a Unix-like operating system, you can use the chmod command. For example, chmod 777 filename grants read, write, and execute permissions to the owner, group, and others. Be cautious when using this command, as it allows anyone to modify or execute the file. Always consider the security implications of changing file permissions.


Can a binary file be text file?

A binary file cannot be a text file, as they are defined by their content and structure. Text files contain human-readable characters encoded in a specific format (like ASCII or UTF-8), while binary files contain data in a format that is not intended to be read as text, often including non-printable characters. However, a binary file may contain text data within it, but it would still be classified as a binary file due to its overall structure and encoding.


Is there a way to convert a binary dll file to text so the dll file can be read and understood?

If you have access to the symbols and a debugger, then yes. However, without a symbol file for the binary, you can only extract limited information from the binary. You might try Spy++(SpyXX.exe), Dependency Walker (depends.exe), and/or a hex editor. A symbol file will have the same name as the binary DLL, or EXE and a file extension of .pdb (e.g. ntdll.dll, ntdll.pdb / ntoskrnl.exe, ntoskrnl.pdb)


How do you read input of a programme from a text file using borland c compiler from command prompt?

Use functions like fopen, fclose, fgets, sscanf, strtok


What is the working of attrib command?

The attrib command is a Recovery Console command used to change the file attributes for a file or directory while in Recovery Console. An attrib command is also available from the Command Prompt. attrib [+r|-r] [+s|-s] [+h|-h] [+c|-c] [filename] +r = This assigns the read-only file attribute to the file or directory. -r = This removes the read-only attribute. +s = This assigns the system file attribute to the file or directory. -s = This removes the system attribute. +h = This assigns the hidden file attribute to the file or directory. -h = This removes the hidden attribute. +c = This assigns the compressed file attribute to the file or directory. -c = This removes the compressed attribute. filename = This is the file or directory that you are wanting to change the attributes of.


Insert the blob data into the table?

To insert blob data into a table, you can use an SQL INSERT statement with a parameterized query. For example, in a programming language like Python using a library like SQLite, you would prepare the SQL command, open a binary file, read its contents, and execute the command with the blob data as a parameter. Ensure that the table's column intended for the blob data is correctly defined to accept binary data types. Always handle exceptions and ensure proper resource management when working with database connections.


Which mode is used to open a binary file in write and read mode?

open: O_BINARY|O_RDWR fopen: "rb+"


How do you read files in python?

Assuming that the file contains just textual stuff, create an object to represent it: stuff = file ( 'stuff.txt' ) To read a line of the file at a time: line = stuff.readline() Python signals end-of-file by returning an empty line which you can test for in a construction such as the following: stuff = file ( 'stuff.txt' ) while True: line = stuff.readline() if line : # do something here pass else : break You can read the entire file using : whole_contents = stuff.read() If the file had contained binary then it would have been necessary to open it as such: stuff = file ( 'stuff.bn', 'b' )