So I have a char array, c, which has characters like this: "HELLO MY NAME"
I want to make a char pointer array, *pCar, so that pCar[0] will have HELLO and pCar[1] will have MY and pCar[2] will have NAME.
I have something like this but it doesn't work.
for (i = 0; i < 30; i++)
{
pCar[i] = &c[i];
}
for (i = 0; i < 30; i++)
{
printf("Value of pCar[%d] = %s\n", i, pCar[i]);
}