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

How can I develop my C language?
https://vz-3ad30922-ba4.b-cdn.net/c616c4df-8596-4ae7-bb61-c6f1d87e5e4d/play_480p.mp4
Mohit
0 0
5
In Java programming, what are the differences between the functions of 'int' and 'int []' when working with an array?
The may appear as part of the type at the beginning of the declaration, or as part of the declarator for a particular variable but But int a keeps type information together and is more verbose so I prefer it.
Kalpana
0 0
5
Can we pass arguments in the main function in C language?
Yes. it is possible to pass arguments into the main function.
Mukesh
0 0
7
What is the cost of the course?What kind of questions are asked for interviews from C language??
Course fee depends on the depth of the course. Interview question are mainly from DS(Data Structure) importantly linked list, BST tree,array and except this pointer, string, function and recursion is important.
Chandana
How do I trace C programs in Turbo C?
First of all goto C drive then program files then turbo c folder then open bin folder and search what program u want
Orange
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

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

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...

C Programming basics
C PROGRAMMING BASICS 10 Hours Introduction to ‘ C’ programming –fundamentals – structure of a ‘C’...
O

Om K.

0 0
0

Variables
Variables in C Language:A variable is a name that may be used to store a data value. Unlike constant, variables are changeable, we can change value of a variable during execution of a program. A programmer...

C Program-Error Handling
//Header files #include<stdio.h>#include<conio.h>#include<stdlib.h> //Main function void main(){ int dividend=10; int divisor=0; int quotient; //Function for clearing screen clrscr(); ...
S

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