The quick brown fox jumps over the lazy dog.

Source: Internet
Author: User
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 ;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.