26. Which type of language is C++?
Answer: A
C++ is a compiled language.
C++ is classified as a compiled language, which means that its source code is translated into machine code by a compiler before it is executed. This process allows C++ programs to run efficiently on various platforms.
A) Compiled
This option is correct because C++ uses a compiler to convert the source code into machine language, which is then executed by the computer. This compilation process enhances performance and allows for optimization, making C++ suitable for system-level programming.
B) Interpreted
This option is incorrect as interpreted languages are executed line-by-line by an interpreter at runtime, without a separate compilation step. C++ does not fit this definition because it relies on a compilation process to produce machine code.
C) Machine
This option is incorrect because machine language refers to the binary code that a computer's CPU can directly execute. C++ is a high-level programming language that is compiled into machine language, rather than being machine language itself.
D) Assembly
This option is also incorrect. Assembly language is a low-level programming language that is closely related to machine language and is specific to a particular computer architecture. C++ is a higher-level language that abstracts away many of the details found in assembly language.
Conclusion
C++ is definitively a compiled language, which distinguishes it from interpreted and low-level languages. The other options fail to accurately describe C++'s nature and functionality, reinforcing its classification as a compiled language that enhances performance through prior translation to machine code.