mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-02-03 18:43:52 +08:00
support bazel complie this project and format code.
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
/* Compile code with optimization option */
|
||||
#include <stdio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
const volatile int local = 10;
|
||||
int *ptr = (int*) &local;
|
||||
int main(void) {
|
||||
const volatile int local = 10;
|
||||
int *ptr = (int *)&local;
|
||||
|
||||
printf("Initial value of local : %d \n", local);
|
||||
printf("Initial value of local : %d \n", local);
|
||||
|
||||
*ptr = 100;
|
||||
*ptr = 100;
|
||||
|
||||
printf("Modified value of local: %d \n", local);
|
||||
printf("Modified value of local: %d \n", local);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user