Consider this c program
int main()
{
int arr[][3] = {1,2,3,4,5,6};
int **p= &arr;
printf("%u %u" , *p, *(p+1));
return 0;
}
Some compilers are giving output as 1,4 some compilers are giving type compatible error
According to me We need double dereference in order to get value right, and if we have a 2D array then Wouldn’t the double pointer will point to its first element, then why we are getting type compatible error and why referencing only once giving array element?
New contributor
Meet Maksud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.