wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

RobotC Quiz

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.

What programming language does RobotC use?

a)

CC

b)

C++

c)

C#

d)

C

2.

What is the purpose of the line 'task main() followed by { }'?

a)

It's a comment used to define the main scope

b)

Sets up multitasking

c)

Sets up a program's main task only

d)

Sets up a program's main task and scope

3.

What is the purpose of the 'while(true)' statement?

a)

creates a finite loop to check for changes in your VEX components a number of times

b)

creates an infinite loop to check for mistakes in the program functions

c)

creates a finite loop to check for mistakes in the program functions

d)

creates an infinite loop to continually check for changes in your VEX components

4.

Which is NOT an acceptable example of an infinite loop?

a)

while(true)

b)

while(1==1)

c)

while(not false)

d)

while(55==55)

5.

What does 'vexRT' mean?

a)

VEX Remote Controller

b)

VEX Router

c)

VEX Remote Transmission

d)

VEX Routine Transmission

6.

What do '#Pragma config()' statements do?

a)

They show you da wae

b)

They go on pizza

c)

They configure settings which live in their own section of flash memory that is outside of your program code. They are available as soon as the microcontroller gets power, regardless where they are written in your code. This is important because sometimes they are needed before your program is executed.

d)

They touch-a your spaghet

7.

A pragma config command for VEX robot motors contain either 5 or 6 arguments. Which is NOT a one of these arguments?

a)

port type

b)

button or channel

c)

component type

d)

component orientation

e)

component name

8.

What does this line of code do?

a)

Assigns the vertical right joystick to the main motor

b)

Assigns the horizontal right joystick to the motor port named 'mainMotor'

c)

Assigns the vertical left joystick to the motor port named 'mainMotor'

d)

Assigns the horizontal left joystick to the main motor

9.

What does this line of code mean?

a)

if the VEX router has a value of 1

b)

while the button 6-up is pressed

c)

nothing because it's written incorrectly

d)

if the VEX remote transmission for button 6-up is true

10.

What do these lines of code do?

a)

motors for ports 2 and 5 half power in reverse, motors for ports 3 and 4 half power, only while button 6-d is pressed

b)

motors for ports 3 and 4 full power in reverse, motors for ports 2 and 5 full power, only if button 6-d is pressed

c)

motors for ports 2 and 5 half power in reverse, motors for ports 3 and 4 half power, only if button 6-d is pressed

d)

motors for ports 2 and 5 full power in reverse, motors for ports 3 and 4 full power, only when button 6-d is pressed