Hash table in C, array of pointers
I am trying to implement a hash table in C. We hash the value and we do modulo the size of the table to obtain the index i. Each entry of the table is a linked list. We then put the value in the i …
Start Learning to Code
I am trying to implement a hash table in C. We hash the value and we do modulo the size of the table to obtain the index i. Each entry of the table is a linked list. We then put the value in the i …
I need some help to populate an array made of structs in perl. The data for the array comesfrom a .SH file with the following format : 108,Country,Location,ap17,ip_149,ssh,model,12/8/2020 The code I …
I wrote a program in linux kernel, which should allocate memory for 5 simple structures each of with unique id, so i used static int in a constructor and increment it and in the end i just print …
Why this c-program gives error when I initialize structure members (user.username and user.pin) outside the main function?, But everything becomes fine when I initialize it inside the main function. …
So I have an array of structs with every struct containing a dynamic array of strings. typedef struct _test { int total; char *myarray[]; } Test; This how I allocated enough memory Test *…
I have a MATLAB struct that I would like to pull a single text field from every entry and put these entries into a string array. An example struct can be created with the following: allFiles = dir(…
As mentioned in the title, I’m successfully dereferencing the data coming to and from the modMYSTRUCT and showMeThis functions. The proper output before “Fourth check” displays but a …
As you can see from the title I want to change lowercase charachter in word to uppercase and vice versa. Also I need to use struct object (in my case name). I have a problem when I change charachter …
This program is supposed to ask the user for two values, then generate and print a table using the two values as the number of rows and columns respectively. Each cell of the table has two values, …
Please help me with this code. Why same name is assigned to all the different structs? I’m noob to pointers and arrays in C. struct student { char *name; int reg_no; }; typedef struct student …