OS used - Linux Compiler used - gcc
1) How can the memory for the pointer "q" be created using malloc.
where q is "int (*q)[10];" ?
When I tried with
Expand|Select|Wrap|Line Numbers
- q = (int *) malloc(sizeof(int)*10);
"warning: assignment from incompatible pointer type"
2) What is the differnce between the pointer q from p
Expand|Select|Wrap|Line Numbers
- int *p;
- p = (int*) malloc(sizeof(int)*10);