Questions tagged [fgetc]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
201 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 ...
user avatar
1 vote
1 answer
138 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 ...
user avatar
0 votes
1 answer
180 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 ...
user avatar
0 votes
1 answer
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 ...
user avatar
1 vote
1 answer
75 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;...
user avatar
  • 389
4 votes
2 answers
9k 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 ...
user avatar