You are on page 1of 1

#include<stdio.h> char src[100],dest[100]; int main(int argc, char *argv[]) { if(argc<=2) { printf("ERROR"); exit(0); } else { strcpy(src,argv[1]); strcpy(dest,argv[2]); } if(strcmp(src,dest)!

=0) { if(link(src,dest)!=-1) { printf("File copied"); } else { printf("Error in copying"); } } else { printf("Source and destination are same"); }

You might also like