31. What is a distinguishing characteristic of a compiled programming language?

Answer: C

Explanation:

A distinguishing characteristic of a compiled programming language is that it has code that is first converted to machine code, which can then only run on a particular type of machine.

Compiled programming languages convert the entire source code into machine code before execution, meaning the resulting program is specific to a particular hardware architecture.

A) It specifies the steps a program takes to complete a task or achieve a particular outcome

This statement describes a general characteristic of programming languages, but it does not specifically pertain to compiled languages. Both compiled and interpreted languages specify steps, so this option is not unique to compiled languages.

B) It requires a large number of variables and variable conversions because of the need to commit to a variable type throughout the life of the program

While some compiled languages do enforce strong typing, this characteristic is not universally applicable to all compiled languages. Furthermore, the definition does not capture the essence of what distinguishes compiled languages from others.

C) It has code that is first converted to machine code, which can then only run on a particular type of machine

This statement accurately describes a defining feature of compiled programming languages. The process of converting code into machine code before execution makes the program dependent on the specific architecture for which it was compiled.

D) It allows variables to change from the initial declared types during program execution

This statement describes a characteristic of dynamically typed languages, which is contrary to the nature of most compiled languages that often require type declarations. Thus, this option does not align with the defining traits of compiled languages.

Conclusion

The correct answer, C, precisely defines a key characteristic of compiled programming languages: the conversion of source code to machine code for specific hardware. Other options, while related to programming languages, either do not specify unique traits of compiled languages or describe features that apply to different types of languages.