C - freeing structs?

Let's say I have this struct typedef struct person{ char firstName[100], surName[51] } PERSON; and I am alloc...

Median Function in C Math Library??

Is there any math function in C library to calculate MEDIAN of 'n' numbers? ...

C: How to free nodes in the linked list??

How will I free the nodes allocated in another function? struct node { int data; struct node* next; }; str...

Rerefence to a const char* array?

I am trying to avoid to repeat my code for 5 differentes arrays. I have 3 arrays (could be more in future): const c...

Check if input is integer type in C?

The catch is that I cannot use atoi or any other function like that (I'm pretty sure we're supposed to rely on mathe...

How to free memory from char array in C?

I created a char array like so: char arr[3] = "bo"; How do I free the memory associated with array I named "arr"?...

Cast off_t to int?

I'm getting a "int format, different type arg (arg 4)" error on the last line. Should I just cast to int or is ther...

What is a bitmap in C??

A bitmap is an array of bits. How is it implemented in C? ...

Convert =C3=B6 to ö assuming UTF-8?

So I am trying to read an email, it is encoded in quoted printable and thus contains for example: =C3=B6 That sho...

Initializing 2D char array in C?

Similar to this question: 2d array, using calloc in C I need help initializing a 2D char array that will all be ini...

How to divide 2 int in c??

wanna divide 2 numbers and get the result like this: 5 / 2 = 2.50 But it only outputs 2. I don't now what i'm doi...

How to properly malloc for array of struct in C?

I will read in two set of char* (or strings) using strtok, and since those two set of chars are related, (address : ...

How to concatenate string and int in C??

I need to form a string, inside each iteration of the loop, which contains the loop index i: for(i=0;i<100;i++) ...