answersLogoWhite

0


Best Answer

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

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between an executable file and a .class file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Explain executable versus non-executable files in DOS?

difference between executable file and non-executable file in dos


If you type a paper for English class and save it on the hard drive it is called an executable file?

No.


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.


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.)


Which is not executable file TXT BAT COM EXE?

BAT is not an executable file in windows.


EXE is executable file?

exe is a common filename extension denoting an executable file


How do open a mp3 executable file?

An MP3 file should not be executable unless it is a malicious file. Don't open it.


Does alg exe represent an executable file?

Putting '.exe' after a file name means that it is an executable file. This means that it is a program that can run by its self. So, yes, exe does represent an executable file.


What is the difference between linking and loading process?

Linking is a process of combining various pieces of code and data together to form a single executable file. Loading is the process of copying the program from hard disk to main memory in order to put the program in executable state