NEW
Font size
WorksheetsRobotC Quiz
Total questions: 10
Worksheet time: 7mins
What programming language does RobotC use?
CC
C++
C#
C
What is the purpose of the line 'task main() followed by { }'?
It's a comment used to define the main scope
Sets up multitasking
Sets up a program's main task only
Sets up a program's main task and scope
What is the purpose of the 'while(true)' statement?
creates a finite loop to check for changes in your VEX components a number of times
creates an infinite loop to check for mistakes in the program functions
creates a finite loop to check for mistakes in the program functions
creates an infinite loop to continually check for changes in your VEX components
Which is NOT an acceptable example of an infinite loop?
while(true)
while(1==1)
while(not false)
while(55==55)
What does 'vexRT' mean?
VEX Remote Controller
VEX Router
VEX Remote Transmission
VEX Routine Transmission
What do '#Pragma config()' statements do?
They show you da wae
They go on pizza
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.
They touch-a your spaghet
A pragma config command for VEX robot motors contain either 5 or 6 arguments. Which is NOT a one of these arguments?
port type
button or channel
component type
component orientation
component name
What does this line of code do?
Assigns the vertical right joystick to the main motor
Assigns the horizontal right joystick to the motor port named 'mainMotor'
Assigns the vertical left joystick to the motor port named 'mainMotor'
Assigns the horizontal left joystick to the main motor
What does this line of code mean?
if the VEX router has a value of 1
while the button 6-up is pressed
nothing because it's written incorrectly
if the VEX remote transmission for button 6-up is true
What do these lines of code do?
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
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
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
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
