Could you please tell pictorially difference bw these 2 codes(o/p is same) and suggest any source where i can once in for all resolve doubts in pointer to pointer problems except "K&R in ANSI C"
#include <stdio.h>
#include <string.h>
void pointer(char**);
void main()
{
char *p[]={"name","fame","claim"};
pointer(p);
}
void pointer(char **a)
{int i=0;
while(a[i]!=NULL)
{
printf("\nstring%d is:%s \n",i,a[i]);
i++;
}
}
or
#include <stdio.h>
#include <string.h>
void pointer(char**);
void main()
{
char *p[]={"name","fame","claim"};
pointer(&p);
}
void pointer(char **a)
{int i=0;
while(a[i]!=NULL)
{
printf("\nstring%d is:%s \n",i,a[i]);
i++;
}
}