Part of an exercise in my book requests "Write a function called bit_test that takes two arguments: an unsigned int anda bit number n. Have the function return 1 bit number n if it is on inside the
word, and 0 if it is off."

The if statement of the function that deals with this is:
if ( (word >> (31 - n)) & 0x1 )
return 1;

I don't understand what it is saying.
The argument shifts word to the right by (31-n) which is AND'ed with the hexidecimal 1. What does that mean?

2. The argument shifts word to the right by (31-n) which is AND'ed with the hexidecimal 1. What does that mean?
I could answer that but since you were able to type all of that I wonder about your real question. Do you know what any of that means or does every operation need to be explained? I'd rather start by building on what you know.

3. Oh. I actually didn't understand the question "Have the function return 1 bit number n if it is on inside the
word, and 0 if it is off." That is pasted verbatim, but is there a typo? I don't understand what it's saying.

4. OK so binary numbers, like all numbers, have a place value. 2^31, 2^30, 2^29, ... 2^0, and in each place value there is either a 0 where the place value is not included, or a 1, which it is, and that sums up the value of the number. What you were asked to do is test place value n if it is 1 or 0. The code you posted solved the problem. Did you solve the problem? Do you understand the solution at all? That is what I've asked you from the start.

5. if ( (word >> (31 - n)) & 0x1 )
So if the argument inside the if statement is 1, then 1 is returned.
The word is shifted over 31-n places to the right. If the value anded with 1 results in 1, it is on and returns 1. Is that correct?

6. Yes.