top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

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

0 votes
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 Google+ Share Button LinkedIn Share Button Multiple Social 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.


answer Jun 26, 2015 by Salil Agrawal
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.