0

What is the use of void main

13th Mar 2017, 6:55 PM
Khushi
Khushi - avatar
4 Answers
+ 1
it is used when we are not interesting in define any specific type of function.Because it is not specify type of function
13th Mar 2017, 7:00 PM
Pramod Nagar
Pramod Nagar - avatar
+ 1
'Void' is used, when we can not return something (like a value) to the main. When 'void' keyword is used, at that time 'return' keyword is not used in the program body.
13th Mar 2017, 7:11 PM
Abhishek Satpathy
Abhishek Satpathy - avatar
+ 1
void function is like operators in mathematics. consider the derivative​ operator which does not return any value by itself.
13th Mar 2017, 8:32 PM
Mohammadreza
Mohammadreza - avatar
+ 1
http://www.stroustrup.com/bs_faq2.html#void-main "... void main() { /* ... */ } is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1[2] or the ISO C standard 5.1.2.2.1".
13th Mar 2017, 9:28 PM
Dare-devil
Dare-devil - avatar