Skip to content

Commit 19cf9fa

Browse files
committed
further pointers
1 parent 55d6ffe commit 19cf9fa

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

prog.11.2.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Further examples of pointers
2+
3+
#include <stdio.h>
4+
5+
int main (void)
6+
{
7+
char c = 'Q';
8+
char *char_pointer = &c;
9+
10+
printf ("%c %c\n", c, *char_pointer);
11+
12+
c = '/';
13+
printf ("%c %c\n", c, *char_pointer);
14+
15+
*char_pointer = '(';
16+
printf ("%c %c\n", c, *char_pointer);
17+
18+
return 0;
19+
}

0 commit comments

Comments
 (0)