Evo sta sam ja piso,al mi to neradi kako treba.
#include<stdio.h>
void razlicito(char *lin1, char *lin2, int brojL)
{
if( strcmp (lin1,lin2) < 0 || strcmp (lin1,lin2) > 0 )
printf( "%d<%s\n%d>%s\n", brojL, lin1, brojL, lin2);
}
main(int argc, char *argv[])
{
FILE *dat1,*dat2;
char lin1 [80];
char lin2 [80];
int i=0;
if(argc != 3)
{
exit(0);
}
if( (dat1=fopen(argv[1], "r") )==NULL ){
printf("Error u otvaranju datoteke %s\n ", argv[1] );
}
if( (dat2=fopen(argv[2],"r") )==NULL ){
printf("Error u otvaranju datoteke %s \n", argv[2]);
}
while( (fgets(lin1,80,dat1) != NULL) && (fgets(lin1,80,dat1) != NULL));
{
razlicito(lin1,lin2,i);
i++;
}
return 0;
}