UrbanPro

Learn C Language from the Best Tutors

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

Search in

Why does execution of a program in C/C++/Java start from only main?

Asked by Last Modified  

Follow 14
Answer

Please enter your answer

MBA Graduate

Main function is calling the other functions of he program and compiler gets this direction while Compiling the code. If it does not find main function then it will also not find the other functions in the code. So, main is required in C program.
Comments

Computer Trainer: Programming & Software Development.

There has to be a MASTER function, which controls all other functions. main is that master function in each programming language.
Comments

Oracle, Hindi, C++, C, MS Office, VBScript,JavaScript,Spoken English etc with 29 years of experience

Because the languages have defined that main() be their entry point. Suppose they left it ambiguous, then you’d have to specify somewhere that method {x} is your starting point which is the same as having a main program which could call that method {x}.
1 Comments

C++ Programming(C/JAVA)

To get this question you need to know the process to which a program go through during compilation, using preprocessor directives all the libraries in header files are opened up and now to implement all of them we need a programming are where a programmer can code, that area/scope is termed as main function.Main(...
read more
To get this question you need to know the process to which a program go through during compilation, using preprocessor directives all the libraries in header files are opened up and now to implement all of them we need a programming are where a programmer can code, that area/scope is termed as main function.Main( ) is like a trunk to a tree(i.e. program),from where we can access all the library components including the stem of the tree(i.e. predefined/userdefined functions). Happy Programming Regards Sachin read less
Comments

JS Academy in Association With Cryptic Technologies Pvt. Ltd.

Because the languages have defined that main() function as the entry point. Suppose they left out main function, then you have to specify somewhere that method manually as your starting point which is the same as having a main program which could call that method automatically.
Comments

Tutor

the main method is an entry point for the compiler. In Java When class is loaded JVM is looks for main class.
Comments

It Professional Trainer With 20 Years of Experience in in Key Aspects of Software Development

main is an entry point (like a main door) for your code written in C / C++ /Java/C# . So without main the code cannot be executed.
Comments

Microsoft Certified Trainer with 12+ years of experience in IT Training

because all these languages are defined in such a way that the main function will be the entry point for the program execution.
Comments

Assistant Professor

Because the languages have defined that main() be their entry point. Suppose they left it ambiguous, then you’d have to specify somewhere that method {x} is your starting point which is the same as having a main program which could call that method {x}.
Comments

Because the languages have defined that main() be their entry point. Suppose they left it ambiguous, then you’d have to specify somewhere that method {x} is your starting point which is the same as having a main program which could call that method {x}. Would you rather write code that just starts...
read more
Because the languages have defined that main() be their entry point. Suppose they left it ambiguous, then you’d have to specify somewhere that method {x} is your starting point which is the same as having a main program which could call that method {x}. Would you rather write code that just starts up some random function? Or do you have a better alternative? If not, then there is no point to this question? read less
Comments

View 9 more Answers

Related Questions

What is meant by "bit masking"?
Mask means to block in bit masking, blocking can be done by bit by bit e.g. 0101 1000 OR -------------- 1101
Kiran
0 0
6
Why is the C language important?
C language is a high-level, general-purpose programming language. It provides a straightforward, consistent, powerful interface for programming systems. That's why the C language is widely used for developing...
Ganesh
0 0
5
Who created C?
The C was primarily created by Dennis Ritchie, an American computer scientist, in the early 1970s while working at Bell Labs. C was designed as a system programming language, initially for building utilities...
Srinivasan
0 0
7
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
How do I learn C programming by videos or books?
BOOKS AND PRACTICE by far remain the best way for learning any language ....
Fgrefg
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

Program to swap the value of two variables without using third variable(simplest way)...
int main() { int a=10,b=20; printf("values of a before swap ="%d,a); printf("values of b before swap ="%d,b); a=a+b; b=a-b; a=a-b; printf("******************"); printf("values of a after swap...

Some interview questions for freshers on C language
Q1. What are the two forms of #include? There are two variants of #include. The one is #include and the other one is #include”file”. In general the first form that is #include is used to...

Tips of learning Java Language/Other Programming Languages
1.You should know the basic concept: If we talk about programming languages so basic concept are same in all the high level languages. So you should know the basic concept firstly then you can easily understand...
I

ICreative Solution

0 0
0


What Are IT Industries Performance Metrics?
1. Outstanding Expectation: Eligible to get Promotion easily and good salary hike. Always preferrable to go abroad. 2. Exceed Expectation: Can get Promotion as per schedule of company with good salary...

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 >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

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