Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C×Ö·û´®·´×ªËã·¨

Ò»¸öºÜ¼ò½àµÄËã·¨£º
void Reverse(char s[])
{
    for(int i = 0, j = strlen(s) - 1; i < j; ++i, --j) {
        char c = s[i];
        s[i] = s[j];
        s[j] = c;
    }
}
#¹ØÓÚa, b½»»»ÆäËüËã·¨£º
    a ^= b;
    b ^= a;
    a ^= b;
Ò»¸öÎåÖֽⷨµÄ°æ±¾£º
ת×Ô£ºhttp://www.cnblogs.com/Mainz/articles/1164602.html
ÕâÊÇÍøÂçÁ÷´«µÄMicrosoftµÄÃæÊÔÌâĿ֮һ£º“±àд·´×ª×Ö·û´®µÄ³ÌÐò£¬ÒªÇóÓÅ»¯ËÙ¶È¡¢ÓÅ»¯¿Õ¼ä”¡£ÒòΪ×î½üÒ»Ö±ºÜ¶à¹Ø×¢Ëã·¨·½ÃæµÄʵ¼ùºÍÑо¿£¬Òò´Ë¶ÔÕâ¸öÎÊÌâ½øÐÐÁËһЩ˼¿¼£¬¸ø³öÁË5ÖÖʵÏÖ·½·¨£¨ÓÐÁ½ÖֽⷨÏà¹ØÐԱȽϴ󣩡£
½â·¨Ò»£ºµÚÒ»´Î¿´µ½ÕâÌâÄ¿£¬Ïëµ½×î¼òµ¥¡¢×îÖ±¾õµÄ½â·¨¾ÍÊÇ£º±éÀú×Ö·û´®£¬½«µÚÒ»¸ö×Ö·ûºÍ×îºóÒ»¸ö½»»»£¬µÚ¶þ¸öºÍµ¹ÊýµÚ¶þ¸ö½»»»£¬ÒÀ´ÎÑ­»·£¬¼´¿É£¬ÓÚÊÇÓÐÁ˵ÚÒ»¸ö½â·¨£º
char* strrev1(const char* str)
{
       int len = strlen(str);
       char* tmp = new char[len + 1];
        strcpy(tmp,str);
       for (int i = 0; i < len/2; ++i)
       {
          char c = tmp[i];
           tmp[i] = tmp[len – i - 1];
           tmp[len – i - 1] = c;
        }
       return tmp;
}
ÕâÀïÊÇͨ¹ýÊý×éµÄϱ귽ʽ·ÃÎÊ×Ö·û´®µÄ×Ö·û£¬Êµ¼ÊÉÏÓÃÖ¸ÕëÖ±½Ó²Ù×÷¼´¿É¡£½â·¨¶þÕýÊÇ»ùÓÚ´Ë£¬ÊµÏÖ´úÂëΪ£º
char* strrev2(const char* str)
{
       char* tmp = new char[strlen(str) + 1];
        strcpy(tmp,str);
       char* ret = tmp;
       char* p =


Ïà¹ØÎĵµ£º

C ·¢ÏÖ¸öÈ«¾Ö±äÁ¿Óë¾Ö²¿±äÁ¿µÄÇø±ð

·¢ÏÖ¸öÈ«¾Ö±äÁ¿Óë¾Ö²¿±äÁ¿µÄÇø±ð:
[code=C/C++]
char** t;
main()
{
    char c[1];
    char** t1;
    sprintf(c,"%d",t);
    printf("t=%s---\n",c);
    if(strcmp(c,"0")!=0)
  &nbs ......

¡ïÔõÑùѧϰCÓïÑÔ(Ï׸øÃÔãµÄC°®ºÃÕß)¡ï

Ò» £¬ÔõÑùѧϰCÓïÑÔ
     ºÜ¶àÈ˶ÔѧϰCÓïÑԸе½ÎÞ´ÓÏÂÊÖ£¬¾­³£ÎÊÎÒͬһ¸öÎÊÌ⣺¾¿¾¹ÔõÑùѧϰCÓïÑÔ£¿ÎÒÊÇÒ»¸ö½Ìʦ£¬ÒѾ­¿ª·¢Á˺ܶàÄêµÄ³ÌÐò£¬ºÍºÜ¶à¸Õ¸ÕÆð²½µÄÈËÒ»Ñù£¬Ñ§Ï°µÄµÚÒ»¸ö¼ÆËã»úÓïÑÔ¾ÍÊÇCÓïÑÔ¡£¾­¹ýÕâЩÄêµÄ¿ª·¢£¬ÎÒÉîÉîµÄÌå»áµ½CÓïÑÔ¶ÔÓÚÒ»¸ö³ÌÐòÉè¼ÆÈËÔ±¶àôµÄÖØÒª£¬Èç¹û²»¶®CÓ ......

¶ÑÕ»¡¢linux c³ÌÐò´æ´¢¿Õ¼ä²¼¾ÖµÄ×ܽá

Õ»Ö÷ÒªÓÃÀ´´æ·Å¾Ö²¿±äÁ¿, ´«µÝ²ÎÊý, ´æ·Åº¯ÊýµÄ·µ»ØµØÖ·.esp ʼÖÕÖ¸ÏòÕ»¶¥, Õ»ÖеÄÊý¾ÝÔ½¶à, espµÄֵԽС.
¶ÑÓÃÓÚ´æ·Å¶¯Ì¬·ÖÅäµÄ¶ÔÏó, µ±ÄãʹÓà malloc , new µÈ½øÐзÖÅäʱ,ËùµÃµ½µÄ¿Õ¼ä¾ÍÔÚ¶ÑÖÐ. ¶¯Ì¬·ÖÅäµÃµ½µÄÄڴ渽´øÓзÖÅäÐÅÏ¢, ËùÒÔÄãÄܹ» realloc ºÍ freeµ÷ËüÃÇ.
È«¾Ö£¬¾²Ì¬ºÍ³£Á¿ÊÇ·ÖÅäÔÚÊý¾ÝÇøÖеġ£Êý¾ÝÇø°üÀ¨b ......

GCC ±àÒëc³ÌÐòµÄ·½·¨¼°¹ý³Ì½âÎö

GCC ±àÒëc³ÌÐòµÄ·½·¨¼°¹ý³Ì½âÎö 
Justin.zp.Yang 2010.04.10
        Ä¿Ç° Linux ÏÂ×î³£ÓÃµÄ C ÓïÑÔ±àÒëÆ÷ÊÇ GCC £¨ GNU Compiler Collection £©£¬ËüÊÇ GNU ÏîÄ¿ÖзûºÏ ANSI C ±ê×¼µÄ±àÒëϵͳ£¬Äܹ»±àÒëÓà C ¡¢ C++ ºÍ Object C µÈÓïÑÔ±àдµÄ³ÌÐò¡£ GCC ²»½ö¹¦Äܷdz£Ç¿´ó£¬½á¹¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ