Is there anyway at all of generating a random number?

The function rand() just generates the name numbers in the same order every single time. For example,

Code:
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n;
    int x;
    for (x=0;x<30;x++)
    {
        n=rand();
        printf("%d", n);
        getchar();
    }
    return 0;
}
Will ALWAYS output:

41
18467
6334
26500
19169
15724
etc...

I noticed a tutorial for it, but like basically everything else it is C++*. So is it actually possible in C?

*Note that I'm not complaining about this.