What are the types of data files?
1206
cin.ignore(80, _
_);This statement
a) ignores all input
b) ignores the first 80 characters in the input
c) ignores all input till end-of-line
d) iteration
1110
What are the benefits of organizational structure?
1029
What are types of preprocessor in c?
1076
How is = symbol different from == symbol in c programming?
1049
How can you check to see whether a symbol is defined?
1104
What is the difference between if else and switchstatement
1934
Why array is used in c?
1016
What is a volatile keyword in c?
1165
What is the use of putchar function?
1057
Explain what is wrong with this program statement? Void = 10;
1265
A text file that contains declarations used by a group of functions,programs,or users
a) executable file
b) header file
c) obj file
d) .cfile
1099
What is meant by 'bit masking'?
1390
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 benefit of using an enum rather than a #define constant?
1240