Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct {
- int size;
- int* arr;
- } S;
- int main(void) {
- S foo;
- int new_size = 5;
- foo.size = new_size;
- foo.arr = malloc(new_size * sizeof(int));
- free(foo.arr);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement