Hi, I can't seem to figure this out. I ran this function and it worked the way I intended but although the output was correct I got this weird error.
Run-Time Check Failure #2 - Stack around the variable 'test' was corrupted.
Could someone point me in the direction about what I've done wrong?
thanks,
MIchelle
Code:
int correctionConversion(void)
{
int count = 0;
char test[num];
printf("Please enter a string");
fgets (test , num , stdin);
test[num] = '\0';
printf("%s", test);
printf("if this program is working this should not be on a newline");
}