I am a computer science instructor. One of the classes I teach on a regular basis is C programming. I need some help on creating C test questions. I have many test banks from many different texts in C, C++, Java, C# and VB that I use. However, I am asking you people who post on this board to come up some true/false and multiple choice questions over the following topics:

I guess alot of us will tell you that you need to make sure not only are you teaching the common syntax of c, and the way to write it elegantly and effeciently, but to not teach things that are undefined.

IE: void main()

09-06-2002

Mister C

I have told my students to mark 0 for false and 1 for true on T/F questions in the past.

However, most of the time the students cant read the directions. So they mark T or F.

I make my student follow a list of coding standards. I don't let them use void main() or void main(void)
Mr. C.

09-06-2002

Shadow

Ok, I recommend taking a point off from the score if they didn't follow directions. Furthermore, add questions that use the implimentations you have taught, but have them be altered in such a way, so you may test if what you're teaching is really being absorbed.

Something that I find to be interesting in my Visaual Basic.NET course, is the fact that we have "go on your own" exercises. We have to do things, in a different fashion, that we already know how to do, on our own - with no help. Try constructing a question that is similar to this method. I really encourage giving them the "stuck in the middle of nowhere" test. After all that's what they will be doing in the field, working on their own.

Test them, to see if they'll be fired later on.

That's my suggestion.

09-06-2002

swoopy

Ok here's one:

Code:

int x = 7;

x ^= x;

x now contains
a. 7
b. 0
c. 8
d. 14

Answer: 0

09-06-2002

KingoftheWorld

I just wonder why don't you have a exam/test guildline manual which is designed for instructors only. This guildline usually come
with the textbook you use for the class.
Any way, im my opinion your test would be part of multiple choices, part of T/F and short answer or make small code segments for students to fill in or finding its missing syntax....

There is a good joking that doing Test or Exam with multiple choice is like playing lottery. Students can guess without knowing
what the test is talking about???

KingoftheWorld

09-06-2002

XSquared

Code:

long X = 23;
X = X << 3;

X now contains:
a) 32
b) 184 << answer
c) 92
d) 138

Code:

int a = 5;
int b = 26;

a ^= b;
b ^= a;
a ^= b;

A and B are now:
a) 31, 5
b) 5, 0
c) 5, 26
d) 26, 5 <<

09-06-2002

KingoftheWorld

A sample test question:

Code:

int a;
int b = 4;
int c = 7;

a = ++b+++c;

printf("a value is: %d", a);

what the output value of a will be?

KingoftheWorld

09-07-2002

Mister C

Shadow:

I do have them write short code segments and write programs inclass for the exams. And I usually have debugging problems as well. I will try the "go on your own" approach. As I have an idea for both.

King of the world

You are right most textbooks have exams and study guides and course outlines for the exams. I use them whenever I can. But I wanted the programmers/lurkers/students here at C Programming.com to just give me some of there test question ideas. You are right about multiple choice they can guess the right answer- without really knowing the material. But I like to have a variety of question types on my exams.

Thats why I am asking for all your input for just these question in particular for now.

I wouldn't try to trick the students that much though. Maybe
have a question with about 3 variables and 3 pointers and manipulate them then ask what is the value of
a, b, c, *aptr, *bptr, *cptr etc. Perhaps write some code
for a linked list and then let the students write code to merge
two of the linked list together into an array or a linked list.
The problem with true false is that the student has a 50%
chance of getting it write. Usually in these type of questions
there's a way to guess the answer.

09-07-2002

Mister C

Thanks for all your help in giving real good test questions. Also, thanks for all of the suggestions to make my testing and course better. I forgot to post the answer to my test question. the answer is D. radius = 48.

Continue to post questions as I will check back when I have time.

Mr. C.

09-07-2002

Salem

> I forgot to post the answer to my test question. the answer is D. radius = 48
I tried to warn them, but they didn't listen