It's called "piping". That vertical bar between the two commands says "take the output from the program on the left and submit it directly (pipe it) to the program on the right as input." This is an operating system level operator, the vertical bar, that does the piping. It has nothing to do with the code in either generate.c or find.c.
You could run the command
./generate 1000 and it would send 1000 pseudo-random numbers directly to the screen. The OS level piping operator,
| takes that output and sends it directly to ./find instead of displaying it. The piping operator can be used to pipe data between pretty much any two programs in a similar manner.
BTW, it isn't piping data between the .c programs. It's piping the data between the executables.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)