#include <stdio.h>
int main()
{
if ("X" <"x")
printf("X smaller than x
");
}


my question is whats the mistake in this program? find it and please tell me..

Answer Posted / raisa

character X and x should always be enclosed in single quotes

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code to generate a series where the next element is the sum of last k terms.

726


What is main function in c?

543


What library is sizeof in c?

561


How can I recover the file name given an open stream?

547


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

2386






What is the best organizational structure?

636


What is data structure in c and its types?

585


What 'lex' does?

710


How will you delete a node in DLL?

677


What is volatile keyword in c?

577


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 ) { }

2205


What is return in c programming?

507


4. main() { int c=- -2; printf("c=%d",c); }

1364


What are the rules for the identifier?

666


What is the use of bit field?

629