There are several correct ways to call the rand function. The variable x is assigned the value returned by rand in this statement. Otherwise, x is given the memory address of the rand function, which is generally not what you intended. Functions can use a void return type if you intend to return nothing. If you do not, the function is not called, even though it will compile correctly on many systems.
C functions can accept parameters of any type.
It is important to be able to read code written in the older style. It is now considered good form to use function prototypes for all functions in your program. A prototype declares the function name, its parameters, and its return type to the rest of the program prior to the function's actual declaration. This code compiles on many compilers without giving you a warning, even though add expects two parameters but receives only one. It works because many C compilers do not check for parameter matching either in type or count.