I need testPalindrome and removeSpace
#include
#define SIZE 256
/* function prototype */
/* test if the chars in the range of [left, right] of array
is a palindrome */
int testPalindrome( char array[], int left, int right );
/* remove the space in the src array and copy it over to the
"copy" array */
/* set the number of chars in the "copy" array to the
location that cnt points t */
void removeSpace(char src[], char copy[], int *cnt);
int main( void )
{
char c; /* temporarily holds keyboard input */
char string[ SIZE ]; /* original string */
char copy[ SIZE ]; /* copy of string without spaces */
int count = 0; /* length of string */
int copyCount; /* length of copy */
printf( "Enter a sentence:\n" );
/* get sentence to test from user */
while ( ( c = getchar() ) != '\n' && count < SIZE ) {
string[ count++ ] = c;
} /* end while */
string[ count ] = '\0'; /* terminate string */
/* make a copy of string without spaces */
removeSpace(string, copy, ©Count);
/* print whether or not the sentence is a palindrome */
if ( testPalindrome( copy, 0, copyCount - 1 ) ) {
printf( "\"%s\" is a palindrome\n", string );
} /* end if */
else {
printf( "\"%s\" is not a palindrome\n", string );
} /* end else */
return 0; /* indicate successful termination */
} /* end main */
void removeSpace(char src[], char copy[], int *cnt)
{
}
int testPalindrome( char array[], int left, int right )
{
}
1655
What happens if the negative to earth voltage is greater than positive to earth voltage in the battery of substation?
625
How do you inspect element on mobile?
17
what is compression ratio? why its decreased when gear shifted
?
990
Explain formgroup and formcontrol in angular?
117
What are nodes and ephemeral nodes?
1
What are the different type of replication in sql server?
158
What is appl?
186
What are the destination types allowed in sqoop import command?
1
What is the tcode to create indexes?
152
What is the maximum number of fields allowed per segment and what is the maximum number of fields per database?
152
IF ASCII_CODE_OF_ENTERED_CHAR is less than 44
THEN reject it
ELSE IF ASCII_CODE_OF_ENTERED_CHAR is greater than 56
THEN reject it
ELSE it's a digit, so accept it
Which one of the following sets of ASCII codes do you use
to test the sample code above WITHOUT redundant coverage?
8362
How list contains works in java?
117
What is the use of transformation file?
1
Is a host a server?
123