UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

The object file is in binary code, and the machine understands the binary language. So why object files are not executed?

Asked by Last Modified  

Follow 5
Answer

Please enter your answer

IT Professional having 10 years of experiance in Web desgning and development

Object files are sources compiled into binary machine language, but they do not have library files, so they are not executed.
Comments

The computer can understand only binary language, which is object code. In your code, let's say you have used some functions like print, loops like (for, while etc.), conditions like if, case etc.For ex: X =20 10 = Y print(X,Y)Compiler flags error for 10 = Y as it is syntax(grammar) error. You need to...
read more

The computer can understand only binary language, which is object code. In your code, let's say you have used some functions like print, loops like (for, while etc.), conditions like if, case etc.
For ex: X =20
10 = Y
print(X,Y)
Compiler flags error for 10 = Y as it is syntax(grammar) error. You need to rectify the error.
In the above code, you have used print.
But how do computers know what to do with print? It does not. These pre-written built-in functions are already written in a binary language and are stored in Libraries. That means you need not write code for these functions. All that you need to do is, use them. When your source code is converted into object code, the compiler will check for syntax, if fine, converts them to object code.
and then your object code is linked with Libraries (means semantics is established)
E.g., Ravana Killed Rama. This is syntactically right but semantically (meaning implied by the sentence is "Meaningless sentence").
Rama killed Ravana is syntactically and semantically CORRECT.
In the same way, when you use print in your code, the meaning or what to do will be implied during linking to libraries. Then only object code will be converted into complete Executable code.
The Executable code, without regard for device/OS, can execute anywhere.

read less
Comments

IT Project Manager for 20+ years

The computer can understand only binary language, which is object code. In your code, let's say you have used some functions like print, loops like (for, while etc.), conditions like if, case etc.For ex: X =20 10 = Y print(X,Y)Compiler flags error for 10 = Y as it is syntax(grammar) error. You need to...
read more

The computer can understand only binary language, which is object code. In your code, let's say you have used some functions like print, loops like (for, while etc.), conditions like if, case etc.
For ex: X =20
10 = Y
print(X,Y)
Compiler flags error for 10 = Y as it is syntax(grammar) error. You need to rectify the error.
In the above code, you have used print.
But how do computers know what to do with print? It does not. These pre-written built-in functions are already written in a binary language and are stored in Libraries. That means you need not write code for these functions. All that you need to do is, use them. When your source code is converted into object code, the compiler will check for syntax, if fine, converts them to object code.
and then your object code is linked with Libraries (means semantics is established)
E.g., Ravana Killed Rama. This is syntactically right but semantically (meaning implied by the sentence is "Meaningless sentence").
Rama killed Ravana is syntactically and semantically CORRECT.
In the same way, when you use print in your code, the meaning or what to do will be implied during linking to libraries. Then only object code will be converted into complete Executable code.
The Executable code, without regard for device/OS, can execute anywhere.

read less
Comments

Tutor taking Computer subjects Classes

Object Code is verified and syntactically correct code which is ready to be executed. However, the code has to be linked with the library functions used in the program for execution. Finally, all the modules are loaded after that object code is converted to the exe file, which gets executed to produce...
read more

Object Code is verified and syntactically correct code which is ready to be executed. However, the code has to be linked with the library functions used in the program for execution. Finally, all the modules are loaded after that object code is converted to the exe file, which gets executed to produce the output.

read less
Comments

Ethical Hacker and Computer Scientist

Object files are the output of a compiler; they are binary machine-readable bits of programs that are not capable of being run because no libraries have been used at this time. There are no logical connections that the system can make and the only function that exists is the one described in the source...
read more

Object files are the output of a compiler; they are binary machine-readable bits of programs that are not capable of being run because no libraries have been used at this time. There are no logical connections that the system can make and the only function that exists is the one described in the source file.

read less
Comments

Engineer - Computer Science, Expert

For program execution, static and dynamic libraries are required to be linked. Just the object of a source file is not enough. study COFF. It may help understanding a new concept.
Comments

IT Professional Trainer Coach (with 15+ yrs of experience for All boards from 6th std to Engineering

Object files are files that are converted by the compiler. These object files can be stored for future execution purposes on another machine or the same platform. However, there are no linkings done yet to these object files. After linking them from libraries, they are converted into executable exe files.Also,...
read more

Object files are files that are converted by the compiler. These object files can be stored for future execution purposes on another machine or the same platform. However, there are no linkings done yet to these object files. After linking them from libraries, they are converted into executable exe files.
Also, it links only those library files that are relevant to a particular platform.
Hence object codes are not executables.
Best luck..!

read less
Comments

M.sc (Comps) pursuing M.Tech

Object files are the output of a compiler; they are binary machine-readable bits of programs that are not capable of being run because no libraries have been used at this time. There are no logical connections that the system can make and the only function that exists is the one described in the source...
read more

Object files are the output of a compiler; they are binary machine-readable bits of programs that are not capable of being run because no libraries have been used at this time. There are no logical connections that the system can make and the only function that exists is the one described in the source file.
An executable has all dependencies and library files resolved and so can be executed directly by the CPU.

read less
Comments

Object files are not executed due to logical linking.
Comments

View 7 more Answers

Related Questions

Which language is best, C, C++, Python or Java?
If you want to learn any languages C#, Java, ect. then must to learn C, C++ language as these are base or language to be strong in language skills. C++ is improved version of C language. C#, Java, J# and etc. which are improved version of C++.
Sribaghya
0 0
6
Is a default case necessary in a switch statement?
NO, default is optional and you can omit it if there is no use of it.
My
What is the concatenation operator?
In many programming languages, string concatenation is a binary infix operator. The + (plus) operator is often overloaded to denote concatenation for string arguments: "Hello, " + "World" has the value...
R.s.praveen
How is C++ language used nowadays?
C++ is a fast and strongly-typed programming language which makes it an ideal choice for developing operating systems. Mac OS X has large amounts written in C++. Most of the software from Microsoft like...
Arumugam
0 0
5
What is the most efficient way to store flag values?
A flag is a value used to make a decision between two or more options in the execution of a program. Efficiency in this case is a tradeoff between size and speed. The most memory-space efficient way to...
Deepak
0 0
6

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

How do i get best Campus / Off Campus Placement?
Companies are looking for Skilled Freshers. So build your technical skills while doing MCA / BTech / BCA / BSc (IT or CS) into below areas- 1. Strong your programming & debugging skills ...

10 Tips to improve your learning
1. Have a quick revision of topics that you have read in past three days before you start studying a new topic. 2. Make your own notes containing the summary of the topic. 3. Allot proper timing for...

Why we need to learn Programming languages?
Language is medium for communication. If two parties like to communicate or exchange the thoughts they must know a language. Language should be understandable by both the Parties. For example A wants to...

C for Begginers
C is an procedure oriented programming language. For any begginer the word program is new. Program: Set of instructions to be followed by machine or computer. Instruction Examples: Arithmetic instruction...

Java and C trainer
Always think any conspect with real-time example like Object -- object must have states and behaviour then only we will call that thing is Object like fan is Object (rotating,color)

Recommended Articles

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more