-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest5.c
More file actions
36 lines (33 loc) · 1.01 KB
/
test5.c
File metadata and controls
36 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdlib.h>
#include <stdio.h>
struct Node {
struct {
int a[2]; int b;
} value;
struct Node* next_;
};
int main() {
// struct Node n1;
char* abc = "This is a test";
struct Node* n1[] = {malloc(sizeof(struct Node)), NULL};
n1[0]->next_ = malloc(sizeof(struct Node));
n1[0]->value.a[0] = 0x123456;
n1[0]->value.a[1] = 0x123456;
n1[0]->value.b = 0x123456;
n1[1] = n1[0]->next_;
n1[0]->next_->next_ = malloc(sizeof(struct Node));
n1[0]->next_->value.a[0] = 0xDEF123;
n1[0]->next_->value.a[1] = 0xDEF123;
n1[0]->next_->value.b = 0xDEF123;
n1[0]->next_->next_->next_ = malloc(sizeof(struct Node)); // printf("Test");
n1[0]->next_->next_->value.a[0] = 0xDEF123;
n1[0]->next_->next_->value.a[1] = 0xDEF123;
n1[0]->next_->next_->value.b = 0xDEF123;
n1[0]->next_->next_->next_->next_ = NULL;
n1[0]->next_->next_->next_->value.a[0] = 'A';
n1[0]->next_->next_->next_->value.a[1] = 'B';
n1[0]->next_->next_->next_->value.b = 'C';
printf("abc");
printf("%s", abc);
return 5;
}