I was wondering and could not find an answer to my question anywhere. Lets say I do have two functions:
void function_B(int * data){
// I am able to modify its content
}
void function_A(int * data){
// I do not want to be able to modify the data nor its content here only pass the pointer to function B, so it can be changed there
function_B(data);
// Nor I want to be able to modify it here
}
I am familiar with the const keyword, but if I make the data and the pointer constant for function A, it cannot be changed also by the function B. How could I write such a code? Is this even possible with c?