C
This commit is contained in:
19
learnc/learnc11.c
Executable file
19
learnc/learnc11.c
Executable file
@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
} point;
|
||||
|
||||
int main() {
|
||||
point * mypoint;
|
||||
mypoint = (point *)malloc(sizeof(point));
|
||||
|
||||
mypoint->x = 10;
|
||||
mypoint->y =5 ;
|
||||
printf("mypoint coordinates: %d, %d\n", mypoint->x, mypoint->y);
|
||||
|
||||
free(mypoint);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user