Easy INTRODUCTORY Comp. Sci (C language) questions...or other pop culture questions?

schizoid

Banned
May 27, 2000
2,207
1
0
I'm gonna play "Intro to CS Jeopardy" in the lab that I teach next week. I'm going to have categories like "Going Loopy" (about loops) and one called "The Pen is Mightier" (where the students have to come up to the white board, with the pen, and write me some code).

I need other questions and categories that a student midway though introductory C could answer. Any ideas? They've covered pointers, user-defined functions, loops, if statements and basic I/O. No arrays or structs yet.

Anyway, if you have any suggestions, I'd love to hear them. Also, I need some "bonus" questions about current pop culture that your average 18 year old would know.

Thanks!
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
have 'em code something that'll make the fibonacci sequence

and something that does exponentiation
 

schizoid

Banned
May 27, 2000
2,207
1
0
Originally posted by: gopunk
have 'em code something that'll make the fibonacci sequence

and something that does exponentiation

Derrr...it's like Jeopardy. So I need questions. Like, that can be answered quickly and verbally.
 

techfuzz

Diamond Member
Feb 11, 2001
3,107
0
76
How about Select/Case statements, variable scopes, or inheritence/polymorphism?

techfuzz
 

KEV1N

Platinum Member
Jan 15, 2000
2,932
1
0
Prints the ASCII value of a character, or, stars Adam Sandler as the boy who won't grow up.

What is typecasting?
 

PowerMacG5

Diamond Member
Apr 14, 2002
7,701
0
0
Originally posted by: gopunk
have 'em code something that'll make the fibonacci sequence

and something that does exponentiation
Fibonacci's sequence was simple to program before you learn recursion, then it becomes even simpler. :beer:
 

DeRusto

Golden Member
May 31, 2002
1,249
0
86
Originally posted by: KEV1N
Prints the ASCII value of a character, or, stars Adam Sandler as the boy who won't grow up.

What is typecasting?

hahaha, use this :p
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Originally posted by: techfuzz
How about Select/Case statements, variable scopes, or inheritence/polymorphism?
"Scope it Out!" cheesy enough for a category? :)

Scope is a good one, a tough one to hit them with is variable hiding

int foo ;

main ()
{
foo = 100 ;
bar() ;
}

void bar()
{
int foo ;

// what is the value of foo right here?

}


 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
:Q OMG a serious post from schitzoid.

*faints*

How about some kind of infinite loop detection? It would be yes/no for an answer, but you could make it harder as the questions progress.

For instance, is this an infinite loop?


// Set value1 to a random number, and value2 to a different random number.
const int range = 3
bool flag = true;
int value1;
int value2;

value1 = RAND(range); // get a random int in range

while (flag)
{
value2 = RAND(range);
if ( value1 != value2 )
{
flag = false;
}
}
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Originally posted by: Marauder911
Originally posted by: gopunk
have 'em code something that'll make the fibonacci sequence

and something that does exponentiation
Fibonacci's sequence was simple to program before you learn recursion, then it becomes even simpler. :beer:

i never said they were hard... my understanding is that this is just some game for a bunch of students halfway through intro to programming
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Originally posted by: schizoid
Originally posted by: gopunk
have 'em code something that'll make the fibonacci sequence

and something that does exponentiation

Derrr...it's like Jeopardy. So I need questions. Like, that can be answered quickly and verbally.

what happened to the pen is mightier section?