斗----自尊、自强、自信

蜗牛慢慢爬,只要不停下来就好~~

博客园 首页 新随笔 联系 订阅 管理

2007年12月22日 #

摘要: x&(x-1)==0;反应太慢,笔试的时候想不出来。。 阅读全文
posted @ 2007-12-22 16:01 a斗 阅读(244) 评论(0) 推荐(0) 编辑

摘要: Write a program delete itself after execution. 思路:调用cmd命令来删除,用ShellExecute来执行cmd命令 #include #include #include int main(int argc, char* argv[]) { ch... 阅读全文
posted @ 2007-12-22 15:44 a斗 阅读(244) 评论(0) 推荐(0) 编辑

2007年12月20日 #

摘要: Getmemory的几个经典的关于内存的笔试题还是经常能考到的 void GetMemory1(char *p) { p = (char *)malloc(100); } void Test1(void) { char *str = NULL; GetMemory1(str); strc... 阅读全文
posted @ 2007-12-20 15:21 a斗 阅读(2237) 评论(0) 推荐(0) 编辑

摘要: 一、自动类型转换 自动转换发生在不同数据类型的变量混合运算时,由编译系统自动完成。自动转换遵循以下各则: 1.若参与运算变量的类型不同,则先转换成同一类型,然后进行运算。 A.char型和short型参与运算时,必须先转换成int型。 B.所有的浮点运算都是以双精度进行的,即使仅含float单精... 阅读全文
posted @ 2007-12-20 14:16 a斗 阅读(611) 评论(0) 推荐(0) 编辑

摘要: 转自:http://blog.chinaunix.net/u1/51538/showart.php?id=418572 //算法1,查表法,典型的空间换时间,在现代的CPU上,这种算法具有最快的速度。 unsigned char reverse1(unsigned char c) { static... 阅读全文
posted @ 2007-12-20 10:37 a斗 阅读(330) 评论(0) 推荐(0) 编辑