dup函数简单应用
2011-04-14 20:54
253 查看
/* ************************************************************************ * Filename: 02_dup.c * Description: * Version: 1.0 * Created: 2011年04月14日 20时47分52秒 * Revision: none * Compiler: gcc * Author: wenhao (wh), hnrain1004@gmail.com * Company: sunplusapp * ************************************************************************/ #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { int fd; char str[]="hello world/n"; fd = dup(fileno(stdout)); write(fd,str,strlen(str)); return 0; }
相关文章推荐
- MT4图表函数的简单应用
- 简单Case函数应用
- bash脚本之函数简单介绍、应用及函数的简单递归调用
- SQL Server 2005中xml类型和函数的简单应用
- C语言简单函数应用:数学计算
- signal函数的简单应用
- go语言函数参数与返回值示例,数组的简单应用
- 【c++】函数模板的简单应用
- 函数及数组的简单应用---存储成绩
- 关于字符串操作的一些函数简单说明与应用
- 如何取得字符点阵数据 GetGlyphOutline函数简单应用
- c++中虚函数的简单应用
- SQL Server 2005中xml类型和函数的简单应用
- 新手笔记-函数指针的简单应用
- 数字字符串转换成算数类型函数atoi(),分解字符串的函数strtok()的简单应用
- 【狂人C】学习笔记之一个简单的乘法函数的应用
- 【学习ios之路:C语言】函数及递归的简单应用
- 简单画图板示例(虚函数应用示例)
- Hive中的简单窗口函数应用
- 第十一周 函数调用的简单应用(输出星号图1)