struct Person
{
    char name[40];
    int age;
};
int main() {
    struct Person people[15];
    struct Person *p_Person = people;
    for (int i = 0; i < 15; i++)
    {
        //strcpy(p_Person->name, ??? );
        p_Person->name[0] = 'a' + i;
        p_Person->name[1] = '\0';
        p_Person->age = i + 1;
        p_Person++;
    }
    return 0;
}
What I want to achieve is p_Person[0]->name = 'a', p_Person[1]->name = 'b' ...
The code above is working.  I use p_Person->name[0] = 'a' + i; and terminate with a null character to initialize the char array.
What is the right code if I want to use strcpy to copy alphabet into p_Person->name?
strcpyfor this, I would not regard this as an improvement. It will rather make your code more complicated.p_Personinstead of just indexing intopeople(aspeople[i]). Or if you have some other reason to wantp_Personthen I would consider indexing using that (p_Person[i]), instead of updating the stored pointer value as the code presented does.#define PERSON_N 15.