Consider a simple C function

profileeunvchiu

Consider this function:

 

   unsigned mystery(unsigned n) {

      return !((n - 1) & n);

   }

 

What exactly does this function do? In other words, what does it compute?

How does the function do what it does? Provide examples.

Propose a new name for the function that better documents its behavior. 

    • 8 years ago
    • 8
    Answer(1)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      integer_number_generator.docx