Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what ** means

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
main()
{
char **p="Hello";
printf("%s",p);
}
what does that **p mean?can anybody explain this pointer
descriptively
 

well... char** p; is a 2 dimentional pointer.

char** p = "Hello" is, in my opinion, useless... it will be the same as char* p = "hello" with the current implimentation.

Here is where it could prove useful

Code:
int array[2][2];

for(int i = 0;i<2;i++)
{
    for(int j = 0;j<2;j++)
    {
       array[i][j] = (i+1)*(j+1);
    }
}

printf(&quot;%d&quot;,**array); // will print out 1


You can dereference it with the **

matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top