![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
春日雨夏蝉鸣,
这个作者很懒,什么都没留下…
展开
-
c语言字符的输入与输出
输入字符getchar()包含其的头文件为 #include<stdio.h>例子: /*判断首字母输出选择的是星期几,如果首字母重复,则再输入第二个字母*/#include"stdio.h"int judge(char ju);int S(void);int T(void);int main(int argc, char const *arg...转载 2018-07-20 08:59:58 · 2280 阅读 · 0 评论 -
使用有名管道在不同进程间复制文件
复制端,打开文件,并将文件中数据写入管道文件中#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <string.h>#define cpy ...原创 2018-08-11 14:43:58 · 263 阅读 · 0 评论 -
使用共享内存搭个鹊桥让牛郎织女聊天
使用共享内存,信号量,线程让牛郎织女进行无隙聊天 /*本程序目的是使用共享内存,让牛郎织女可以任意通信,本程序为牛郎端。*/#include <stdio.h>#include <sys/ipc.h>#include <sys/shm.h>#include <sys/types.h>#include <sys/sem.h...原创 2018-08-11 14:34:36 · 214 阅读 · 0 评论 -
字符拼接的几种方式
char dest[100]={"hellow"};char src[100]={ word!}; char file_name[200];sprintf(file_name, "%s/%s",dest , src);//将src连接到dest后面、并放入file_name中 char str[80]; strcpy (str,"these ");//将t...原创 2018-08-06 20:48:04 · 539 阅读 · 0 评论 -
第一次模拟项目,利用AVL树的航空管理系统
tree.h#ifndef _TREE_H_#define _TREE_H_#include <stdio.h>#include <stdlib.h>#define MAX(a, b) ({ \ typeof(a) _a = a; \ typeof(b) _b = b; \ (void)(&_a == &_b);\ _a &...原创 2018-07-31 20:36:00 · 281 阅读 · 0 评论 -
文件cpy改进,文件加密,对文件两次运算可解密,密码65
#include <stdio.h>#include <sys/ioctl.h>#include <string.h>/***********************************文件cpy改进,文件加密,对文件两次运算可解密************************************/int main(int argc, c...原创 2018-08-04 16:05:36 · 872 阅读 · 0 评论 -
文件复制
#include <stdio.h>#include <sys/ioctl.h>#include <string.h>int main(int argc, char const *argv[]){ FILE *fd_old; FILE *fd_new; long offset_1; long offset_2; char buf[102...原创 2018-08-04 15:38:26 · 157 阅读 · 0 评论 -
单向循环链表正向输入,逆向输出
建立一个单向的循环链表,随机输入,经过排序,从小到大输出,并在最后逆向输出(逆向输出的方式为让单向链表指向反向) #include <stdio.h>#include <string.h>#include <stdlib.h>typedef struct list{ int data; struct list *next;}link...原创 2018-07-25 20:36:02 · 1462 阅读 · 0 评论 -
c语言链接
内部链接:内部链接变量从定义开始,只能在本文件内任意使用#include<stdio.h>static int a=0;//静态定义,只能在本文件使用。 外部链接:main.cmax.cmin.c运行结果1010空链接:代码块作用域和函数作用域的变量具有空连接,表示是有代码块或者函数私有的。 ...原创 2018-07-20 13:52:50 · 888 阅读 · 0 评论 -
arm开发板分配网址udhcpc
# udhcpc --help#udhcpc -fudhcpc 之后需要关闭网卡,之后需要送重开网卡使用命令ifconfig eth0 downifconfig eht0 up之后就能正常工作了,如果无法PING本机,设置回环地址就可以了ifconfig lo 127.0.0.1启动开发板,输入命令“tftp -r test.txt -g 192.168.1.1...原创 2019-03-05 14:48:01 · 971 阅读 · 0 评论