Hi everyone,
I encounter this problem and don't know how to get it work. Please help me! Thanks in advanced. Sorry, somehow I can't use the code tag.
The values from 0 to 4096 are supported to print out in the FunctionChild, but they are not. Anyone please check out if I made any mistake.Code:void Functionchild(int * data) { int i; for(i=0; i <4096; i++) { printf("\nValue of buffer passed %d", *data); } } void FunctionFather(int *databuf){ /* Doing some stuff */ FunctionChild(databuf); } void FunctionGrandFa(int * buf){ FunctionFather(buf); } int main(void) { int * buffer; int j; buffer = malloc(sizeof(*buffer)*4096); for(j=0; j<4096; j++) { *buffer = j; } FunctionGradFa(buffer); free(buffer); return 0; }