what is wrong with the logic in my loop?
clip of program:
printf( "Hello ;;;;;; " );
printf( "Hello ;;;;;; " );
function to clear everything inside the quotes:
Code:
int null_chars(char str[200])
{
int i,j=0, x;
for (i=0; str[i] != '\n' ; i++)
{
if (str[i] == '"')
{
for( j=i+1 ; str[j] != '"'; j++)
{
str[j] = '0';
}
}
}
}
this causes a huge bug...I have another function that clears comments that written the EXACT same way and works perfectly...I know there's something wrong with the for loop on the inside