pa-04
This commit is contained in:
17
pa-04/a4/main.c
Normal file
17
pa-04/a4/main.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
int main(void) {
|
||||
int a;
|
||||
int *aptr;
|
||||
char hello[] = "Hello, World!\n";
|
||||
char *hptr;
|
||||
a = 10;
|
||||
aptr = &a;
|
||||
printf("a: %d\n", *aptr);
|
||||
hptr = hello + 7;
|
||||
printf("%s\n", hptr);
|
||||
while (*hptr) {
|
||||
printf("%c ", *hptr++);
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user