top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the meaning of "const volatile int a;" in C? [CLOSED]

0 votes
317 views
What is the meaning of "const volatile int a;" in C? [CLOSED]
This question has an answer at: What is use of const volatile ?
posted Jun 26, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

This has already been discussed in detail -
const qualifier means that a cannot be modified through code. If you attempt to do so the compiler will provide a diagnostic. Volatile still means that compiler cannot optimize or reorder access to a.

Practical Usage:
Accessing shared memory in read-only mode.
Accessing hardware registers in read-only mode.

Read more at http://tech.queryhome.com/18947/what-is-use-of-const-volatile

answer Jun 26, 2015 by Salil Agrawal
...