#include <stdio.h>
#include <stdlib.h>
int main() {
    file*fp1,*fp2,*fp3;
    char usn[20],name[20];
    fp1=fopen("sname.txt","r");
    if(fp1==null)
    {
        printf("file not found");
        exit(0);
    }
    fp2=fopen("usn.txt","r");
    if(fp2==null)
    {
    printf("file not found");
    exit(0);
    }
    fp3=fopen("output.txt","w");
    while(!feof(fp1)&&!feof(fp2))
    from file1
    {
        fscanf(fp1,"%s",name);
        3
        fprintf(fp2,"%s",usn);
        fprint(fp3,"%15s%10s\n",name,usn);
    }
    fp3=fopen("output.txt","r");
    printf("\n-------------------\n");
    printf("name usn\n");
    printf("---------------------\n");
    while(!feof(fp3))
    {
        fscanf(fp3,"%s",name);
        fscanf(fp3,%s\n",usn);
        printf("%15s%10s\n",name,usn);
    }
    fclose(fp3);
    return 0;
}
    
    
    

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: