Fill in the code to complete the following function for checking whether a string is a palindrome.

```
bool isPalindrome(const char * const s)
{
if (strlen(s) <= 1) // Base case
return true;
else if _____________________________ // Base case
return false;
else
return isPalindrome(substring(s, 1, strlen(s) - 2));
}
```

bool isPalindrome(const char * const s)
{
if (strlen(s) <= 1) // Base case
return true;
else if _____________________________ // Base case
return false;
else
return isPalindrome(substring(s, 1, strlen(s) - 2));
}
A. (s[0] <> s[strlen(s) - 1])
B. (s[0] = s[strlen(s) - 1])
C. (s[0] == s[strlen(s) - 1])
D. (s[0] != s[strlen(s) - 1])


D. (s[0] != s[strlen(s) - 1])

Computer Science & Information Technology

You might also like to view...

You cannot merge more than two cells in Excel.?

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Round the following values up at the places noted.

16.872 at thousandths place

Computer Science & Information Technology

The strtok() function breaks a program into functions.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Monitoring the RF frequency requires a special sensor called a(n) ____.

A. AP fingerprinter B. wireless probe C. wireless triangulator D. AP trilaterator

Computer Science & Information Technology