update dir

This commit is contained in:
light-city
2019-07-25 18:45:55 +08:00
parent efc8b13385
commit b274475dba
10 changed files with 275 additions and 2 deletions

16
volatile/volatile.cpp Normal file
View File

@@ -0,0 +1,16 @@
/* Compile code with optimization option */
#include <stdio.h>
int main(void)
{
const volatile int local = 10;
int *ptr = (int*) &local;
printf("Initial value of local : %d \n", local);
*ptr = 100;
printf("Modified value of local: %d \n", local);
return 0;
}