Initial commit

This commit is contained in:
2021-10-01 20:24:05 +02:00
commit 860c025165
194 changed files with 4846 additions and 0 deletions

16
kapitel12/lasa-bin-ex1.c Normal file
View File

@@ -0,0 +1,16 @@
#include <stdio.h>
int main(void)
{
FILE *binfil;
float x;
if ( (binfil = fopen("flyttal.bin", "rb")) == 0 )
{
fprintf(stderr, "Kunde inte öppna filen\n");
return 1;
}
fread(&x, sizeof(x), 1, binfil);
printf("Flyttalet är: %f\n", x);
fclose(binfil);
return 0;
}