上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: 创建ipv4和ipv6的socket,同时监听某个端口的ipv4和ipv6报文,运行时bind函数执行失败,提示“bind: Address already in use”。原因:ipv6的socket默认情况下也会接收ipv4地址的报文,不同的socket不能监听同样的ip同样的端口。方法:设置i... 阅读全文
posted @ 2014-09-29 15:16 tanghuimin0713 阅读(5746) 评论(0) 推荐(1) 编辑
摘要: 题目:http://www.gowrikumar.com/c/参考:http://wangcong.org/blog/archives/291http://www.cppblog.com/smagle/archive/2010/05/27/116211.htmlhttp://blog.chinaun... 阅读全文
posted @ 2014-09-23 22:10 tanghuimin0713 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 第五十一题Write a C function which does the addition of two integers without using the '+' operator. You can use only the bitwise operators.(Remember the g... 阅读全文
posted @ 2014-09-23 22:01 tanghuimin0713 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 第四十六题What does the following macro do? #define ROUNDUP(x,n) ((x+n-1)&(~(n-1)))题目讲解:参考:http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=814501用于... 阅读全文
posted @ 2014-09-23 21:51 tanghuimin0713 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 第三十八题What is the bug in the following program? #include #include #define SIZE 15 int main() { int *a, i; a = malloc(SIZE*sizeof(int... 阅读全文
posted @ 2014-09-23 21:42 tanghuimin0713 阅读(380) 评论(2) 推荐(0) 编辑
摘要: 第三十四题The following is a piece of C code, whose intention was to print a minus sign 20 times. But you can notice that, it doesn't work. #include in... 阅读全文
posted @ 2014-09-23 21:34 tanghuimin0713 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 第三十一题The following is a simple C program to read and print an integer. But it is not working properly. What is(are) the mistake(s)? #include int m... 阅读全文
posted @ 2014-09-23 21:28 tanghuimin0713 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 第二十六题(不会)The following is a simple program which implements a minimal version of banner command available on most *nix systems. Find out the logic use... 阅读全文
posted @ 2014-09-23 07:20 tanghuimin0713 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 第二十一题What is the potential problem with the following C program? #include int main() { char str[80]; printf("Enter the string:"); ... 阅读全文
posted @ 2014-09-23 07:14 tanghuimin0713 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 第十六题The following is a small C program split across files. What do you expect the output to be, when both of them compiled together and run?File1.c ... 阅读全文
posted @ 2014-09-23 07:05 tanghuimin0713 阅读(357) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页