What is array within structure?
1169
When should a type cast not be used?
1105
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 )
{
}
2746
What is integer constants?
1129
Difference between linking and loading?
1154
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
1421
hi... can anyone help me to make a two-dimensinal arrays in
finding the sum of two elements plzzz. thnx a lot...
1960
can any one provide me the notes of data structure for
ignou cs-62 paper
2230
Create a structure to specify data on students given
below:
Roll number, Name, Department, Course, Year of joining
Assume that there are not more than 450 students in the
college.
1.write a function to print names of all students who joined in a particular year
2.write a function to print the data of a student whose roll number is given
3124
Where is c used?
1153
What is static volatile in c?
1074
What is the role of this pointer?
1126
What does %c do in c?
1049
how much salary u want ?
why u join in our company?
your domain is core sector why u prefer software ?
2040
What is identifiers in c with examples?
1240