Vidyalelo
Computer Science · Q302

Linux

Engineering and GATE · Computer Science · question 302

Q302

What is the difference between the built-in functions rand() and srand() in awk programming?

A.
rand() generates the random number but srand() does not generate the random number
B.
rand() generates the same random number always whenever the program runs but srand() generates the different
Answer
C.
srand() requires the seed() function but rand() does not require to produce the same result
D.
none of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board