#include <stdio.h>
#include <stdlib.h>
char pointer();
void main() {
char*name = "Paz Leviim", **p_name = &name;
*p_name = pointer();
printf("Now it's %s", *p_name);
getchar();
}
char pointer() {
char name_to_main[100];
printf("The value now is Paz Leviim\nPlease set value:");
scanf_s("%[^\n]%*c", &name_to_main,100);
return name_to_main;
}
How can I return the value of variable name_to_main to the pointer *p_name?