1 | #include <stdio.h> |
---|---|
2 | #include <stdlib.h> |
3 | #include <string.h> |
4 | int main() { |
5 | int stack_int = 5; |
6 | int *heap_int = (int*) malloc(size: sizeof (int)); |
7 | *heap_int = 10; |
8 | |
9 | char stack_str[] = "stack string"; |
10 | char *heap_str = (char*) malloc(size: 80); |
11 | strcpy (dest: heap_str, src: "heap string"); |
12 | |
13 | return stack_int; // break here; |
14 | } |
15 |