摘要:
题目:http://www.gowrikumar.com/c/参考:http://wangcong.org/blog/archives/291http://www.cppblog.com/smagle/archive/2010/05/27/116211.htmlhttp://blog.chinaun... 阅读全文
摘要:
第五十一题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... 阅读全文
摘要:
第四十六题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用于... 阅读全文
摘要:
第三十八题What is the bug in the following program? #include #include #define SIZE 15 int main() { int *a, i; a = malloc(SIZE*sizeof(int... 阅读全文
摘要:
第三十四题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... 阅读全文
摘要:
第三十一题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... 阅读全文
摘要:
第二十六题(不会)The following is a simple program which implements a minimal version of banner command available on most *nix systems. Find out the logic use... 阅读全文
摘要:
第二十一题What is the potential problem with the following C program? #include int main() { char str[80]; printf("Enter the string:"); ... 阅读全文
摘要:
第十六题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 ... 阅读全文
摘要:
第十三题 int CountBits(unsigned int x) { int count=0; while(x) { count++; x = x&(x-1); } return count; }知识点讲... 阅读全文
摘要:
第九题#include int main(){ float f=0.0f; int i; for(i=0;i”“int main(){ int a = 1,2; printf("a : %d\n",a); retur... 阅读全文
摘要:
第六题 #include int main() { int a=10; switch(a) { case '1': printf("ONE\n"); ... 阅读全文
摘要:
第一题 #include #define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0])) int array[] = {23,34,12,17,204,99,16}; int main() { int d; for(d... 阅读全文