UrbanPro

Learn C Language from the Best Tutors

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

Search in

What is a void main() in the C programming language?

Asked by Last Modified  

Follow 1
Answer

Please enter your answer

C language Faculty (online Classes )

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

read less
Comments

My teaching experience 12 years

In C programming, void main() is an incorrect signature for the main function. The correct signature is int main(). The main function serves as the entry point for C programs and typically returns an integer to the operating system upon completion. Using void main() may lead to compilation errors.
Comments

C, Python FullStack, Java FullStack Coding Instructor

void main() suggests no return value, which is not standard. Use int main() and return an integer at the end of the program (typically return 0; for successful execution)
Comments

Adobe Certified , Microsoft Certified Trainer with 9 years of experience

The void main() indicates that the main() function will not return any value, but the int main() indicates that the main() can return integer type data.
read more
 

The void main() indicates that the main() function will not return any value, but the int main() indicates that the main() can return integer type data.

read less
Comments

Engineering background teacher with 5+ years of teaching experience.

In C programming, void main() is not a recommended or standard way to declare the main function. The correct signature for the main function is either int main(void) or int main(int argc, char *argv). Using void main() is considered bad practice and might result in undefined behavior or compilation...
read more

In C programming, void main() is not a recommended or standard way to declare the main function. The correct signature for the main function is either int main(void) or int main(int argc, char *argv[]).

 

Using void main() is considered bad practice and might result in undefined behavior or compilation errors. The main function should return an integer, typically zero to indicate successful execution, and the int type should be specified in the function declaration.

Here's an example of a standard main function signature:

int main(void) {

    // Your code here

    return 0;

}

read less
Comments

View 3 more Answers

Related Questions

How can you be sure that a program follows the ANSI C standard?
The ANSI C standard provides a predefined symbol named __STDC__ that is set to 1 when the compiler is enforcing strict ANSI standard conformance. If you want your programs to be 100 percent ANSI conformant,...
Vibha

Is C language is used for hack or not?

Yes its is used for hacking purpose.
Jangam
What is a calling function in C?
Calling function is the one where the function call has been made and after executing the called function, control returns to the calling function.
Gowre
0 0
5
Can a function defined inside another function?
No, you can call other function(s) inside a function but you cannot define a new function in it.
Kamal
0 0
8
Do every operator has an Associativity?
Yes, every operator will have an associativity.
Basundhara
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

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

Why do pointers have a datatype?
Before we start with pointers you must know what is a variable and a datatype. int a; This is the basic line in every program in 'C' . It means that we are asking the compiler to give us 2 bytes of space...

Programming Practice Technique
Any Programming Language required an Algorithm. Algorithm - It is the finite set of instructions in which each and every instruction has the meaning, instructions are not ambiguous and all the instructions...

Is It Fine To Write “void main()” Or “main()” In C/C++?
The definition: void main() { /* ... */ } Is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1 or the ISO C standard 5.1.2.2.1. A conforming...

Some Tricky Questions in C
Can you write two functions in which one executes before main function and other executes after the main function? #pragma startup #pragma exit Where, priority is optional integer value.For user priority...

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 >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

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