{"id":10,"description":"C - Generate random int","tags":["c","cpp","snippets"],"contents":["// Generate random ints with rand() in the range of 0 to RAND_MAX (defined in stdlib.h)","// RAND_MAX is set to 2147483647 in case of mac","printf(\"a random number:%d\", rand());","// Seed with srand(unsigned seed_value), often the seed_value is the current timestamp","srand(time(NULL));","printf(\"another random number:%d\", rand());"]}
