answersLogoWhite

0


Best Answer

windows support 2 file formats

1.text file

2.binary file

in a text file in windows , each line is teminated with a carriage reurn followed by a linefeed character .but when a file is read by a c prog in text mode,c library converts

carriage reurn/ linefeed character both in to a single linefeed character.

but in case of binary file ,the prog will see both carriage return & linefeed character

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

There are two questions that should be answered here. What is ASCII file and what is binary file?

The binary file contains information in bytes. "00AAFF12" this is 4 bytes in HEX (base 16) representation. And every file for computer is only sequence of bytes, this means every file is binary file.

When we talk about ASCII, we often use that to note that there should be a text inside file. What is ASCII? It is encoding there each byte represents a character from predefined characters table. Again the same file contains only bytes and is binary file too.

The only difference is in what context you use them. Binary file is often used when we talk about non standard file which do not have structure or does have, but it is not possible to read it with any standard tool until you find a way. When you mention ASCII, you tell that the specific file should be interpreted as it has text inside it (one byte equals one character).

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between binary file and executable file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is there a .bat to .exe converter that also makes a dll with the .exe too?

No. A bat file is sort of a script. It cannot be compiled nor changed into binary executable.


What is the difference between a obj file and an exe file in C?

.obj is a simple data-format file that represents 3D geometry alone. .exe is an executable file that usually contains other resources which are sometimes used for a Graphical User Interface. Being simple, its a file to perform indicated tasks according to encoded instructions.


How can create a exe file in c?

An 'exe' extension file is created by a compiler that translates source code to machine code, usually in a Windows environment. An executable program can open any file (including other executable files) by using the standard file API calls with a binary open option. Unless you are doing something very specific with executable files it doesn't make much sense to read in an executable file from another executable file or program.


How do you open a C file as an executible file?

In a canonical C compiler, you type "cc (program file name).c (return) and it spits out "a.out", which is an executable. Works with the original Kernighan and Ritchie C compiler. For C++, use the .cpp extension and "g++" for the compiler: In a terminal window, on MacOS, 'cc (program name).c (return)' 'g++ (program name).cpp (return)' produces an executable named "a.out", which can be run. '-o (some file name . extension) will change the output file name.


What make a file executable?

This depends upon the operating system. In Windows, the operating system determines if a file is executable by the file extension. There are three windows executable file extensions that I know of: .exe, .com and .scr .com is the simplest executable file: it's contents are simply copied into memory and execution begins at the beginning of the file in memory. Because of this simplicity, .com files may be no larger than a little under 64KiB, and they can only be loaded into memory at address 0x0100. .exe files are more complicated: they are split up into multiple segments. The file contains a header, several tables, a .text section which contains the actual executable instructions, a .data section which contains any static or global data, and more. If the file does not match a specific structure, then the operating system will refuse to execute the file. Thus, in Windows, in order for a file to be executable, it must have the proper file extension, and it must match a specific format for that file extension.

Related questions

Explain executable versus non-executable files in DOS?

difference between executable file and non-executable file in dos


What type of file ends in exe?

Binary executable.


What is the difference between an executable file and a .class file?

Both are binary files but the differences between those are:- 1) we can execute an executable file while we cannot execute an object file. 2) An object file is a file where compiler has not yet linked to the libraries, so you get an object file just before linking to the libraries, so still some of the symbols or function definitions are not yet resolved which are actually present in the libraries, and that's why we cannot execute it. Once an object file is linked with the library by the compiler, then all the symbols are resolved and we get an executable file which can be executed on the appropriate platform. So basically the difference is that we get an object file when we don't link with library while executable file is with the linking phase. In gcc we can direct compiler not to link with library and so it will prepare the object file :- gcc -c test.c It will automatically create test.o object file when you try to execute it like:- ./test.o cannot execute 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.


What utility on Linux can be used to copy a file including text and executable program binary files?

The cp command does that.


Is a corrupted executable file harmful to the computer?

An executable file is a stand-alone binary file, in windows the most common executable files are followed by the extension .exe. A corrupted executable file is a one of these stand-alone binaries that either has missing data or data formatted in such away that it cannot be interpreted by the computer. Most of the time these occur because of half downloads or missing data, but in rare occasions it can be caused by third party harmful applications that modify the binary data making it unreadable.


What is another name for executable file?

an executable file is a file that is extended longer


Is Excel an executable file?

The main Excel program file (excel.exe) is an executable file, but the workbooks it creates are not executable files.


What the different between non-executable files to executable files?

Executable means that the file has a series of instructions used to execute a program. Non-executable files are ones that do not have these instructions.


What is the difference between applet and jsp?

Applet is an executable file that is automatically downloaded when we open a browser. Swing applications can operate on local data when the network is not there.


If you have been asked to download a file which is a binary file - does it causeany problems to the computer?

Binary usually is an executable file. That means whatever the file is, you Run it. It is some sort of program....code that does something. Could be legit. could be a virus. depends. If somebody told you it is a picture, song, or document, it is not...do not run it.


What is difference between File name and file extension?

A file name is what a file is called. A file extension defines what type of file it is. (Text file, HTML file, executable, etc.)