All Questions
5 questions
0
votes
1
answer
60
views
Last word of dictionary file replaces all the nodes in node bucket
Currently I am working on the load function using a hash table with singly-linked list. I have tested the create(), insert(), and find() function in a separate file and they work as expected.
...
2
votes
1
answer
3k
views
Pointers and arrays, don't understand the relationship
I made two structs, they are very similar. The first one is a node and the second one, called hash, only contains a pointer to a node. In main I've made pointers to allocated memory for them. newNode ...
0
votes
1
answer
212
views
pset 4 Recover creates 50 corrupted or mainly grey images
I wanted to try using malloc and a BUFFER structure of 512BYTES for this exercise with the intention of creating a file if the 4 signatures of a JPG are detected and fwriting the struct of 512B into ...
0
votes
1
answer
191
views
Want to make sure I understand struct, malloc, and pointers and how they relate to each other
Sort of related to PSET4 resize, but actually want to make sure I understand this in general.
So at first I just declared a struct BITMAPINFOHEADER called "new_bi" and dealt with it while avoiding ...
3
votes
1
answer
19k
views
How to free a nested struct?
In preparation for my final project, I am writing a C program that handles task lists. It utilizes a nested struct. For every line it reads from a file it creates a struct of type task. Each task then ...