What is output redirection?
1223
Explain what will the preprocessor do for a program?
1069
Explain the use of #pragma exit?
1181
Why we use void main in c?
1173
How important is structure in life?
1090
what are the facialities provided by you after the
selection of the student.
2265
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
1090
Is it better to use malloc() or calloc()?
1118
Write a c program to demonstrate character and string constants?
2192
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 )
{
}
2685
What is the general form of function in c?
1022
What is an operator?
1077
if the area was hit by a virus and so the decrease in the
population because of death was x/3 and the migration from
other places increased a population by 2x then annually it
had so many ppl. find our the population in the starting.
5238
What is array of structure in c?
1184
Explain what are reserved words?
1107