All Questions
3 questions
0
votes
0
answers
63
views
Why do we use a single pointer rather than a double pointer to pass an array to a function? [duplicate]
Why not double pointer to take an array?
I'm having a bit of problem understanding why an array isn't passed as a double pointer (a pointer to a pointer) since the array name itself is a pointer (...
1
vote
3
answers
63
views
How does this code allocate memory and why does it fail to write to the allocated memory?
Why does the code below compile successfully but fail to write memory other than address 0? (compiled in dev-cpp 6.3)
#include <stdio.h>
#include <stdlib.h>
void alloc_arr(int **d_ptr);
...
0
votes
1
answer
100
views
Double pointer with array in another function
I have to create a program that has an array of costumers (structs that contain name, code and documentation) and functions to insert, remove and list all of them in order of code. I'm not ...