return type of main

view story

http://ubuntuforums.org – 1.I've heard that Code: int main(void) is the best way to start main. So that means that my program returns an integer to gcc ? Am I returning to gcc ? That's my first question. 2.What does gcc do with these return values. We normally return 0, 1, -1 right? So on what basis does it decide successful/failure of program ? 3.I tried doing Code: int main(float a) just for experimenting, and it still doesn't throw any error. Code: #include <stdio.h> int main(float a) {  printf("\nHello world ");  printf("%f",a);  ret (Hardware)