Skip to content

Commit b9a82e7

Browse files
committed
more on pointers
1 parent 19cf9fa commit b9a82e7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

prog.11.3.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// More on pointers
2+
3+
#include <stdio.h>
4+
5+
int main (void)
6+
{
7+
int i1, i2;
8+
int *p1, *p2;
9+
10+
i1 = 5;
11+
p1 = &i1;
12+
i2 = *p1 / 2 + 10;
13+
p2 = p1;
14+
15+
printf ("i1 = %i, i2 = %i, *p1 = %i, *p2 = %i\n", i1, i2, *p1, *p2);
16+
17+
return 0;
18+
}

0 commit comments

Comments
 (0)