MY CART (5)

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

ITEM
DETAILS
MRP
DISCOUNT
FINAL PRICE
Total Price: Rs.

There are no items in this cart.
Continue Shopping
Menu
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.

6 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

6 years ago
Nitin Gupta
16 Points
										

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


#include<iostream.h>


#include<conio.h>


void main()


{


int a,b;


cout<<"Enter two values : ";


cin>>a>>b;


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


getch();


}


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

6 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
Get extra Rs. 551 off
USE CODE: CART20
  • Complete Physics Course - Class 11
  • OFFERED PRICE: Rs. 2,968
  • View Details
Get extra Rs. 594 off
USE CODE: CART20

Ask Experts

Have any Question? Ask Experts

Post Question

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