I have this matrix, named Q:
0 0 0 1 0 1 1 1 0 1 1 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 1 1 0 0 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 1 0 0 1 1 0 0 0
0 0 0 1 1 0 0 1 1 1 0 1 0
0 0 0 1 1 0 0 1 0 1 0 1 1
0 0 1 1 0 0 1 0 0 1 1 0 1
0 0 1 0 1 1 0 0 0 0 0 0 0
1 0 0 0 1 1 1 1 1 0 1 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 1 1 1 0 1 0 0 1
1 1 1 1 1 1 1 0 0 0 1 1 0
and a pointer p dinamically allocated.
p=(int *) calloc(13, sizeof(int));
How can I copy an entire line into p? like this: p <- Q[6][]
use memcpy() like memcpy(p,Q[6],13*sizeof(int));