korter dan mart
authorChris <mail@chriskamphuis.com>
Mon, 9 Feb 2015 15:28:25 +0000 (16:28 +0100)
committerChris <mail@chriskamphuis.com>
Mon, 9 Feb 2015 15:28:25 +0000 (16:28 +0100)
ass2/chris/sws1-s4109503-s4202015/exercise1d.c

index 9a3874d..0143950 100644 (file)
@@ -1,13 +1,13 @@
 #include<stdio.h>
 #include<stdint.h>
 
-int main(){
-       FILE *fp = fopen("/dev/urandom","r");
-       uint16_t read = 0;
+int main(void){
+       FILE *f = fopen("/dev/urandom","r");
+       uint16_t r = 0;
        do{
-               fread(&read, 2, 1, fp);
-               printf("%x \n", read);
-       }while(read != 42);
-       fclose(fp);
+               fread(&r, 2, 1, f);
+               printf("%x\n", r);
+       }while(r != 42);
+       fclose(f);
        return 0;
 }