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

How do I become good in competitive programming in a year if I have just started learning C language?
The best topics to learn would be Data structures and also the analysis of algorithms..(THESE ARE BASICS BUT IF U LEARN THEM PROPERLY!!! CODING WOULD BE A PIECE OF CAKE FOR U....)
Anmol
0 0
9
What is the meaning of \n and \t in C language?
is used for new line and \t is used to give 3-space (1 tab space) in between the words
Soumya
0 0
5
How can I learn C easily and rapidly?
You can learn C by three ways 1. Practise 10 programs daily for 10 days. 2. Understand the programming concept before going to make an attempt 3. Try to do some simple projects on your own will improve your skills rapidly.
Umamahesh
0 0
5
Which book is good for C language?
Let Us C by writer-- Yashavant P. Kanetkar (Author)
Rajendra
How many programs are in the C language?
Here, we have provided 100+ C programming examples in different categories like basic C Programs, Fibonacci series in C, String, Array, Base Conversion, Pattern Printing, Pointers, etc.
Muskan
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 Swapping Contents Of Variables Using Function [Call By Reference Method]
//Header Files #include#include // User defined functions swap with 2 pointer variables passed as an argument list void swap(int*i,int*j){ // Local variable temp int temp; // swapping contents using...
S

Pointers Concept
Every variable has a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator, which denotes an address in memory. Consider the following...

C Program-Upper Case Demo
/*WAP to print the character entered by user in upper case*/ //Header files #include<stdio.h>#include<conio.h> //Main function void main(){ char ch; //Function for clearing screen clrscr(); ...
S

Compiler vs Interpreter
Compiler Interpreter Convert all the code into binary format and execute. Convert one statement at a time and execute, then Convert next statement and execute. After conversion, source...

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

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 >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

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