Questions tagged [fgetc]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
178 views

problem with recover.c using malloc and fread

i tried to write a function that sample 4 bytes from card.raw file but i doesn't work because fread doesn't put any data into block buffer so i wrote this simple code and i found out that fgetc works ...
1
vote
1answer
137 views

Pset5 - Trie - using fgetc to read dictionary

Trying to figure out how to read my dictionary using fgetc. I was going to implement the reading using fgetc inside of a while loop. However, after peeking at example code on here, I see along of ...
0
votes
1answer
174 views

pset6 problem loading jpg file

So far my program passes all but 2 of check50 server2: :( Requesting cat.jpg returns 200, image/jpeg, and correct image :( Requesting two files in a row (cat.html then cat.jpg) succeeds I think ...
0
votes
1answer
1k views

pset8 import: Problems with the delimiter in fgetcsv

*EDIT I seem to be having some trouble with the fgetcsv function. In my code I am trying to create a single row array with each tab separated value as a separate element in the array. Instead of ...
1
vote
1answer
68 views

fgetc with sleep unexpected result

I want to know why this code instead of writing a letter each second waits to read all the letters before printing them. #include <stdio.h> #include <unistd.h> int main () { FILE *fp;...
4
votes
2answers
8k views

Why use fgetc instead of fscanf?

In pset6 specification, in question 5, we have been asked why fgetc has been used instead of fscanf. And i don't understand the benefit of using fgetc. So please explain this. Also, in pset 6 ...