I'll post a result as soon as I can try it
Type: Posts; User: masongray
I'll post a result as soon as I can try it
The following code accepts as parameters 1) a pointer to an array of long values and 2) an int containing the number of elements in that array. The code loops through each element in the array,...
Thanks very much - fflush is only defined for stdout, NOT stdin per ANSI. I didn't know that. Fortunately I am brand new and haven't posted before. And I won't again
Unfortunately, I don't have my compiler here - i would insert
fflush(stdin);
before c=getchar();
because getchar() reads the input stream and you may have a value other than 1 in the buffer.
malloc returns a void pointer to the first address of the allocated memory space. since you know that you'll be holding chars, you should cast the void pointer as a char pointer. further, since you...