Function on a variable declaration

  • A+
Category:Languages

I'm reading the C Programming Language (chapter 5), and I'm confused by this example:

int n, array[SIZE], getint(int *); 

Why is this function call in here like that? Is this just some tricky example and invalid code?

 


It's not calling the function; it's declaring its prototype. It's equivalent to:

int n; int array[SIZE]; int getint(int*); 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: