Microsoft

GH-300 practice question 13

GitHub Copilot · free question 13 of 20

Question

What is the primary role of the '/optimize' slash command in Visual Studio?
  • A. Translates code into a more performant language.
  • B. Automatically formats the code according to the selected style guide.
  • C. Summarizes your documentation into more maintainable and readable formats.
  • D. Enhances the performance of the selected code by analyzing its runtime complexity. Correct

Explanation

In Copilot Chat in Visual Studio, /optimize analyzes and improves the running time of the selected code. It does not translate code to another language, apply formatting rules or rewrite documentation; documentation comments are handled by /doc.

Practice the whole free set

Answer all 20 free GH-300 questions with instant feedback, or unlock all 116 questions with Learn and Exam modes.