Hey, this is my first post on this forum so tell me if anything I write is against the forum rules..
Anyways, I'm currently doing a course for beginner C and Python (C section at the moment - I know some beginner Java, C#, blah, blah aswell) but one problem they keep using code like this
Code:
int m[4][4] = {{1,3,5,7}, {11,33,55,77}, {2,4,6,8}, {22,44,66,88}};
int (*parr)[4] = m;
(The above fine I've worked with multidimensional arrays before however)
Here's where I get confused does this mean that +2 applies to the first bracket or the second or both, would be nice to keep it simple.. (m[1][1] = 33 - I hope)
Code:
*(*m+2) = 55
*(*(m+1)+1) =11
*(m[1]+2) = 55
(*(m+2))[3] = 6
(*(parr+3))[2] = 4
I've included some of my answers but really they're shots in the dark, I've done the majority of the programming and most of the theory type questions but I've just never seen this type of calling before...
ps. If this goes against helping newbs with homework rule then just tell me and I'll go away
Thanks again