Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!mit-eddie!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!uokmax!d.cs.okstate.edu!donnie From: donnie@d.cs.okstate.edu (Donnie J. Glass) Newsgroups: comp.lang.c Subject: Re: I'm confused about this Message-ID: <1990Nov21.044214.26926@d.cs.okstate.edu> Date: 21 Nov 90 04:42:14 GMT References: <3945@vela.acs.oakland.edu> Organization: Oklahoma State University Lines: 24 From article <3945@vela.acs.oakland.edu>, by jmwojtal@vela.acs.oakland.edu (Wojo): Jeff Wojtalewicz (Wojo) writes: > 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. > > getpid() gets the process ID number for the process. Similarly, getppid() returns the parent processes ID number. ---------------------------------------------------------------------- Don Glass Oklahoma State University donnie@d.cs.osu.edu