title: Write One Line C Function To Find Whether A No Is Power Of Two
signature: writeOneLineCFunctionToFindWhetherANoIsPowerOfTwo :: Integer -> Bool
  writeOneLineCFunctionToFindWhetherANoIsPowerOfTwo n = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Bool -> Bool -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Bool -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (1) (True) )
  
      printf "TEST-1...%s\n" (driver (2) (True) )
  
      printf "TEST-2...%s\n" (driver (8) (True) )
  
      printf "TEST-3...%s\n" (driver (1024) (True) )
  
      printf "TEST-4...%s\n" (driver (24) (False) )
  
      printf "TEST-5...%s\n" (driver (7) (False) )
  
      printf "TEST-6...%s\n" (driver (46) (False) )
  
      printf "TEST-7...%s\n" (driver (61) (False) )
  
      printf "TEST-8...%s\n" (driver (73) (False) )
  
      printf "TEST-9...%s\n" (driver (66) (False) )
  
source_py: def write_one_line_c_function_to_find_whether_a_no_is_power_of_two(n):
      if (n == 0):
          return False
      while (n != 1):
          if ((n % 2) != 0):
              return False
          n = (n // 2)
      return True
source_cpp: bool write_one_line_c_function_to_find_whether_a_no_is_power_of_two(int n) {
    if ( n == 0 ) return 0;
    while ( n != 1 ) {
      if ( n % 2 != 0 ) return 0;
      n = n / 2;
    }
    return 1;
  }