《C语言程序设计实训》源代码

源代码在线查看: 2-3.c

软件大小: 44 K
上传用户: dongchenxi2
关键词: C语言 程序设计 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*2-3.C*/
				#include 
				#include 
				int delete_file(char near *filename)
				{
				 union REGS regs;
				 int ret;
				 regs.h.ah=0x41;
				 regs.x.dx=(unsigned)filename;
				 ret=intdos(®s,®s);
				 return(regs.x.cflag?ret:0);
				}
				int main(void)
				{
				char near *filename;
				int err;
				printf("Enter filename:");
				gets(filename);
				err=delete_file(filename);
				if(!err)
				 printf("Able to delete",filename);
				else 
				printf("NOT able to delete,this file not exist\n");
				return 0;
				}
							

相关资源