srand() C

C
#include <stdlib.h>
#include <time.h>

srand(time(NULL));
Source

Also in C: