How to use rand() function in C++?

How to use rand() function in C++?