The quick brown fox jumps over the lazy dog.

http://v.youku.com/v_show/id_XMTA4ODEwNjM2.html

The quick brown fox jumps over the lazy dog.
一只敏捷的棕色狐狸跳到了一只懒狗身上。
据说该句是包含所有26个字母的最短的句子。

1句9词26字-----------微软MSDN中常用来做各种字符串比较操作的例子。

MSDN2001
Example
/*  STRCMP.C  */

#include < string.h>
#include <stdio.h>

char string1[] =  " The quick brown dog jumps over the lazy fox ";
char string2[] =  " 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\t%s\n\n ", string1, string2 );
    result = strcmp( string1, string2 );
     if( result >  0 )
        strcpy( tmp,  " greater than " );
     else  if( result <  0 )
        strcpy( tmp,  " less than " );
     else
        strcpy( tmp,  " equal to " );
    printf(  " \tstrcmp:   String 1 is %s string 2\n ", tmp );
     /*  Case insensitive  */
    result = _stricmp( string1, string2 );
     if( result >  0 )
        strcpy( tmp,  " greater than " );
     else  if( result <  0 )
        strcpy( tmp,  " less than " );
     else
        strcpy( tmp,  " equal to " );
    printf(  " \t_stricmp:  String 1 is %s string 2\n ", tmp );
}
Output
Compare strings:
The quick brown dog jumps over the lazy fox
The QUICK brown dog jumps over the lazy fox
strcmp:   String 1 is greater than string 2
_stricmp:  String 1 is equal to string 2

 

// demo.cpp

#include<iostream>
using  namespace std;

int main()
{
                 // 01234567890123456789012345678901234567890123==45
     char slang[]= " The quick brown fox jumps over the lazy dog. ";

    cout<< " sizeof(slang)== "<< sizeof(slang)<<endl;

    cin. get();

     return  0;
}

转载于:https://www.cnblogs.com/shanzy/archive/2012/09/03/2668144.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
程序文件英文版模板全文共3页,当前为第1页。程序文件英文版模板全文共3页,当前为第1页。PURPOSE 程序文件英文版模板全文共3页,当前为第1页。 程序文件英文版模板全文共3页,当前为第1页。 This procedure intends to define the controls needed to… EXPECTED OUTPUTS By implementing the controls defined in this procedure, the following specific outputs are expected: Expected output 1 Expected output 2 Expected output 3 SCOPE The controls specified in this procedure apply to … This procedure covers the activities from … DEFINITION Terminology 1 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. Terminology 2 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. Terminology 3 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. Terminology 4 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. RESPONSIBILITIES Responsible Function 1 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. Responsible Function 2 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. Responsible Function 3 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. PROCEDURE OUTLINE Responsible Activity Documents 程序文件英文版模板全文共3页,当前为第2页。程序文件英文版模板全文共3页,当前为第2页。Position/Title 程序文件英文版模板全文共3页,当前为第2页。 程序文件英文版模板全文共3页,当前为第2页。 Key Step 1(See Section 7.1)Key Step 1(See Section 7.1) Key Step 1 (See Section 7.1) Key Step 1 (See Section 7.1) Forms Manuals Procedures Position/Title Key Step 2 (See Section 7.2)Key Step 2 (See Section 7.2) Key Step 2 (See Section 7.2) Key Step 2 (See Section 7.2) Forms Manuals Procedures Position/Title Key Step 3 (See Section 7.3)Key Step 3 (See Section 7.3) Key Step 3 (See Section 7.3) Key Step 3 (See Section 7.3) Forms Manuals Procedures PROCEDURE DETAILS Key Step 1. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值