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

C_ÆÕͨλÔËËã

 Ô´Âë:
# include <stdio.h>
 
int main()
{
    /* ¶¨ÒåÁËÒ»¸öÎÞ·ûºÅ×Ö·ûÐͱäÁ¿£¬´Ë±äÁ¿Ö»ÄÜÓÃÀ´´æ´¢ÎÞ·ûºÅÊý */
    unsigned char result;
    
    int a, b, c, d;
    a = 2;
    b = 4;
    c = 6;
    d = 8;
 
    /* ¶Ô±äÁ¿½øÐГ°´Î»Ó딲Ù×÷ */
    result = a & c;
    printf("result = %d\n", result);
 
    /* ¶Ô±äÁ¿½øÐГ°´Î»»ò”²Ù×÷ */
    result = b | d;
    printf("result = %d\n", result);
 
    /* ¶Ô±äÁ¿½øÐГ°´Î»Òì»ò”²Ù×÷ */
    result = a ^ d;
    printf("result = %d\n", result);
 
    /* ¶Ô±äÁ¿½øÐГȡ·´”²Ù×÷ */
    result = ~a;
    printf("result = %d\n", result);
    return 0;
}


Ïà¹ØÎĵµ£º

Hacks in C Programming Language

 ÏÂÃæÕâ¸ö³ÌÐòÊä³öʲô£¿
enum {false,true};
int main()
{
int i=1;
do
{
printf("%d\n",i);
i++;
if(i < 15)
continue;
}while(false);
return 0;
}

ÄãÏàÐÅô£¿Ï ......

C unsigned Ó÷¨

Àý£º#define NELE(a) (sizeof(a) / sizeof(a[0]))
int main() {
char str[] = {'E', 'M', 'C'};
for (int d=-1; d<=(NELE(str)-2);d++)
      printf("%c",str[d+1]);
return 0;
}
ÅжÏprintf£¨£©Êä³öµÄÊÇʲô£¬½á¹û¿ÉÄܳöºõÒâÁÏ£¬Ê²Ã´Ò²Ã»ÓÐÊä³ö£¬Ô­ÒòÄØ£¿Ô­Òò ......

ÓÃC# ʵÏÖC/SģʽÏÂÈí¼þ×Ô¶¯ÔÚÏßÉý¼¶

 Õª   Òª£º
¡¡±¾ÎÄÕë¶ÔĿǰC/SģʽϱàдµÄÓ¦ÓóÌÐò¿Éά»¤ÐÔ²îµÄÌØµã£¬Ìá³öÁËÒ»Ì××Ô¶¯ÔÚÏßÉý¼¶µÄ½â¾ö·½°¸£¬·ÖÎöÁËÔÚÏßÉý¼¶µÄÀ§ÄѼ°ÊµÏÖÔ­Àí£¬²¢¸ø³öÁËʵÏÖÉý¼¶µÄ²¿·Ö´úÂ룬¾ßÓÐʵ¼Ê²Î¿¼¼ÛÖµºÍÏÖʵÒâÒå¡£±¾ÎijÌÐò´úÂë¾ùÔÚ.Net Framework 1.1 ºÍWindows2000ϲâÊÔͨ¹ý¡£
¡¡¹Ø¼ü´Ê£ºC#£»ÔÚÏßÉý¼¶£»×Ô¶¯Éý¼¶£ ......

C_Êý¾ÝÀàÐÍת»»

 Ô´Âë:
# include <stdio.h>
 
int main()
{
    /* ¶¨Òå±äÁ¿²¢¸³³õÖµ */
     int    a = 5;       
    char   c = 'a';   // 'a'µÄASCÂëµÄֵΪ97
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ