what is the problem indeed.
I don't see any just by looking at it.
well, maybe except that array is not initialized to 0, so if you enter less than 4 digits, you'll get some rubbish.
though generally, do you realize, that here a string is converted to a decimal number, then you convert that number into an array and then to binary? do you really need to do all that?
also pow isn't necessary here. you could write for(j = size-1; j >= 0; j--) num = num*2+array[j];