Hi Daniel, Does the handling address the position of pointers? unsigned int* co...

Rushikesh M Answered 1 answer
Question by Rushikesh M 1 year ago

Question

Hi Daniel, Does the handling address the position of pointers?
unsigned int* const a;
unsigned int const *a;
unsigned int* const *a;
I noticed there is only field as pointer depth, is it handled in future lecture, or is it unsupported? Or is it really implemented that I missed to see?

Irrespective, thanks for the effort !!

Answers

Answered by Daniel McCarthy

Instructor

Hello,
This is a good question, I don't have our compiler in front of me at the moment I recommend checking out to the final commit in the course and testing your program. I imagine the third example of yours unsigned int* const *a likely will not work because at the time I did not think of someone writing a pointer this way, though technically valid C it is rare to see it written this way. Our compiler is not based off any particular C specification instead its a cluster of common C knowledge put together, so it can compile many C programs but may not adhere to the standard exactly