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

When is a "switch" statement better than multiple "if" statements?
switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type. For instance, rather than the code if (x == 1) printf(“x...
Shalu
What is the difference between #include< > and #include" "
first one is used for predefined header files.. and second is used for user defined header files
Priya
1 0
6
Why is a compiler used for language C and not an interpreter?
C is a structured programming language. It’s code consists of many macros, function calls references etc., which is required to be decoded before program’s execution can take place, so that any error is...
Savitha
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
in c : i want run time input: data=[name:raj,age:20] output: value[0]=raj value[1]=20 i want c code
Make use of Command line argument and access using argv,argc.
Vanaraj

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

Ask a Question

Related Lessons

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

Difference Between C Language and C Program
C Language: C Language is structured, high level and machine independent language. C Program: C Program is the collection of functions that are supported by C library.
S

Shashwat Kumar

0 0
0

C Program-String Palindrome
//Header files #include<stdio.h>#include<conio.h>#include<string.h> //Main function void main(){ char mystring; int i,length; int flag=0; //Function for clearing screen clrscr();...

Understanding Computer Science Concepts with Images and Videos..
All Computer science concepts relating to programming and software development are only virtual. It cannot be practically shown as a hardware parts of a computer. But for better understanding it should...

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

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