Help me understand this statement:
static int ** volatile ptr
Please let me know how to analyze this pointer statement.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To address the title text after inserting markers into it: 4(static int 3( * 2( * 1(volatile ptr))). Working inside out:
1: Variable that is free to change at run time for reasons the program may not be aware of. Popular causes are other threads, signals or other events, and pointers to “memory” that is really hardware controllers, etc. Stops compilers/optimizers from emitting code that can fail under such changes.
2: Volatile pointer to this memory. What is pointed to is not volatile.
3: pointer to pointer, or array of pointers. Think char **argv; Again, not volatile.
4: static: this depends on where in the declaration is found:
Interesting: const volatile indicates external influences can change the pointer but your software can not do so.