Skip to content

Instantly share code, notes, and snippets.

@jazlopez
Created December 31, 2023 21:02
Show Gist options
  • Save jazlopez/0176a63cc12a7ec002536ca91bb850a7 to your computer and use it in GitHub Desktop.
Save jazlopez/0176a63cc12a7ec002536ca91bb850a7 to your computer and use it in GitHub Desktop.
Valid main signatures in C

main() should be declared as either:

int main(void)
int main(int argc, char **argv)

Or equivalent. For example

int main(int argc, char *argv[])

is equivalent to the second one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment