Use Coupon: CART20 and get 20% off on all online Study Material

Total Price: Rs.

There are no items in this cart.
Continue Shopping
Nitin Gupta Grade: 11

What is the significance of 'void' in --void main()-- ?

Please explain me about this in detail

I'll surely approve all correct answers.

7 years ago

Answers : (2)

suryakanth AskiitiansExpert-IITB
105 Points

Dear Nitin,

Main is a driver function. Void is a return type of the main function void means not returning any thing.
The program execution starts from the function main this means main is a starting point of your program.

Please feel free to ask your queries here. We are all IITians and here to help you in your IIT JEE preparation.

All the best.

Win exciting gifts by answering the questions on Discussion Forum. So help discuss any query on askiitians forum and become an Elite Expert League askiitian.

Now you score 5+15 POINTS by uploading your Pic and Downloading the Askiitians Toolbar  respectively : Click here to download the toolbar..


Askiitians Expert

Suryakanth –IITB

7 years ago
Nitin Gupta
16 Points

Not returning anything means not returning a value.But we do return a value in  programs.For ex:-



void main()


int a,b;

cout<<"Enter two values : ";


cout<<"\n Sum is : "<<a+b;



In this example we do return a value of -- a+b;But the void function doesn't return a value.So where I got wrong?Please let me know

7 years ago
Think You Can Provide A Better Answer ?
Answer & Earn Cool Goodies
  • Complete Physics Course - Class 12
  • OFFERED PRICE: Rs. 2,756
  • View Details
  • Complete Physics Course - Class 11
  • OFFERED PRICE: Rs. 2,968
  • View Details

Ask Experts

Have any Question? Ask Experts

Post Question

Answer ‘n’ Earn
Attractive Gift
To Win!!! Click Here for details