Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (28)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (27)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
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, 6129👍, 0💬
Popular Posts:
What is the version information in XML? “version” tag shows which version of XML is used.
How To Check the Oracle TNS Settings? - Oracle DBA FAQ - ODBC Drivers, DSN Configuration and ASP Con...
How can a servlet refresh automatically if some new data has entered the database? You can use a cli...
Where are all .NET Collection classes located ? System.Collection namespace has all the collection c...
What is CAR (Causal Analysis and Resolution)? The basic purpose of CAR is to analyze all defects, pr...