Can main() function return double?

rajvelu picture rajvelu · May 23, 2010 · Viewed 7.5k times · Source

Can the main() function in a C program return a double data type?

If Yes, how and why?

If No, why?

Answer

Yin Zhu picture Yin Zhu · May 23, 2010

Yes. According to C standard, main() should return a int value. But not must.

See here.