Slide 30
Slide 30 text
Read Fish Data (hypothetical, c)
#include
char *readFile() {
file = fopen(“fishone.txt”, "rb");
if (file) {
while ((nread = fread(buf, 1, sizeof buf, file)) > 0)
fwrite(buf, 1, nread, stdout);
fclose(file);
}
}
#include
char *readFile() {
file = fopen(“fishone.txt”, "rb");
if (file) {
while ((nread = fread(buf, 1, sizeof buf, file)) > 0)
fwrite(buf, 1, nread, stdout);
fclose(file);
}
}
#include
char *readFile() {
file = fopen(“fishone.txt”, "rb");
if (file) {
while ((nread = fread(buf, 1, sizeof buf, file)) > 0)
fwrite(buf, 1, nread, stdout);
fclose(file);
}
}
#include
char *readFile() {
file = fopen(“fishone.txt”, "rb");
if (file) {
while ((nread = fread(buf, 1, sizeof buf, file)) > 0)
fwrite(buf, 1, nread, stdout);
fclose(file);
}
}
#include
char *readFile() {
file = fopen(“fishone.txt”, "rb");
if (file) {
while ((nread = fread(buf, 1, sizeof buf, file)) > 0)
fwrite(buf, 1, nread, stdout);
fclose(file);
}
}