News for hackers. Stuff that matters.
Re:Massacring C Pointers (2018) by linkdd on Saturday September 05, 2020 @03:00AM (#24381837)
As the others already said, it's the old way of declaring the arguments type.

But I think it's good to know other pitfalls:

- The "default" return type of a function is int

- A function that does not use void to tell that it takes no argument just have an undefined number of parameters

See this example: https://ideone.com/GfwS4O

You could in theory use the address of a local variable (allocated on the stack) to access the arguments passed to the function directly on the stack.

But this is just madness... Or is it ? Isn't C just assembly with a "nicer" syntax ?

There are no comments on this comment yet.