#include#define ARRAY_LEN(ARR) (sizeof(ARR) / sizeof((ARR)[0])) char* test1() { return "ABC"; } void test2(char* str, int size) { char* temp = "DEF"; strncpy_s(str, size, temp, strlen(temp)); } void test3(char** str) { char* temp = "GHI"; *str = temp; } int main() { char str2[32]; char* str3 = NULL; memset(str2, '\0', ARRAY_LEN(str2)); printf("%s\n", test1()); test2(str2, ARRAY_LEN(str2)); printf("%s\n", str2); test3(&str3); printf("%s\n", str3); return 0; }