Determine prime numbers and power of 2 numbers

Added some C functions to determine prime numbers and power of 2
numbers.