Http://v.youku.com/v_show/id_XMTA4ODEwNjM2.html
The quick brown fox jumps over the lazy dog.
An agile brown fox jumped to a sleep dog. It is said that this sentence is the shortest sentence containing all 26 letters.
One sentence 9 words 26 words ----------- Microsoft msdn is often used to compare various strings.
Msdn2001
Example/*Strcmp. c*/
# Include <String. H>
# Include <stdio. h>
CharString1 [] ="The quick brown dog jumps over the lazy Fox";
CharString2 [] ="The quick brown dog jumps over the lazy Fox";
Void Main ( Void )
{
Char TMP [ 20 ];
Int Result;
/* Case Sensitive */
Printf ( " Compare strings: \ n \ t % s \ n " , String1, string2 );
Result = strcmp (string1, string2 );
If (Result>0 )
Strcpy (TMP, " Greater " );
Else If (Result < 0 )
Strcpy (TMP, " Less " );
Else
Strcpy (TMP, " Equal " );
Printf ( " \ Tstrcmp: String 1 is % s string 2 \ n " , TMP );
/* Case Insensitive */
Result = _ stricmp (string1, string2 );
If (Result> 0 )
Strcpy (TMP, " Greater " );
Else If (Result < 0 )
Strcpy (TMP, " Less " );
Else
Strcpy (TMP, " Equal " );
Printf ( " \ T_stricmp: String 1 is % s string 2 \ n " , TMP );
} Outputcompare strings: The quick brown dog jumps over the lazy foxthe quick brown dog jumps over the lazy foxstrcmp: String 1 is greater than string 2_stricmp: String 1 is equal to string 2
// Demo. cpp
# Include <iostream>
Using Namespace STD;
IntMain ()
{
//01234567890123456789012345678901234567890123 = 45
CharSlang [] ="The quick brown fox jumps over the lazy dog.";
Cout <"Sizeof (slang) ="<Sizeof(Slang) <Endl;
Cin.Get();
return 0 ;
}