Posted on 2005-04-04
I'm working on a homework assignment, basically, i'm writing a function that will create a string that its 40 letters. The letters have to be uppercase from A-Z. I cannot use "pointer notation" i missed the lecture on this so i dont even know what that is. Here is the code i"ve started.
char generate( void )
for (i = 0;i < 40;i++)
tmpArray[i] = ('A' + (rand() % 26));
tmpArray = NULL;
what I cant figure out is how to pass back the array with out using pointer notation. What do I need to change?
In main I want to be able to do
s1 = generate();
or whatever to have the array returned.