The function returns pointer to the allocated memory
int* dec2bin(int y){
int *arr = (int*)malloc(sizeof(int)*5);
int i;
for (i=0; i<5; i++) arr[i]=0;
return arr;
}
for an array of 5 integers. Its address may not be equal to 0 unless the allocation failed. But the integers themselves are equal to 0.
If you will write the call for example the following way (it is not clear the meaning of the parameter)
int *p = dec2bin( 0 );
then *p, the first element of the array, will be indeed equal to 0
Or even you can write
int *p = dec2bin( 0 );
for ( int i = 0; i < 5; i++ ) printf( "%i ", p[i] );
and you will get that all elements of the array are equal to 0.