[Solved] Changing array inside the main function. Error:assignment to expression with array type


you need to use strcpy() function

#include <stdio.h>
#include <string.h>
int main()
{
    char name[5] = "Mark";
    printf("%s\n", name);
    char get[5] = "Alex";
    strcpy(name, get);
}    

solved Changing array inside the main function. Error:assignment to expression with array type