Can we take "main function" as of type float,char etc?

Showing Answers 1 - 4 of 4 Answers

raj

  • Mar 23rd, 2006
 

Yes. it is possible to return float, char or char*.

  Was this answer useful?  Yes

Geeta.Sanikop

  • Mar 29th, 2006
 

Hi!!Its possible only with int.If a function is declared as void that it may return anything by default.

  Was this answer useful?  Yes

Akif

  • May 3rd, 2006
 

hiiiiiiiiiiiiiii

its possible u make ur main function int float char its depend what u return if u return char then ur main function char main()

  Was this answer useful?  Yes

James Hare

  • Oct 20th, 2006
 

You CAN in SOME compilers, but it should be noted that according to Stroustrup only

int main()

and its argc,argv cousins are valid declarations of main according to the standard.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions