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;
}
Ïà¹ØÎĵµ£º
CÓïÑԺ궨ÒåʵÓÃ×ܽá
ºê¶¨ÒåÁËÒ»¸ö´ú±íÌØ¶¨ÄÚÈݵıêʶ·û¡£
Ô¤´¦Àí¹ý³Ì»á°ÑÔ´´úÂëÖгöÏֵĺê±êʶ·ûÌæ»»³Éºê¶¨ÒåʱµÄÖµ¡£
ºê×î³£¼ûµÄÓ÷¨ÊǶ¨Òå´ú±íij¸öÖµµÄÈ«¾Ö·ûºÅ¡£
ºêµÄµÚ¶þÖÖÓ÷¨ÊǶ¨Òå´ø²ÎÊýµÄºê£¬ÕâÑùµÄºê¿ÉÒÔÏóº¯ÊýÒ»Ñù±»µ÷Ó㬵«ËüÊÇÔÚµ÷ÓÃÓï¾ä´¦Õ¹¿ªºê£¬²¢Óõ÷ÓÃʱµÄʵ¼Ê²ÎÊýÀ ......
//ÒÔϳÌÐòÊÇʵÏÖСдת´óд³ÌÐò
#include<stdio.h>
void to_upper(char *str)
{
for(;*str !='\0';str++)
{
if(unsigned(*str-'a')<='z'-'a')
*str-='a'-'A';//Ð ......
6.1 ±àдһ¸ö³ÌÐò,´´½¨Ò»¸ö¾ßÓÐ26¸öÔªËØµÄÊý×é,²¢ÔÚÆäÖд洢26¸öСд×Öĸ,²¢ÈøóÌÐòÏÔʾ¸ÃÊý×éµÄÄÚÈÝ.
#include <stdio.h>
int main(void)
{
char a[26] = {'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p ......
Part I ÈçºÎÉÏ·
1. vi, vimÊDZàÒëÆ÷ô£¿
vi means visual editor£¬ÊÇÈí¼þÊÀ½çµÚÒ»¸öÈ«ÆÁÄ»±à¼Æ÷£¬×î³õµÄ×÷ÕßÊÇÏÖÔÚSun microsystemµÄBill Joy¡£
vim means Vi IMproved£¬¿ÉÒÔ¿´×÷ÊÇÔöÇ¿µÄvi¡£
ºÜ²»ÐÒ£¬ËûÃǶ¼²»ÊDZàÒëÆ÷£¬Èç¹ûÄãÒѾдºÃÁËfirst.c£¬ÄÇô²»ÄÜÖ¸ÍûviÃǽ«ÄãµÄÔ´´úÂë±ä³ÉÖ´ÐгÌÐò¡£
2. gcc, ......