BUPT-homework/pointers.c
2021-09-28 19:52:33 +08:00

16 lines
239 B
C

#include <stdio.h>
#include <string.h>
int main(void) {
// initialize pointer variables
char *str;
char str1[20];
str = &str1;
strcpy(str1, str);
printf("%s\n", str1);
printf("%s\n", str1);
printf("%i\n", *str);
return 0;
}