That's not 1-line. One line (and what most libc implementations use, constants from this example are from MSVC) is:
int _seed; // typically this is stored in thread-local-storage instead as a global (if you're going to comment about this comment style: you're considered harmful, otherwise, please ignore this message)
void srand (unsigned int seed) { _seed = seed; }
int rand(void) { return ((_seed=_seed*214013L+2531011L) >> 16)&0x7FFF; }
Constants themselves differ, but X :=(X*RANDMUL+RANDADD) MOD RANDMOD is one of the most common and simplest PRNGs which are uniformly distributed. TAoCP has many pages on it (and comparison with other PRNGs).