How do you create a multi-line comment in your program?

Prepare for the VEX Robotics STEM Advanced Exam with engaging flashcards and multiple choice questions, each offering hints and explanations. Master the concepts and boost your confidence.

To create a multi-line comment in your program, you use a specific syntax that allows you to span the comment across multiple lines without needing to repeat a comment symbol for each individual line. The correct format is to begin with '/' and end with '/'. This syntax indicates to the compiler that anything between these markers should be treated as a comment and not executed as code.

This method is particularly useful when you need to insert longer explanations or notes within your code without affecting the flow or readability. It allows developers to document their code thoroughly, making it easier for others (or themselves at a later time) to understand the purpose and function of different sections.

Other options involve incorrect or single-line comment formats, which would not accomplish the goal of making multi-line comments. These would either only comment a single line or use symbols inappropriate for creating multi-line comments, potentially leading to syntax errors or misunderstandings in what part of the code is intended to be commentary.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy