Hi,

In the below program, while compiling I getting a warning
" warning C4047: '=' : 'int (*)[10]' differs in levels of indirection from 'int *' ". But it works as expected. Also I dont want to change the declaration "pointer to array". How can I eliminate this? Please any one help.

#include <stdio.h>
main()
{
int (*n)[10];
int i,ii;

n=(int *)malloc(sizeof(int)*1024);

for(i=0;i<10;i++)
{
for(ii=0;ii<10;ii++)
{
n[i][ii]=ii+i;
}
}

for(i=0;i<10;i++)
{
for(ii=0;ii<10;ii++)
{
printf("%d\n",n[i][ii]);
}
}

}