All pastes #391879 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-12 14:32 UTC
rendered paste body
int  main ()
  {
  	char *nume_fisier = NULL;
	int nbytes = 1024;
	FILE *fisier;
	word *tabel = NULL;
	word *acum = NULL;
	tabel = tabelcrc(CRCCCITT);
	nume_fisier = (char *) malloc (nbytes + 1);
	printf("Dati numele fisierului: ");
	getline(&nume_fisier, &nbytes, stdin);
	printf("Numele introdus ie: %s", nume_fisier);
	fisier = fopen(nume_fisier,"r");
	byte temp;
	while(fscanf(fisier,"%c",&temp) != EOF)
	{
		crctabel((word)temp,acum,tabel);
		printf("%s",acum);
	}
	fclose(fisier);
	return 0;
   }