---
# System prepended metadata

title: zxm QQ THX
tags: [zxm, learning]

---

###### tags: `learning` `zxm`

zxm QQ THX
===
# -Wall -Wmaybe-uninitialized

# 0
```c=
int main(void){
     int *a;
     *a = 11;
 
     printf("%p\n", a);
     printf("%p\n", &a);
     printf("%d\n", *a); // 11
     
     a = malloc(sizeof(int));
  
     printf("%p\n", a);
     printf("%p\n", &a);
     printf("%d\n", *a); // sometimes 0 sometimes 1
}
```
運氣好可以跑 但是是犯戒的
# 1
```c=
int main(void){
     int *a;
     *a = 11;
 
     printf("%p\n", a);
     printf("%p\n", &a);
     printf("%d\n", *a);
     
     a = malloc(sizeof(int));
  
     printf("%p\n", a);
     printf("%p\n", &a);
     printf("%d\n", *a); 
 
     int *b;
     printf("%p\n", b); // Segmentation fault (core dumped)

}
```
Segmentation fault (core dumped)


# 2
```c=
int main(void){
    int *newh;
    printf("%p\n", newh);
```
(nil)

# 3
```c=
int main(void){
    int *newh;
    *newh = 10;
    printf("%p\n", newh);
```
Segmentation fault (core dumped)