随笔分类 -  【面试】

摘要:本文转载自:http://blog.csdn.net/lanzhihui_10086/article/details/39829623 一、strcmp()与strncmp() strcmp():strcmp(s1,s2); 比较两个字符串。 strncmp():strncmp(s1,s2); 比较 阅读全文
posted @ 2017-09-02 00:11 请给我倒杯茶 阅读(603) 评论(0) 推荐(0) 编辑
摘要:本文转载自:http://zkread.com/article/872291.html 1、 Linux设备中字符设备与块设备有什么主要的区别?请分别列举一些实际的设备说出它们是属于哪一类设备。 字符设备:字符设备是个能够像字节流(类似文件)一样被访问的设备,由字符设备驱动程序来实现这种特性。字符设 阅读全文
posted @ 2017-05-09 11:16 请给我倒杯茶 阅读(1404) 评论(0) 推荐(0) 编辑
摘要:本文转载自:http://www.cppblog.com/mmdengwo/archive/2011/04/14/144253.aspx #include <stdio.h>#include <stdlib.h>int strcmp(char *source, char *dest){while(* 阅读全文
posted @ 2017-05-09 10:51 请给我倒杯茶 阅读(569) 评论(0) 推荐(0) 编辑
摘要:1 int my_atoi(const char *str) 2 { 3 assert(str != NULL); 4 int flag = 1; 5 int result = 0; 6 while(*str == ' ' || *str == '\n' || *str == '\t') 7 { 8 ... 阅读全文
posted @ 2017-05-09 10:40 请给我倒杯茶 阅读(248) 评论(0) 推荐(0) 编辑
摘要:本文转载自:http://blog.csdn.net/cwqbuptcwqbupt/article/details/7518582 看了atol的实现,发现char到int的转换比较奇怪:c = (int)(unsigned char)*nptr++; 先将char转为unsigned再转为int, 阅读全文
posted @ 2017-05-09 10:29 请给我倒杯茶 阅读(802) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示