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

What are the main characteristics of c programming?
C programming is characterized by several key features that contribute to its popularity and versatility. Here are some of the main characteristics of the C programming language: Procedural Programming: ...
Balendra
0 0
6
How can I make my C programming basics strong?
Practise more programs on each and every topic of C.
Mohit
0 0
5
What purpose does \n have in C programming?
is used for new line. It prints the output in New or next line
Nasar
0 0
9
What is the actual size of INT in the C language, 2 or 4 bytes?
The actual size to int is determined by the compiler as the program runs. But theoretically the size is 2 bytes. You can increase the size by adding keyword long infront of it to make the size 4 bytes. Eg int a; // 2 bytes Long int b; // 4 bytes
Kunal
What are the __DATE__ and __TIME__ preprocessor commands?
The standard predefined macros are specified by the relevant language standards, so they are available with all compilers that implement those standards. Older compilers may not provide all of them. Their...
Subhasish

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

Ask a Question

Related Lessons

C Program-Temperature [conversion from farenheit to degree celsius]
//WAP to convert temperture from farenheit into degree celsius //Header files#include<stdio.h>#include<conio.h> //Main functrion void main(){ //Variable declaration of type float float...

C++ Program-Working with constant using #define preprocessor
//Header Files #include#include // using #define preprocessor for defining a constant#define len 10#define br 5#define rad 3#define NEWLINE '\n' //Main function void main(){ int area_r; float area_c; //Function...

Why C is a Language and not a database?
When I interviewed a candidate, I raised this question many times, but I have not got the answer correctly. To under why C is a language and not a database, it is good to understand why our communication...

Basics Of C And C++
C++ is powerful, highly flexible, and adaptable programming language that allows software engineers to organise and process information quickly and effectively. But this high-level language is relatively...

C Program-The Odd Loop Demo
/* WAP to print square value of the number entered by user using odd loop*/ //Header Files #include<stdio.h>#include<conio.h> //Main Function void main(){ char another='y'; int num,sq; //...

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