It seems we are talking about a phrase, so a C++ string would be most appropriate (already knows its size).
If std::string is not allowed, the prototypes could be like that:
Code:
//reads user input into buffer, assuming it is big enough
//returns number of characters
int getPhrase(char* buffer);
//capitalizes random letters (30% - or some other % of the time)
void autoCapper(char* buffer, int length);
As to the randomness:
Code:
randNumGen();
if (randNumGen() == 1 || randNumGen() == 3 || randNumGen() == 5) {
There are 4 calls to randNumGen, each returning a different value. The first result is thrown away. The condition will be true only if: the second random value equals 1, the third value equals 3 or the fourth value equals 5 (and not if a random value equals 1, 3, or 5).
In short, you need to store the return value of the first call and use this in the if-condition.
There may be also simpler ways to determine if a random condition should evaluate to true with a known probability. For example, if you wanted something to happen 25% of the time, it might look like this:
Code:
if (rand() < RAND_MAX * 0.25) {}