65 767
Assignments Done
99,4%
Successfully Done
In October 2018

Answer to Question #39916 in C++ for karthikeyan

Question #39916
What is the use of void main, int main, float main and how its related with return value.. Please give me the exact answer..
Expert's answer
Dear customer,
It is better to use int main, as it is classical c/c++ statement. This type requires the 'return' statement.
Void main does not, and it is considered its main advantage, but not all the compilers can work with it. Some give errors, some give warnings, some does not give either.
Float main is the different story. It requires the return statement, but the program assumes you're returning integer value, and converts it from floating value to integer. And again, not every compiler can work with it.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions