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 2
Answer

Please enter your answer

I Train C,C Plus Plus,JAVA,Advanced JAVA,SQL

A Program starts executing from main().void is a datatype which means null.It Means the main function returns nothing.
Comments

My teaching experience 12 years

In C, `void main()` is not a standard signature for the `main` function. The correct signature for the `main` function in C is `int main()`. The `int` return type indicates that the function returns an integer value, typically used to convey the exit status of the program to the operating system. The...
read more
In C, `void main()` is not a standard signature for the `main` function. The correct signature for the `main` function in C is `int main()`. The `int` return type indicates that the function returns an integer value, typically used to convey the exit status of the program to the operating system. The `void` keyword indicates that the function does not return any value. Using `void main()` is a common mistake or misunderstanding, and it may not be supported by all compilers. read less
Comments

Software Engineer, with excellent knowledge

In the C programming language, void main() is not a valid signature for the main function. The correct signature for the main() function in C is either int main() or int main(int argc, char *argv). The main() function serves as the entry point of a C program. It is where the execution of the program...
read more

In the C programming language, void main() is not a valid signature for the main function. The correct signature for the main() function in C is either int main() or int main(int argc, char *argv[]).

The main() function serves as the entry point of a C program. It is where the execution of the program begins. The int return type indicates that the main() function should return an integer value to the operating system upon completion. By convention, a return value of 0 typically indicates successful execution, while a non-zero value indicates an error or abnormal termination.

Here's a brief explanation of the correct signatures:

  1. int main(): This signature is used when your program doesn't require any command-line arguments. The absence of parameters means that the program doesn't receive any arguments from the command line.

  2. int main(int argc, char *argv[]): This signature is used when your program needs to accept command-line arguments. The argc parameter represents the count of command-line arguments passed to the program, and argv[] is an array of strings containing those arguments.

read less
Comments

C language Faculty (online Classes )

In other words, the void data type is used when we don't want to return any value to the calling function. Furthermore, it is used with the main() function to return nothing and can be used with user-defined and predefined functions in C programming.
Comments

View 2 more Answers

Related Questions

What is important topics in C-language for interviews???
Functions, Arrays , String, pointers , structures
Gayu
What are the main characteristics of c programming?
C programming is characterized by several key features that contribute to its popularity and versatility. Here are some of the main characteristics of the C programming language: Procedural Programming: ...
Balendra
0 0
6
How is C++ language used nowadays?
C++ is a fast and strongly-typed programming language which makes it an ideal choice for developing operating systems. Mac OS X has large amounts written in C++. Most of the software from Microsoft like...
Arumugam
0 0
5
How do I program a game using C program?
Programming a game in C involves several steps. Here's a simplified guide to get you started: Define Your Game Concept: Clearly outline the game's concept, rules, and objectives. Setup Your Development...
Sumitha
0 0
6
Can include files be nested?
one line can only include one directory. No nesting is applicable.
Himangi
0 0
7

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

Ask a Question

Related Lessons

Programing Languages Learning Tricks
You want to learn that new language or library or framework as soon as possible, right? That’s understandable. Fortunately, there are a handful of tips that can help you to better retain all of that...

Harshal G.

0 0
0

C Program Sample Application
//Standard Library Functions(Header Files used) #include<stdio.h> #include <conio.h> //Main method int main() { // function for clearing screen clrscr(); // function to print the output...
S

Basic Concepts of Web Designing
An introduction to domain names, web servers, and website hosting 1)What is the web? In a nutshell, the web is a whole bunch of interconnected computers talking to one another. The computers (on the...

Recursion in C Programming
The process of calling a function by itself is called recursion and the function which calls itself is called recursive function. Syntax of Recursive Function returntype recursive_func () { statements; ...
R

Ravindra Yadav

2 0
0

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

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 >

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 >

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