Difference between strcpy() and memcpy() function?
1149
List some of the static data structures in C?
1202
In C language, a variable name cannot contain?
1278
a) Identify the following declarations.
Ex.
int i
(integer variable) float a[l0](array of 10 real nos)
int (*f())()
void *f
int (*f()) []
void *f
int f[] [] []
char *(*f) ()
int (*f[]) []
float(*f) [] []
float **f
int ******f
2157
any "C" function by default returns an
a) int value
b) float value
c) char value
d) a & b
1087
Which header file is essential for using strcmp function?
1484
How many types of sorting are there in c?
1061
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
1722
What is function prototype?
1146
Is c a great language, or what?
1123
What is the difference between array and structure in c?
1171
What is output redirection?
1223
what are the different storage classes in c?
1184
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 )
{
}
2686
What is function definition in c?
1077