摘要: int *i; //定义一个整型数字的指针变量 iint p = 34; i = &p;printf("i value = %d ,address = %p",*i,i);return0;i value = 34 ,address = 0x7fff5fbff854#include <stdio.h>#include <ctype.h> // 包括字符处理函数void swap(int *i,int *p);int main(int argc, const char * argv[]){ int i = 5; int p = 10; print 阅读全文
posted @ 2012-12-26 15:48 diablo大王 阅读(171) 评论(0) 推荐(0) 编辑
摘要: C语言中的指针,是用来存储变量地址。int i = 34;printf("i = %d, address = %p",i,&i);i = 34, address = 0x7fff5fbff85c 阅读全文
posted @ 2012-12-26 15:35 diablo大王 阅读(374) 评论(0) 推荐(0) 编辑
摘要: isalnum() 字母,数字isalpha() 字母isblank() 标准空格iscntrl() 控制符isdigit() 数字isgraph() 除空格外的可打印字符islower() 小写字母isprint() 可打印字符ispunct() 标点符号isspace() 空白字符isupper() 大写字母isxdigit() 十六进制字符tolower() 如果参数是大写,转换为小写,否则返回原值toupper() 如果参数是小写,转换为大写,否则返回原值 阅读全文
posted @ 2012-12-26 09:09 diablo大王 阅读(1694) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <ctype.h> // 包括字符处理函数int main(int argc, const char * argv[]){ char ch; while ((ch = getchar()) != '\n') { if(isalpha(ch)) putchar(ch+1); else putchar(ch); } putchar(ch); return 0;}yjdabc ddd !! %dddzkebcd eee !! %eee 阅读全文
posted @ 2012-12-26 09:03 diablo大王 阅读(150) 评论(0) 推荐(0) 编辑
摘要: char ca = getchar(); // scanf("%c",&ch);putchar(ca); // printf("%c",ch); 阅读全文
posted @ 2012-12-26 08:57 diablo大王 阅读(197) 评论(0) 推荐(0) 编辑
摘要: ()*(取指针的值)++,--,+,-,sizeof,!*,/,%+,-< > <= >=== !==sum += *value++;// *和++具有相同的优先级,运算时从右向左进行 *value++ 等同 *(value++) 阅读全文
posted @ 2012-12-26 08:50 diablo大王 阅读(149) 评论(0) 推荐(0) 编辑