According to my knowledge, there are following two valid prototypes for main() function in C :
Code:
int main(void)
int main(int argc, char *argv[])
Now, If i try to create two functions with same name 'func' but different arguments then gcc gives the following error :

Code:
cmd.c:4: error: conflicting types for ‘func’
cmd.c:3: note: previous declaration of ‘func’ was here
My question is that how is this possible with main() function to have two different prototypes?