Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f39742

Browse files
Added files for Chapter 6 fg
1 parent 374d3b0 commit 8f39742

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Part_5_C_Pass_By_Value/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ int main(void)
1313
int b = 100;
1414

1515
printf("a is %d, b is %d: BEFORE SWAP\n", a, b);
16+
printf("address of a: %p\n", &a);
17+
printf("address of b: %p\n", &b);
1618

1719
swap(a, b);
1820
printf("a is %d, b is %d: AFTER SWAP\n", a, b);
21+
printf("address of a: %p\n", &a);
22+
printf("address of b: %p\n", &b);
1923

2024
return 0;
2125
}
@@ -27,4 +31,6 @@ void swap(int c, int d)
2731
c = d;
2832
d = temp;
2933
printf("c is %d, d is %d: INSIDE SWAP\n", c, d);
34+
printf("address of c: %p\n", &c);
35+
printf("address of d: %p\n", &d);
3036
}

Part_5_C_Pass_By_Value/swap.exe

0 Bytes
Binary file not shown.

Part_5_C_Pass_By_Value/swap.exe.i64

354 KB
Binary file not shown.

0 commit comments

Comments
 (0)