UrbanPro

Learn C Language from the Best Tutors

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

Search in

What is void main () into main and what it does?

Asked by Last Modified  

Follow 12
Answer

Please enter your answer

Have 10+ years experience in IT Education and Projects

Void main () is the entry point for execution in C program. The void is a keyword that represents function will not return anything but a void value. Main is the name of the function and () represents parameter list that can be passed to function in this case nothing is passed. Syntax of main function...
read more

Void main () is the entry point for execution in C program. The void is a keyword that represents function will not return anything but a void value.

Main is the name of the function and () represents parameter list that can be passed to function in this case nothing is passed.

Syntax of main function is :
dataType main()
{
// your code here

}

in the above function, dataType is the type of data (int, float or string) return by the main function.

read less
1 Comments

.NET Professional Trainer with 12 years of experience

Void means nothing or empty. void main() - means here main() return nothing.int main() - means here main() returns an integer value.
1 Comments

Void is return type of function.
Comments

I am senior Full Stack developer and corporate trainer with 10 + years of experience in IT Industry.

The void is a data type which tells to compile; it is a return type of the main function. The main is a predefined function which is the entry point of every program.
Comments

Void main is the entry gate of the program when you run the program then this is called first by the compiler.
Comments

Learn only to Achieve Success

Void main is a function which does not return any value. Or in the simple form, it is null so we can return anything. If used int main will requires returns 0 or any value as maths rule LHS=RHS.
Comments

Computer Science Engineering - Assistant professor

When nothing is to be returned from the main function, we write void main() because void is taken as NULL. When the value to be returned is in integer format, we write int main().
Comments

Trainer

As we know, C Language is a Procedural language, where the emphasis is on functions or procedures. The main() is a function from where any C Program starts execution and void is a keyword which is used in the place of function's return type which means the function will not return any value at the point...
read more

As we know, C Language is a Procedural language, where the emphasis is on functions or procedures. The main() is a function from where any C Program starts execution and void is a keyword which is used in the place of function's return type which means the function will not return any value at the point of call.

read less
Comments

Main () is the function from where program execution starts. And the void is the empty return type.
Comments

IT Professional and Trainer with 14 years of Teaching Experience

Hello Noreen, In simple terms, the void main() is an entry point of c, c++ or Java program. In C, C++ or Java, the program starts execution from the main function. Now let's talk about the main part of your questions what is void in void main(). C has statically typed programming language before sending...
read more

Hello Noreen,

In simple terms, the void main() is an entry point of c, c++ or Java program.

In C, C++ or Java, the program starts execution from the main function.

Now let's talk about the main part of your questions what is void in void main(). C has statically typed programming language before sending it to the compiler we always need to specify the return type of function. If the function is returning any value which is going to be used in an expression, then you should specify a return type, e.g. int, float, char.

If the function is not returning any value at that time, you must specify void so that compiler won't look for the return value in the function.

If you're using modern compiler like GCC, you need to specify int main so that where you can return 1 or 0 or -1 to the loader.

Also, don't get confused between Null and void. There is a different meaning of null in programming. Null is considered as a value or constant when you want to create a variable you can assign null value, but you can't assign void to any variable. 

I hope this will clear your doubt. If not, try to practice on the same and learn from errors.

Happy Coding :)

read less
1 Comments

View 48 more Answers

Related Questions

hello sir my name is suryateja i am studying in diploma in computer science and engineering my college complect in c language subject i practice with in simple programs my write to won programs how it you?
Hi Syateja, if I understand your questions correctly let me answer. Best thing to learn and progress is to practice writing programs, initially small programs then gradually can write complex program....
Suryateja
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
Do array subscripts always start with zero?
Yes, it is a always starts with Zero index to Arraysize-1. If arrasize is 100 then index or subscript of array will be 0 to 99. Mostly all languages follow the same rule like C, C++, Java, C#, etc.
Avishkar
Is it necessary for a programmer to start his career by learning the C language first?
no, but c is the basic if u have good analysing skills need to learn if u learn c , you can easy to get the c++ else u have put some effort on this session f c++
Shilpa
What is C language used for?
What is the C Language? The 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...
Anil
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

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

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

C Language
To get help in C window (for keywords, functions) press Alt +F1.To delete a single line , use the shortcut key CTRL +Y.If you got error about the path when you execute a C pgm, check the Options menu =>Directories.
T

Thilagam S.

0 0
0

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

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 >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

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 >

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