CÖкê#ºÍ##µÄÔËÓÃ
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#define f(a,b) a##b
#define g(a) #a
#define h(a) g(a)
int main()
{
char a = 'a';
printf("%s\n",g(a)); // a
printf("%s\n",g(g(a))); // g(a)
printf("%s\n", h(f(1,2))); // 12
printf("%s\n", g(f(1,2))); // f(1,2)
printf("%s\n", g(h(f(1,2)))); // h(f(1,2))
printf("%s\n", h(g(f(1,2)))); // "f(1,2)"
printf("%s\n", h(h(f(1,2)))); // "12"
return 0;
}
Ïà¹ØÎĵµ£º
1¡¢¶þάָÕëµÄÓ÷¨ËµÃ÷
a[i]´ÓÐÎʽÉÏ¿´ÊÇaÊý×éÖеĵÚi¸öÔªËØ¡£
Èç¹ûaÊÇһάÊý×飬Ôòa[i]´ú±íaÊý×éµÚi¸öÔªËØËùÕ¼µÄÄÚ´æµ¥ÔªµÄÄÚÈÝ¡£a[i]ÊÇÓÐÎïÀíµØÖ·µÄ£¬ÊÇÕ¼ÄÚ´æµ¥ÔªµÄ¡£
µ«Èç¹ûaÊǶþάÊý×飬Ôòa[i]ÊÇ´ú±íһάÊý×éÃû¡£ËüÖ»ÊÇÒ»¸öµØÖ·£¨ÈçͬһάÊý×éÃûÖ»ÊÇÒ»¸öÖ¸Õë³£Á¿Ò»Ñù£©¡£a£¬a+i£¬a[i], *(a+i), *(a+i)+j, a[i]+j¶¼Ê ......
ÏîÄ¿ÖÐÒªÓõ½Ò»¸öÄ£¿é¡£¿´ÁËϸÃÄ£¿éµÄÓ÷¨£¬¾ÍÒÀºù«»Æ°µÄ°áµ½×Ô¼ºµÄ´úÂëÀïÃæÀ´ÁË¡£²»¹ýÔÚ±àÒëµÄʱºòÅöµ½ÁËÂé·³£¬ ÔÚ³ÌÐòÁ´½ÓµÄʱºò³ö´í£º“undefined reference to***",Ó¦¸ÃÊÇÒòΪûÓаüº¬ÏàÓ¦µÄ¿âÎļþ°É¡£
ÓÚÊDZȽÏÁËmake fileÎļþµÄд·¨£¬ÊÔͼÔÚÎÒÕâ±ß ......
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int main(){
int sockfd;
int len;
struct sockaddr_in address;
int result;
char *strings="GET /svnup/rewrite.php HTTP/1 ......
¸ù±¾ÔÒòÔÚÓë×óÖµºÍÓÒÖµ
char a[10]=“hello”;
sizeof(a);//Êý×éÃû×ö×óÖµ£¬¾ßÓÐÊý×éÃûµÄÊôÐÔ£¬ÊÇÒ»¸öÖ¸ÏòÊý×éÊ×µØÖ·µÄ³£Á¿Ö¸Õë
strcpy(a,"abc");//Êý×éÃû×öÓÒÖµ£¬ÍË»¯ÎªÆÕͨµÄÖ¸Õë
ÔÎÄÁ´½Ó£º
http://hi.baidu.com/%D2%C0%BD%A3%D0%F9/blog/item/7bbf36966c92f36a54fb9663.html
×÷ÕߣºËᦻª e ......
4*4¼üÅÌɨÃèC³ÌÐò
#include<reg52.h>
#define uchar unsigned char
uchar code table[]={0xC0,0xF9,0xA4,0xB0,0x99,
0x92,0x82,0xF8,0x80,0x90,
0x88,0x83,0xC6,0xA1,0x86,0x8E};
uchar temp,num;
void display(uchar);
void delay(uchar a)
{
......