repositories
/
sws1-1415.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d782a4
)
File closen..
author
Chris
<mail@chriskamphuis.com>
Mon, 9 Feb 2015 14:34:20 +0000
(15:34 +0100)
committer
Chris
<mail@chriskamphuis.com>
Mon, 9 Feb 2015 14:34:20 +0000
(15:34 +0100)
ass2/chris/sws1-s4109503-s4202015/exercise1b.c
patch
|
blob
|
history
diff --git
a/ass2/chris/sws1-s4109503-s4202015/exercise1b.c
b/ass2/chris/sws1-s4109503-s4202015/exercise1b.c
index
f1c9f23
..
4a844dc
100644
(file)
--- a/
ass2/chris/sws1-s4109503-s4202015/exercise1b.c
+++ b/
ass2/chris/sws1-s4109503-s4202015/exercise1b.c
@@
-1,12
+1,12
@@
#include<stdio.h>
int main(){
- FILE *fp;
- fp = fopen("/dev/urandom","r");
+ FILE *fp = fopen("/dev/urandom","r");
char buffer = 0;
do{
fread(&buffer, 1, 1, fp);
printf("%i %u %#x \n",buffer, buffer, buffer);
} while(buffer != 42);
+ fclose(fp);
return 0;
}