Review Test
Scroll through the page to review your answers. The correct answer is
highlighted in
green.
Your incorrect answers (if any) are highlighted in
red.
If you'd like to take the test over again, click the reset button at the end of the test.
There is no string type in C. Instead, null-terminated
arrays of characters are used as strings. The following
function is designed to test whether the string passed in is a
palindrome, returning 1 if it is, 0 if it isn't. What should
the for condition be?
int is_palindrome(char *str)
{
int i, j;
int length = strlen(str);
if(str == NULL)
return 0;
for(xxx)
if(str[i] != str[j])
return 0;
return 1;
}