R
raju
hello all,
i want to know about dynamically allocating for
char **ptr
and in problem
#include<stdio.h>
main()
{
char **p={"hello","world"};
printf("%s",*ptr);
printf("%c",**ptr);
printf("%s",*(ptr+1));
}
i wann to print "hello" , "h", "world"
is this correct code , is ther any problem with this code;
well i know while initializing tha 2d char array
char *p[]={"hello","world"};
but i want to know to how i can initialize using pointer to ponter;;
i want to know about dynamically allocating for
char **ptr
and in problem
#include<stdio.h>
main()
{
char **p={"hello","world"};
printf("%s",*ptr);
printf("%c",**ptr);
printf("%s",*(ptr+1));
}
i wann to print "hello" , "h", "world"
is this correct code , is ther any problem with this code;
well i know while initializing tha 2d char array
char *p[]={"hello","world"};
but i want to know to how i can initialize using pointer to ponter;;