Case 1:
void hello(void) { //something } int main() { hello(1); //error return 0; } Case 2:
int main(void) { //something return 0; } Execution:
./a.out something something //No error, Why? Why there is no error? main will not be able to take any arguments. So why it is possible to provide arguments from the command line?
argv[0]).mainis not the same kind of function ashello.main(float)generates only a warning, no error. And only with -Wall even.)