...
FILE *fp;
char texto[1024];
char enc[3];
int j, len, largo;
...
if((fp=fopen("archivo.txt","r")==NULL)
{
exit(printf("Error al abrir 'archivo.txt'n"));
}
while(fgets(texto,1024,fp)!=NULL)
{
len=strlen(texto);
for(j=0;j<len;j+=2)
{
strncpy(enc,(texto+j),2);
enc[2]=0;
encripta(enc);
}
}
fclose(fp);