answersLogoWhite

0

Characters are simply character codes, so they can be compared just like any other value. They can also be compared using literal character constants. The compiler will replace character literals with their equivalent character codes.

char c = 'a'; // variable c is 0x61 (hex) or 97 (decimal).

if( c 97 ){...} // true, 'a' is character code 97 decimal.

if( c > 'b' ){...} // false, 'a' is not greater than 'b' (that is, 97 is not greater than 98).

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How will you compare turbo c to c plus plus?

"http://wiki.answers.com/Q/How_will_you_compare_turbo_c_to_c_plus_plus_language"


How will you compare turbo c to c plus plus language?

"http://wiki.answers.com/Q/How_will_you_compare_turbo_c_to_c_plus_plus_language"


What is the C plus plus program for string compare?

You don't need a program to compare strings since std::string already provides support for all the comparison operators (<, <=, >, >=, == and !=). To roll your own you must first create a string class and then provide operator overloads for the comparison operators. To compare strings, start at the first character in each string and compare. So long as they remain equal, move onto the next character. The comparison ends as soon as any character differs. You need only compare these two characters to decide which string is the lesser. To perform a case insensitive comparison, copy the two characters and convert the copies to lower case (or upper case, it doesn't matter). Then compare the copies. Do this for each character as you compare them rather than converting the entire string.


Wap in c plus plus to find out the string is palindrome or not in?

use the strrev() function on the given string and compare with original string.If both are equal they are palindromes else not.


What is b plus b plus b plus c plus c plus c plus c?

b+b+b+c+c+c+c =3b+4c


What is c plus c plus 2c plus c plus c equal?

c + c + 2c + c + c = 6c


B plus b plus b plus c plus c plus c plus c equals?

b + b + b + c + c + c + c = 3b + 4c


Symplify c plus c plus c plus c?

4c


What is c plus c plus c plus c plus c?

c + c + c + c + c = 5 * c.


What can you compare to Lysistrata?

You can compare Mae West Goin' to Town. They are similar characters.


Primary and secondary key in c and c plus plus?

There are no "primary and secondary keys" in c and c plus plus.


What are the differences of turbo c plus plus and mother program?

No idea what mother program is, but I assume you mean how does Turbo C++ compare to the ISO C++ standard. The last version of Turbo C++ came out in 2006 and was compliant with the standard at that time. However, Embarcadero (the current owners) no longer support Turbo C++, thus it no longer complies with the current ISO standard.