I'm confused about this

Wojo jmwojtal at vela.acs.oakland.edu
Wed Nov 21 01:43:06 AEST 1990


I got this C program and this part I don't understand:

int   getpid();
long  now;

now = time(&now) / rand();
srand(getpid() + (int)((now >> 16) + now + time(&now)));

What does "srand" do to be exact?  It doesn't bring a value back?
"getpid()" is declared, but the function is not in the program.



-- 
************************************************************************
Jeff Wojtalewicz (Wojo)  jmwojtal at vela.acs.oakland.edu
Oakland University		      Start Hacking
************************************************************************



More information about the Comp.lang.c mailing list