Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1056521
  • 博文数量: 573
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 66
  • 用 户 组: 普通用户
  • 注册时间: 2016-06-28 16:21
文章分类

全部博文(573)

文章存档

2018年(3)

2016年(48)

2015年(522)

发布时间:2015-12-23 14:57:33

 C写的实现wc和ls函数 以下是用linux C写的实现wc功能的函数#include #define BEGIN 1;int main(int argc, char *argv[]){    int characters, lines, words, state;    char c;    state = characters = lines = words = .........【阅读全文】

阅读(455) | 评论(0) | 转发(0)

发布时间:2015-12-23 14:54:43

 父进程干掉子进程 #include <stdio.h>#include <sys/types.h>#include <unistd.h>#include <signal.h>#include <ctype.h>#define MAX_CHILD_NUMBER 10#define SLEEP_INTERVAL 1int proc_number=0;void.........【阅读全文】

阅读(376) | 评论(0) | 转发(0)

发布时间:2015-12-23 14:52:58

用c语言模拟进程调度/* *Author:Mr Sunny *Time:Oct 2010 * */#include #include #include #include #define N 3enum state {    e, r, t, w, c};struct PCB {    int id, priorit.........【阅读全文】

阅读(901) | 评论(0) | 转发(0)

发布时间:2015-12-23 14:49:32

c语言不定参数探究     最近,遇到一个c语言的不定参数问题。其实,对于c语言的不定参数问题,只需要三个函数就可以搞定了。这三个函数的头文件是,其实下面的三个函数都是一个宏定义(macro)。    这三个函数是:    void va_start(va_list .........【阅读全文】

阅读(573) | 评论(0) | 转发(0)

发布时间:2015-12-23 14:48:01

标准I/O的三种缓冲     最近,有几个同学让我看了一个程序,后来发现问题都是出在使用printf()函数进行输出时的缓冲模式造成的。比如这样的程序:#include <stdio.h>int main(){.........【阅读全文】

阅读(751) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册