# Thread: Bitwise Test Questions

1. ## Bitwise Test Questions

Allright, I have a final exam in my C class in 2 weeks. The final exam is over binary files, single linked lists, and bitwise ops. I found these three questions out the answer manual in our c book. However, I have a problem with the "wording" and the answers on these questions.

I want to know what you think about these three questions- tell me if you agree or disagree with these problems:

25. Which statement is true of the << operator?
a) It is called the right shift operator.
b) It is called the bitwise right shift operator.
c) It shifts the bits of the second operand left by the number of bits specified by the first operand.
d) It fills from the right with 0 bits.

Ans: d) It fills from the right with 0 bits.
29. Which statement is true?
a) || is the bitwise or operator,
b) | is the logical or operator
c) Operators || are interchangeable.
d) || and | are each binary operators.

Ans: d) || and | are each binary operators.

17. Which of the following is not true?
a) Lists of data can be stored in arrays.
b) The length of a linked list can vary dynamically.
c) Arrays can become full.
d) Linked lists cannot become full.
Ans: d) Linked lists cannot become full.
Thanks

2. 25. Which statement is true of the << operator?
a) It is called the right shift operator.
b) It is called the bitwise right shift operator.
c) It shifts the bits of the second operand left by the number of bits specified by the first operand.
d) It fills from the right with 0 bits.

Ans: d) It fills from the right with 0 bits.

--------------------------------------------------------------------------------
The wording may be a bit balky, but a, b, and c are definately not true.

quote:
--------------------------------------------------------------------------------

29. Which statement is true?
a) || is the bitwise or operator,
b) | is the logical or operator
c) Operators || are interchangeable.
d) || and | are each binary operators.

Ans: d) || and | are each binary operators.

--------------------------------------------------------------------------------
c is not a complete sentence, and d is right.

quote:
--------------------------------------------------------------------------------

17. Which of the following is not true?
a) Lists of data can be stored in arrays.
b) The length of a linked list can vary dynamically.
c) Arrays can become full.
d) Linked lists cannot become full.
Ans: d) Linked lists cannot become full.

--------------------------------------------------------------------------------
What's your question? D is right, the others are wrong. If you're wondering how, one way is to run out of memory (malloc () returns NULL and voila, your linked list is full)

3. >Ans: d) It fills from the right with 0 bits.
Awful wording.

>Ans: d) || and | are each binary operators.
I have little doubt that your students will be confused the the apparently contradictory use of the words bitwise and binary.

>17. Which of the following is not true?
>Ans: d) Linked lists cannot become full.
Obviously meant to trick the reader with the wording. One can figure it out, but I frown on questions like this.

-Prelude

4. Moi, Prelude- Thanks I had problems with the wording on these questions as well.

5. Those trick questions are nothing more than pig fodder.

You should be ashamed of yourself. What kind of garbage are you teaching anyway? Those questions are neither worthy nor relevant. If your teaching is thorough, there is no need to verify your students understanding of such trivial ideas as these. How about thinking up something from your own mind that reflects the true spirit of programming?

6. Originally posted by Prelude

>17. Which of the following is not true?
>Ans: d) Linked lists cannot become full.
Obviously meant to trick the reader with the wording. One can figure it out, but I frown on questions like this.

-Prelude
lol, i'm in high school right now, taking AP tests, SATs, and other standardized mayhems; such crap has become second nature to me

7. ## Re: Bitwise Test Questions

Originally posted by Mister C
17. Which of the following is not true?
a) Lists of data can be stored in arrays.
b) The length of a linked list can vary dynamically.
c) Arrays can become full.
d) Linked lists cannot become full.
Ans: d) Linked lists cannot become full.
In theory, linked lists can have limitless size, but in practise, they are limited by the systems resources (of course).
I really don't like the double negated question, since it confuses the reader. This should be a test of C/C++, not in reading a question correctly.

8. OK then since you do not like these questions- I did not make these up. What kind of C final exam should I give my class then.

lol, i'm in high school right now, taking AP tests, SATs, and other standardized mayhems; such crap has become second nature to me

Well, I agree reading the questions on most standardized tests is the hardest part.

Let me know about the test.

9. >What kind of C final exam should I give my class then.
Write a program that matches their level of understanding and require them to describe how it works and why. Perhaps you can write several incorrect programs and have your students debug them as well as explain what was going wrong and why.

-Prelude

10. >What kind of C final exam should I give my class then.
Write a program that matches their level of understanding and require them to describe how it works and why. Perhaps you can write several incorrect programs and have your students debug them as well as explain what was going wrong and why.
Yes, on a test I give them a Multiple Choice, True/False, Debugging- were the have to correct code, and 2-3 programming problems to write.

Popular pages Recent additions