Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define _A_VALUE "test string"
- int main(void)
- {
- char *a = malloc(sizeof *a * sizeof(_A_VALUE));
- if (a == NULL)
- return EXIT_FAILURE;
- memcpy(a, _A_VALUE, sizeof(_A_VALUE));
- printf("a = %s\n", a);
- free(a);
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement