I think the error in your code should be in how you are calculating the average of letters and sentences per word: float averageWords = sentences / words * 100 and float averageLetters = numberOfCharacters / words * 100;. You should actually multiply letters and sentences by 100 in each formula and then divide by words.
I found this example, really cool.
The function has been converted to a pointer.
int * onefunction()
static int returnA;
returnA = 1;
returnA = 2;
int a, b;
callfunc = onefunction();
a = callfunc;
b = ...
You seem to be confused about malloc(). malloc allocates memory from heap. You can store anything inside this allotted memory location.
Specifically it expects the following input: number of bytes of memory you want to be allocated.
ptr = malloc(sizeof(int));
*ptr = 300;
printf("Address of ptr: %p\n", ptr);
printf("Value inside ptr: %...
char *flname = "0.jpg";
The string here is immutable. Writing to it again is undefined behavior. You need to stack allocate space for a file name. 000.jpg is 7 characters and you need one extra byte to store the null terminator so 8 characters will do it. char flname; You almost had it.
In essence, I'm not sure what I could use to close the ...
My understanding is that list is a pointer variable initialised
without a value
No. It's initialized to NULL. That's what the = NULL part does. A variable can't be initialized without a value. Initializing means assigning a value. Uninitialized meaning memory is allocated, but you didn't write anything to it. Maybe this is what you meant, a pointer being ...