Commit e4be3ef0 authored by xingqiao's avatar xingqiao
Browse files

helloworld basic code files

parent 88727ab0
......@@ -17,14 +17,14 @@ int main(void) {
printf("%p\n", (void *)&char1);
printf("%p\n", (void *)&int1);
long difference1 = (long)&char1 - (long)&int1;
long difference1 = (long)&int1 - (long)&char1;
printf("%ld\n", difference1);
printf("%p\n", (void *)&arr1);
printf("%p\n", (void *)&arr1[0]);
printf("%p\n", (void *)&arr1[1]);
long difference2 = (long)&arr1[0] - (long)&arr1[1];
long difference2 = (long)&arr1[1] - (long)&arr1[0];
printf("%ld\n", difference2);
long difference3 = &arr1[0] - &arr1[1];
long difference3 = &arr1[1] - &arr1[0];
printf("%ld\n", difference3);
printf("%p\n", (void *)&char2);
printf("%p\n", (void *)&int2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment