1
vote
Accepted
CS50 Pset4 Logic Problem
I think the issue is with this line of code:
while (fread(block, sizeof(block), 1, input) == 1)
fread returns the number of items successfully read. So, if it successfully reads 1 block of data, it ...
1
vote
Accepted
Declaring a typedef struct for linked list
The requirement is that you give the struct a name so you can use it in the declaration. Whether or not that is a different name isn't important. Both of those declarations are fine.
1
vote
Accepted
Help in linked datastructure
You seem to ignore the value of found. Just disables the duplicate check.
You don't have a loop for printing elements, and you seem to use ptr before initialisation. I would expect a loop very ...
Only top scored, non community-wiki answers of a minimum length are eligible