C took an unusual approach for its declaration syntax. In C, one can write an expression involving the item being declared, and states what type that expression will have. 1

E.g.,

  • int *p is a int pointer because *p is an int
  • int a[3] is an integer array because a[3] is an int

For functions, originally C’s function declaration syntax was like the following

int main(argc, argv)
    int argc;
    char *argv[];
{ /* ... */ }

so int main(argc, argv) is a function because main(argc, argv) returns an int.

For more complicated examples, C’s declaration read like a spiral 2.

Footnotes

  1. Go’s Declaration Syntax (note)

  2. Clockwise/Spiral Rule