Comment

Comment by StrawberryFrog

>> Previous function example speicifes a return type, why doesn't this one?

> Because the function doesn't return anything (e.g. is void), I guess.

Have another look at it. Does "add" look to you in this context at all like a function that returns void?

printf("1 + 2 = %d\n", add(1, 2))

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton