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 is "&" called in C language?
In the C programming language, the "&" symbol is called the "address-of" operator. It is used to obtain the memory address of a variable. When you use "&" followed by a variable name, it provides...
Soumya
0 0
5
Is C#, C++, Python, or JS better for game development?
All languages good for gamjng. But you can make 3d games in c# uaing unity software and it's very very interesting to work on it.
Mohit
0 0
6
Can an ECE graduate with some knowledge of C language learn SQL?
Yes ECE graduate student learn SQL languuage bcuz SQL is. A structured query language. it all query depends upon the logic. In which table is used Nd database is maitained
Anand
0 0
5
What is the structure of a C program?
It typically consists of sections such as preprocessor directives, global variable declarations, function prototypes, the main function, and user-defined functions. A clear structure ensures logical flow,...
Snehal
0 0
5

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

Ask a Question

Related Lessons

Pro learners tip for C language
First get the concept of algorithm before heading to write your first program.

Pointers Concept
Every variable has a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator, which denotes an address in memory. Consider the following...

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-Vowels and Consonants
/*WAP to print the character entered by user is a vowel or consonant*/ //Header files #include<stdio.h>#include<conio.h> //Main functionvoid main(){ char c; //Function for clearing screen...

How to write shared library program using C Programming?
Library Name : hellofilename : hello.c#include void Hello(){ printf("Hello World .. How are you 1\n");}======================================Header File:hello.h#ifndef __HELLO_H#define __HELLO_Hvoid Hello(void);#endif===============================Application...

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