You could use rand() as a means to vary the angle of rebount, making sure the ball doesn't find some static angle and resolve itself to bouncing continuously off the same points of the square.
srand() is a seeder for the random number generator. It creates a new sequence of pseudo random numbers for the rand() function to use. It's weakness is that if you use the same number every time (as previously explained) you will get the same sequence every time.
time() is the number of seconds since 00:00hrs Jan 1, 1970. Using it as a seed in srand pretty much guarantees you won't get the same sequence twice.