10 STL doesn't exist for C. You have to call rand, or better yet, random. These are declared in the standard library header stdlib.h. rand is POSIX, random is a BSD spec function. The difference between rand and random is that random returns a much more usable 32-bit random number, and rand typically returns a 16-bit number.
Finally, rand() % 50 means "call rand(), divide the result by 50, and then take the remainder". (The % is the modulus operator, which means you want the remainder.) For example, if rand() returns 1000, you'll get 0 printed to the screen, since 1000 % 50 == 0 (that is, 1000 divided by 50 equals 20, remainder 0).
The c++ rand () function gives you a number from 0 to RAND_MAX (a constant defined in ), which is at least 32767. () The modulus (%) operator gives the remainder after dividing. When you use it with rand () you are using it to set an upper limit (n) on what the random number can be. For example, lets say you wanted a number between 0 and 4. Calling rand () will give you an answer between 0 and ...
Related: How to generate a random int in C?. Here is my answer there, which contains the definition for my int utils_rand(int min, int max) func, which returns a random number using rand() which is in the specific range from min to max, inclusive, thereby also answering this question. I also scale to allow a case where min is INT_MIN and max is INT_MAX, which is normally not possible with rand ...