Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
"const" and "volatile"
Can a variable be both const and volatile?
✍: FYIcenter
Yes. The const modifier means that this code cannot change the value of the variable, but that does not mean that the value cannot be changed by means outside this code. For instance, a timer structure can be accessed through a volatile const pointer. The function itself did not change the value of the timer, so it was declared const. However, the value was changed by hardware on the computer, so it was declared volatile. If a variable is both const and volatile, the two modifiers can appear in either order.
2007-02-26, 7937👍, 0💬
Popular Posts:
What is PMP(project management plan)? The project management plan is a document that describes the p...
What are the five levels in CMMI? There are five levels of the CMM. According to the SEI, Level 1 – ...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...
What's the difference between J2SDK 1.5 and J2SDK 5.0? There is no difference, Sun Microsystems just...
Can you explain duplex contracts in WCF? In duplex contracts when client initiates an operation the ...