1. This program already has a macro that determines whether or not an unsigned int is odd by examining the least significant binary digit. It is missing the macros for determining if the Nth least significant bit is set (counting N from the least significant bit, starting from 0), and for determining if all bits are on in a range of positions.

    You must add those macros (1.0%)

    A couple of sample runs are ...

         > BitOps
         Enter an integer : 31
         31 is odd
         Enter an integer and a bit number : 31 3
         31 has bit 3 on
         Enter an integer, start and end bit numbers : 31 2 4
         31 has all those bits on
    
         > BitOps
         Enter an integer : 30
         30 is even
         Enter an integer and a bit number : 30 6
         30 has bit 6 off
         Enter an integer, start and end bit numbers : 30 4 6
         30 has not all those bits on
         

    Answer

    BitOps.c

  2. The are many different ways to sort data. For some applications, e.g., making movies, it is better to sort pointers to the data, rather than sort the data itself. You must write a program to demonstrate this kind of activity. (2.0%) The program must ... The output from a sample run should look like this. The picture on the right shows the array of integers and array of pointers after intialization, sorting the array of pointers, and sorting the array of integers.

         ---- Initialized array of integers ----
          0 :  958486403
          1 : 1006139074
          2 :  893180240
          3 :  769601150
          4 :  392522169
         ---- Sorted array of pointers ----
          0 :  392522169
          1 :  769601150
          2 :  893180240
          3 :  958486403
          4 : 1006139074
         ---- Sorted array of integers ----
          0 :  392522169
          1 :  769601150
          2 :  893180240
          3 :  958486403
          4 : 1006139074
         ---- Array of pointers ----
          0 : 1006139074
          1 :  958486403
          2 :  893180240
          3 :  392522169
          4 :  769601150

    Answer

    PointerSort.c