Both display 23
. But what is the difference between the two?
code-1
main()
{
int *ar[10];
**(ar+0) = 23;
printf( "%d", **(ar+0) );
return 0;
}
Code-2
main()
{
int *ar[10];
*(ar+0) = (int*) malloc(sizeof(int));
**(ar+0) = 23;
printf( "%d", **(ar+0) );
return 0;
}