
resume
zxy131072
嵌入式linux
展开
-
C实现打印九九乘法表
#include <stdio.h>int main(int argc, const char *argv[]){ int a[9][9] = { 0 }; int i,j; for(i = 0; i < 9; i ++) { for(j = 0; j <= i; j ++) a[i][j] = (i + 1) * (j + 1); } for(i = 0; i < 9; i ++) { for(j = 0; j <= i; j +原创 2020-09-09 11:57:54 · 246 阅读 · 0 评论 -
C实现测试距今年的闰年数目
#include <stdio.h>int main(int argc, const char* argv[]){ int i = 0; int year = 0; int count = 0; for(year = 1; year <= 2020; year ++) { if(((!(year % 4)) && (year % 100)) || (!(year % 400))) { printf("%6d", year)原创 2020-08-21 14:56:06 · 127 阅读 · 0 评论 -
父子进程各拷贝一半文件实现
#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdlib.h>#include <unistd.h>#define N 128char buf[N] = { 0 };int main(int argc, char const *argv[]){ pid_t pid; int r原创 2020-08-20 09:47:47 · 744 阅读 · 0 评论 -
面试题目
1.static 有什么用途?(请至少说明两种)2.全局变量和局部变量在内存中是否有区别?如果有,是什么区别?3.写出 float x 与“零值”比较的 if 语句。4. Windows 32 位系统下, C++程序,请计算 sizeof 的值char str[] = “http://www.uv-teck.com/”char *p = str ;int n = 10;请计算sizeof (str ) = ?sizeof ( p ) = ?sizeof ( n ) = ?void *p原创 2020-08-20 09:11:03 · 145 阅读 · 0 评论 -
驱动知识点简单汇总
1、字符设备与块设备的区别字符设备是指存取时没有缓存的设备,大多数字符设备只能顺序读写。比如鼠标、键盘、声卡。块设备的读写则都有缓存来支持,只能以块为单位进行读写,并且块设备必须能够随机存取(randomaccess),即不管块处于设备的什么地方都可以对它进行读写,字符设备则没有这个要求。比如硬盘、U盘、SD卡。2、常用驱动命令查看驱动中的打印信息用...原创 2019-04-03 13:46:09 · 623 阅读 · 0 评论 -
嵌入式中C语言比较经典的题目的梳理,看后绝对能区分是纯软件还是和硬件打交道的
精华#include <stdio.h>#include <stdlib.h>#include <string.h>#define SECOND_PER_YEAR (60 * 60 * 24 * 365)*1UL#define SECOND_PER_YEAR_2 (unsigned long)((60) * (60) * (24) * (365))...原创 2019-05-24 16:54:49 · 274 阅读 · 0 评论 -
常见网络知识面试题
TCP如何建立链接三次握手: 主动发起连接请求端,发送 SYN 标志位,请求建立连接。 携带序号号、数据字节数(0)、滑动窗口大小。 被动接受连接请求端,发送 ACK 标志位,同时携带 SYN 请求标志位。携带序号、确认序号、数据字节数(0)、滑动窗口大小。 主动发起连接请求端,发送 ACK 标志位,应答服务器连接请求。携带确认序号。四次挥手: 主动关闭连接请求端, 发送 F...原创 2019-05-22 14:45:07 · 323 阅读 · 0 评论