随笔分类 - 面试
摘要:1、计算一个字节内有多少bit被置为1? 1 #include <stdio.h> 2 3 #define BIT7 (0x1<<7) //0x1000 0000 4 5 int calculate(unsigned char c) 6 { 7 int count = 0; 8 int i; 9 u
阅读全文
摘要:1、将一个字符串倒序,如“abcd”倒序后变为“dcba”。 1 /*字符串倒序*/ 2 #include <stdio.h> 3 #include <string.h> 4 #include <stdlib.h> 5 6 char *str_reverse(char *src) 7 { 8 cha
阅读全文
摘要:https://blog.csdn.net/zqixiao_09/article/details/50937907
阅读全文