当前位置:编程学习 > C/C++ >>

C语言中复制文件

C代码 
#include<stdio.h> 
int main() 

    FILE *dest_p,*source_p; 
    int ch; 
    source_p=fopen("1.tar.gz","rb"); 
    dest_p=fopen("2.tar.gz","wb"); 
    while((ch=getc(source_p))!=EOF) 
    { 
        putc(ch,dest_p); 
    } 
 
    fclose(dest_p); 
    fclose(source_p); 
    return 0; 

作者“helinhang”
 

补充:软件开发 , C语言 ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,