When we are using a 2-D array of characters we are at liberty to either initialize the strings where we are declaring the array,or receive the string using scanf() fucntion.However when we are using an array of pointers we can not receive the strings from keyboard using scanf(). why?
#include<stdio.h>
int main()
{
char *names[6];
int i;
for(i=0;i<=5;i++)
{
printf("Enter name:");
scanf("%s",names[i]);
}
return 0;