update pointer.c
This commit is contained in:
parent
b5ef82343c
commit
a77b21b893
11
pointers.c
11
pointers.c
|
@ -3,13 +3,8 @@
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
// initialize pointer variables
|
// initialize pointer variables
|
||||||
char *str;
|
int i = 1;
|
||||||
char str1[20];
|
int *p1 = &i;
|
||||||
str = &str1;
|
printf("%i", *p1);
|
||||||
|
|
||||||
strcpy(str1, str);
|
|
||||||
printf("%s\n", str1);
|
|
||||||
printf("%s\n", str1);
|
|
||||||
printf("%i\n", *str);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue