1. Home
  2. Explore
  3. Computer Science
  4. Introduction to Programming Languages

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to Programming Languages

  • 70Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Programming Foundations

What is the primary purpose of a programming language?

70 questions

  1. 1

    What is the primary purpose of a programming language?

    1. A

      To replace the hardware components of a computer

    2. B

      To store all files permanently on a computer

    3. C

      To communicate instructions to a computer or digital device

    4. D

      To increase the electrical voltage inside a computer

    Correct answer
    C

    To communicate instructions to a computer or digital device

    Explanation

    A programming language provides a way for humans to communicate instructions to computers and other digital devices.

  2. 2

    In the content, what is an algorithm?

    1. A

      A collection of words used to name computer hardware

    2. B

      A sequence of rules for performing a specific task

    3. C

      A translator that converts machine code into English

    4. D

      A physical component that processes electrical signals

    Correct answer
    B

    A sequence of rules for performing a specific task

    Explanation

    An algorithm is described as a set of rules or a sequence of steps used to perform a specific task.

  3. 3

    Why are rules necessary in a programming language?

    1. A

      They allow computers to operate without receiving any instructions

    2. B

      They determine which electrical outlet a computer must use

    3. C

      They automatically convert every program into a database

    4. D

      They specify how instructions must be written for communication with a computer

    Correct answer
    D

    They specify how instructions must be written for communication with a computer

    Explanation

    Programming languages contain rules and regulations that must be followed to communicate instructions to a computer system.

  4. 4

    What does syntax describe in a programming language?

    1. A

      The electrical signals generated by a computer processor

    2. B

      The hardware resources consumed while a program runs

    3. C

      The structure and form in which instructions are expressed

    4. D

      The meaning produced by a correctly structured instruction

    Correct answer
    C

    The structure and form in which instructions are expressed

    Explanation

    Syntax refers to the structure or form used to write commands and other elements of a programming language.

  5. 5

    What does semantics describe in a programming language?

    1. A

      The meaning generated by a statement or command

    2. B

      The physical location where a program is stored

    3. C

      The voltage level used to represent a binary digit

    4. D

      The punctuation and arrangement required by the language

    Correct answer
    A

    The meaning generated by a statement or command

    Explanation

    Semantics refers to the meaning carried or generated by a syntactically constructed statement.

  6. 6

    Which statement best defines a programming language?

    1. A

      It is a file format used only for saving photographs and videos

    2. B

      It is a collection of electrical components for building a computing device

    3. C

      It is a vocabulary and set of grammatical rules for instructing a computing device

    4. D

      It is a translation program that converts every language into English

    Correct answer
    C

    It is a vocabulary and set of grammatical rules for instructing a computing device

    Explanation

    A programming language consists of vocabulary and grammatical rules used to instruct a computer or computing device to perform tasks.

  7. 7

    What is unique about each programming language according to the definition provided?

    1. A

      It uses a different type of computer processor for every program

    2. B

      It has its own keywords and syntax for organizing instructions

    3. C

      It can operate only on one specific brand of computer

    4. D

      It must represent every instruction with a different voltage

    Correct answer
    B

    It has its own keywords and syntax for organizing instructions

    Explanation

    Each programming language has a unique set of keywords and special syntax for organizing program instructions.

  8. 8

    Why can computers process combinations of 000 and 111 as instructions?

    1. A

      Computers use 000 and 111 because those symbols represent programming keywords

    2. B

      Computers are electronic devices that respond to high and low electrical signals

    3. C

      Computers naturally understand spoken numbers better than written commands

    4. D

      Computers convert all English sentences directly into binary without translation

    Correct answer
    B

    Computers are electronic devices that respond to high and low electrical signals

    Explanation

    Computers understand electrical signals. High voltage is represented as 111, and low voltage is represented as 000.

  9. 9

    What does a high signal represent in the computer's binary system?

    1. A

      A low voltage represented by 111

    2. B

      A low voltage represented by 000

    3. C

      A high voltage represented by 000

    4. D

      A high voltage represented by 111

    Correct answer
    D

    A high voltage represented by 111

    Explanation

    A high signal refers to high voltage, which computers represent as 111.

  10. 10

    What does a low signal represent in the computer's binary system?

    1. A

      A low voltage represented by 000

    2. B

      A high voltage represented by 111

    3. C

      A high voltage represented by 000

    4. D

      A low voltage represented by 111

    Correct answer
    A

    A low voltage represented by 000

    Explanation

    A low signal refers to low voltage, which computers represent as 000.

  11. 11

    What is machine language?

    1. A

      A language designed to describe database tables to human users

    2. B

      A language formed from combinations of binary digits that the computer directly understands

    3. C

      A language formed from English phrases that requires no translation

    4. D

      A language made only of symbolic abbreviations for programming commands

    Correct answer
    B

    A language formed from combinations of binary digits that the computer directly understands

    Explanation

    Machine language consists of combinations of 000 and 111, or binary digits, and is directly understood by the computer.

  12. 12

    Why do machine-language programs generally execute quickly?

    1. A

      Machine language uses common English phrases instead of binary digits

    2. B

      The computer understands machine language directly

    3. C

      Machine language automatically divides programs into smaller modules

    4. D

      Machine language stores all program data in large collections

    Correct answer
    B

    The computer understands machine language directly

    Explanation

    Because machine language is directly understood by the computer, it does not require translation before execution.

  13. 13

    Which computers were programmed using first-generation machine-level languages?

    1. A

      Vacuum-tube computers and early transistor computers

    2. B

      Database servers and graphical workstation computers

    3. C

      Artificial-intelligence systems and web servers

    4. D

      Modern cloud computers and smartphone computers

    Correct answer
    A

    Vacuum-tube computers and early transistor computers

    Explanation

    First-generation machine-level languages were used with vacuum-tube computers and early versions of transistor computers.

  14. 14

    What was a major reason machine-language programs became lengthy?

    1. A

      Every instruction had to be represented using binary digits

    2. B

      Every command had to be translated once for every user

    3. C

      Every program had to contain a separate database for each variable

    4. D

      Every instruction had to be written as a complete English sentence

    Correct answer
    A

    Every instruction had to be represented using binary digits

    Explanation

    Representing each part of a task with binary digits made even simple machine-language programs very lengthy.

  15. 15

    Why was machine language difficult for many programmers to understand?

    1. A

      It could be written only after using a high-level compiler

    2. B

      It required programmers to memorize many English phrases

    3. C

      Binary coding is complex and difficult to interpret

    4. D

      It required programs to be divided into structured modules

    Correct answer
    C

    Binary coding is complex and difficult to interpret

    Explanation

    Machine language uses binary coding, which is difficult to read and understand, making it complex for programmers.

  16. 16

    Why were machine-language programs not portable?

    1. A

      Machine-language programs could run only when connected to a database

    2. B

      Machine-language programs required English syntax that varied by user

    3. C

      Different machines used identical hardware but different screen sizes

    4. D

      Different machines used different coding and hardware characteristics

    Correct answer
    D

    Different machines used different coding and hardware characteristics

    Explanation

    Machine-language code depended on the coding and hardware of a particular machine, so it could not generally run on another machine.

  17. 17

    Which consequence followed from the length and complexity of machine-language code?

    1. A

      Writing machine-language programs was very time-consuming

    2. B

      Writing machine-language programs required fewer instructions than assembly

    3. C

      Writing machine-language programs became independent of hardware

    4. D

      Writing machine-language programs required no testing

    Correct answer
    A

    Writing machine-language programs was very time-consuming

    Explanation

    The lengthy and difficult nature of binary coding made machine-language programming highly time-consuming.

  18. 18

    What motivated the development of assembly language?

    1. A

      Programmers wanted a language easier to write than machine language

    2. B

      Programmers wanted to eliminate all programming rules and syntax

    3. C

      Programmers wanted programs to focus only on database operations

    4. D

      Programmers wanted computers to stop using electrical signals

    Correct answer
    A

    Programmers wanted a language easier to write than machine language

    Explanation

    Assembly language was developed to provide a more manageable alternative to difficult binary machine code.

  19. 19

    What are mnemonics in assembly language?

    1. A

      Symbolic representations used for codes or instructions

    2. B

      Electrical signals used to represent high voltage

    3. C

      Large collections of information processed by a database

    4. D

      Error messages produced after an entire program is scanned

    Correct answer
    A

    Symbolic representations used for codes or instructions

    Explanation

    Assembly language uses mnemonics, which are symbolic representations for various machine-related codes.

  20. 20

    How did mnemonics improve programming compared with binary machine code?

    1. A

      They eliminated the need to convert code into machine language

    2. B

      They made programs automatically portable across all machines

    3. C

      They allowed computers to execute code without any processor

    4. D

      They made code easier to write and understand

    Correct answer
    D

    They made code easier to write and understand

    Explanation

    Symbolic mnemonics made assembly code easier for programmers to write and understand than binary code.

  21. 21

    Why was assembly language considered less error-prone than machine language?

    1. A

      Its symbolic representation reduced the difficulty of writing instructions

    2. B

      It allowed the computer to correct all logical errors automatically

    3. C

      It removed the need for programmers to follow syntax rules

    4. D

      It used more binary digits to represent each instruction

    Correct answer
    A

    Its symbolic representation reduced the difficulty of writing instructions

    Explanation

    Because assembly language was easier to write and understand, programmers were less likely to make errors while coding.

  22. 22

    What is an assembler?

    1. A

      A program that converts database records into graphical interfaces

    2. B

      A program that allows computers to solve problems without algorithms

    3. C

      A program that translates machine language into assembly language during execution

    4. D

      A program that translates assembly language into machine-level language

    Correct answer
    D

    A program that translates assembly language into machine-level language

    Explanation

    An assembler converts source code written in assembly language into machine-level object code.

  23. 23

    Why does assembly language require an assembler?

    1. A

      Assembly language contains no symbolic representations

    2. B

      The computer cannot directly understand binary machine language

    3. C

      The computer cannot directly understand assembly language

    4. D

      Assembly language is already written entirely as processor instructions

    Correct answer
    C

    The computer cannot directly understand assembly language

    Explanation

    Computers directly understand machine language, not assembly language, so an assembler is needed to perform the conversion.

  24. 24

    Compared with machine language, what was one execution disadvantage of assembly language?

    1. A

      It was executed directly without involving the processor

    2. B

      It required programmers to rewrite all commands in binary twice

    3. C

      It could not represent instructions using symbolic forms

    4. D

      It required additional time for translation into machine code

    Correct answer
    D

    It required additional time for translation into machine code

    Explanation

    Assembly code must first be translated by an assembler, adding time before the program can execute.

  25. 25

    Which characteristic did machine language and assembly language share?

    1. A

      Both were machine-dependent and generally not portable

    2. B

      Both allowed one program to run on every computer unchanged

    3. C

      Both used common English phrases and were machine-independent

    4. D

      Both focused on telling the computer what to do rather than how

    Correct answer
    A

    Both were machine-dependent and generally not portable

    Explanation

    Both first- and second-generation languages depended on the hardware and coding of particular machines.

  26. 26

    What problem led to the development of third-generation languages?

    1. A

      The need to make programs depend more closely on individual hardware

    2. B

      The need to prevent programmers from using English words in code

    3. C

      The need for programs to run on different computers with little modification

    4. D

      The need to represent all instructions with longer binary sequences

    Correct answer
    C

    The need for programs to run on different computers with little modification

    Explanation

    Third-generation languages were developed to reduce machine dependency and improve portability across computers.

  27. 27

    When was the third generation of programming languages developed?

    1. A

      Between 1959 and 1965

    2. B

      In 1965

    3. C

      In the early 1990s

    4. D

      Between 1940 and 1959

    Correct answer
    B

    In 1965

    Explanation

    The content states that the third generation was developed in 1965 and continues to be used.

  28. 28

    What does machine independence mean for a third-generation program?

    1. A

      It can run without being translated into machine language

    2. B

      It can run on another computer without modification or with little modification

    3. C

      It can execute without depending on an operating system or processor

    4. D

      It can communicate with hardware only through binary digits

    Correct answer
    B

    It can run on another computer without modification or with little modification

    Explanation

    Machine-independent programs are portable and can run on another computer unchanged or with only minor changes.

  29. 29

    How did third-generation languages make programming easier to learn?

    1. A

      They used English words for variables, structures, and commands

    2. B

      They required programmers to write every instruction in binary

    3. C

      They removed the need to organize instructions into meaningful structures

    4. D

      They replaced all commands with electrical voltage levels

    Correct answer
    A

    They used English words for variables, structures, and commands

    Explanation

    Third-generation languages used English words to represent variables, programming structures, and commands.

  30. 30

    What is structured programming?

    1. A

      Allowing a computer to select any solution without programmer input

    2. B

      Writing every program as one uninterrupted sequence of binary digits

    3. C

      Dividing a large program into smaller sections that perform specific tasks

    4. D

      Converting every source statement into machine code individually

    Correct answer
    C

    Dividing a large program into smaller sections that perform specific tasks

    Explanation

    Structured programming divides a large program into smaller sections, with each section handling a specific task.

  31. 31

    Why were third-generation languages called programmer-friendly languages?

    1. A

      They allowed programmers to avoid using any language translator

    2. B

      They automatically solved any problem without a programmer's algorithm

    3. C

      They interacted directly with hardware without requiring machine code

    4. D

      They were easier to write and learn than lower-level languages

    Correct answer
    D

    They were easier to write and learn than lower-level languages

    Explanation

    Their use of English words, portability, and structured programming made third-generation languages more programmer-friendly.

  32. 32

    Why are third-generation languages also called high-level languages?

    1. A

      They execute directly on hardware without translation

    2. B

      They use English words to express programming instructions

    3. C

      They use only high-voltage electrical signals

    4. D

      They are designed exclusively for high-capacity computers

    Correct answer
    B

    They use English words to express programming instructions

    Explanation

    Third-generation languages are called high-level languages because they use English-like words rather than binary or symbolic machine representations.

  33. 33

    Which group contains examples of early third-generation programming languages?

    1. A

      OPS5, MERCURY, and Python

    2. B

      SQL, NATURAL, and LANSA

    3. C

      FORTRAN, ALGOL, and COBOL

    4. D

      Assembly, machine language, and Java

    Correct answer
    C

    FORTRAN, ALGOL, and COBOL

    Explanation

    The first introduced third-generation languages listed are FORTRAN, ALGOL, and COBOL.

  34. 34

    What is a disadvantage of third-generation languages?

    1. A

      They cannot use English words for variables or commands

    2. B

      They can be understood directly by hardware without any conversion

    3. C

      They are limited to programming only one specific computer

    4. D

      They require translation into machine language before execution

    Correct answer
    D

    They require translation into machine language before execution

    Explanation

    Because computers directly understand only machine language, third-generation source code must be translated before execution, which takes additional time.

  35. 35

    Which set contains modern third-generation programming languages mentioned in the content?

    1. A

      Machine language, assembly language, Python, and Ruby

    2. B

      NATURAL, M-POWER, LANSA, and OPS5

    3. C

      C, C++, C#, and Java

    4. D

      FORTRAN, ALGOL, COBOL, and SQL

    Correct answer
    C

    C, C++, C#, and Java

    Explanation

    The content identifies C, C++, C#, and Java as modern examples of third-generation languages.

  36. 36

    How do fourth-generation languages differ from third-generation languages in their use of English?

    1. A

      They use no English because they rely exclusively on binary digits

    2. B

      They use only symbolic mnemonics instead of words and phrases

    3. C

      They use English only for comments while all commands remain machine code

    4. D

      They use broader English-like syntax and phrases rather than a limited set of English words

    Correct answer
    D

    They use broader English-like syntax and phrases rather than a limited set of English words

    Explanation

    Fourth-generation languages use common English-like syntax and phrases, whereas third-generation languages use a more limited set of English words.

  37. 37

    What does it mean that fourth-generation languages allow multiple operations with one command?

    1. A

      A single command can execute only one hardware-level instruction

    2. B

      Each command must be repeated once for every binary digit

    3. C

      A single programmer-entered command can perform several common operations

    4. D

      Every operation must be translated manually by the programmer

    Correct answer
    C

    A single programmer-entered command can perform several common operations

    Explanation

    Fourth-generation languages can carry out multiple common operations through a single command entered by the programmer.

  38. 38

    What type of information can fourth-generation languages process effectively?

    1. A

      Only individual processor registers

    2. B

      Only isolated binary digits

    3. C

      Only small hardware-control instructions

    4. D

      Large collections of information

    Correct answer
    D

    Large collections of information

    Explanation

    Fourth-generation languages are designed to operate on large collections of information rather than focusing only on individual bits and bytes.

  39. 39

    Which activity is specifically associated with the use of fourth-generation languages?

    1. A

      Writing raw binary instructions

    2. B

      Database management

    3. C

      Constructing transistor hardware manually

    4. D

      Designing vacuum-tube circuits

    Correct answer
    B

    Database management

    Explanation

    Fourth-generation languages are used for database management, along with report generation, mathematical optimization, GUI development, and web development.

  40. 40

    Why are fourth-generation languages described as nonprocedural?

    1. A

      They execute only procedures written directly in machine language

    2. B

      They require programmers to specify every implementation step in detail

    3. C

      They specify what task should be done while leaving the method to the language

    4. D

      They prevent programmers from entering tasks or conditions

    Correct answer
    C

    They specify what task should be done while leaving the method to the language

    Explanation

    In a nonprocedural language, the programmer states what task is needed, while the language determines how to carry it out.

  41. 41

    What is a limitation of fourth-generation languages regarding programmer control?

    1. A

      The programmer must write separate code for every computer model

    2. B

      The programmer must control every electrical signal manually

    3. C

      The programmer has limited control over program execution and resources

    4. D

      The programmer can control hardware more directly than with machine language

    Correct answer
    C

    The programmer has limited control over program execution and resources

    Explanation

    Because the language carries out much of the task automatically, the programmer has limited control over the program and its resources.

  42. 42

    What hardware resources may fourth-generation language packages require because they are lengthy?

    1. A

      Only a specialized keyboard and no processor resources

    2. B

      More disk space and greater memory capacity

    3. C

      Less disk space and smaller memory capacity

    4. D

      Only additional electrical voltage and no storage space

    Correct answer
    B

    More disk space and greater memory capacity

    Explanation

    The content states that fourth-generation language packages can be lengthy and therefore require more disk space and large memory capacity.

  43. 43

    Which group contains examples of fourth-generation languages?

    1. A

      FORTRAN, ALGOL, COBOL, and Java

    2. B

      SQL, NATURAL, M-POWER, and LANSA

    3. C

      OPS5, MERCURY, Python, and Ruby

    4. D

      Machine language, assembly language, C, and C++

    Correct answer
    B

    SQL, NATURAL, M-POWER, and LANSA

    Explanation

    SQL, NATURAL, M-POWER, and LANSA are listed as commonly used fourth-generation languages.

  44. 44

    What is the central goal of fifth-generation programming languages?

    1. A

      To make programmers write longer binary sequences for each task

    2. B

      To make programs depend more strongly on individual computer hardware

    3. C

      To require programmers to specify every implementation step

    4. D

      To enable computers to solve problems with minimal or no programmer assistance

    Correct answer
    D

    To enable computers to solve problems with minimal or no programmer assistance

    Explanation

    Fifth-generation languages aim to let computers solve given problems without the programmer directly implementing the routine or algorithm.

  45. 45

    Where and when was the concept of fifth-generation programming languages first introduced?

    1. A

      In Europe during the late 1950s

    2. B

      In Japan during the 1960s

    3. C

      In Japan in the early 1990s

    4. D

      In the United States during the 1940s

    Correct answer
    C

    In Japan in the early 1990s

    Explanation

    The concept was first introduced in Japan in the early 1990s and is described as a future direction of programming.

  46. 46

    What does a user primarily provide when using a fifth-generation language?

    1. A

      The problem to solve and the conditions that must be met

    2. B

      The hardware design and voltage sequence for the processor

    3. C

      The complete algorithm and every implementation routine

    4. D

      The binary representation of every required instruction

    Correct answer
    A

    The problem to solve and the conditions that must be met

    Explanation

    The user focuses on the problem and required conditions rather than specifying how the solution should be implemented.

  47. 47

    In which area are fifth-generation languages mainly used?

    1. A

      Basic transistor assembly

    2. B

      Vacuum-tube circuit manufacturing

    3. C

      Artificial-intelligence research

    4. D

      Manual binary data entry

    Correct answer
    C

    Artificial-intelligence research

    Explanation

    Fifth-generation languages are used mainly in the development of artificial-intelligence research.

  48. 48

    Why can the development and maintenance of fifth-generation languages be complicated?

    1. A

      They eliminate automation and require manual hardware control

    2. B

      Their automated systems require more resources to work efficiently

    3. C

      They cannot represent problems using conditions or goals

    4. D

      They require every task to be written only in binary digits

    Correct answer
    B

    Their automated systems require more resources to work efficiently

    Explanation

    The use of automated systems makes fifth-generation languages more complicated to develop and maintain and increases their resource requirements.

  49. 49

    Which pair contains examples of fifth-generation programming languages?

    1. A

      C and C++

    2. B

      SQL and NATURAL

    3. C

      OPS5 and MERCURY

    4. D

      FORTRAN and COBOL

    Correct answer
    C

    OPS5 and MERCURY

    Explanation

    OPS5 and MERCURY are identified as examples of fifth-generation programming languages.

  50. 50

    Which generations are classified as low-level languages?

    1. A

      The third and fourth generations

    2. B

      The second and third generations

    3. C

      The first and second generations

    4. D

      The fourth and fifth generations

    Correct answer
    C

    The first and second generations

    Explanation

    Machine language and assembly language, which are the first and second generations, are classified as low-level languages.

  51. 51

    Which generations are collectively classified as high-level languages?

    1. A

      The first, second, and fourth generations

    2. B

      Only the fourth and fifth generations

    3. C

      The first, second, and third generations

    4. D

      The third, fourth, and fifth generations

    Correct answer
    D

    The third, fourth, and fifth generations

    Explanation

    The third, fourth, and fifth generations are collectively considered high-level languages.

  52. 52

    Which comparison between low-level and high-level languages is correct?

    1. A

      Both low-level and high-level languages are equally machine-dependent

    2. B

      Low-level languages are machine-dependent, whereas high-level languages are machine-independent

    3. C

      Low-level languages are machine-independent, whereas high-level languages are machine-dependent

    4. D

      Both low-level and high-level languages are always machine-independent

    Correct answer
    B

    Low-level languages are machine-dependent, whereas high-level languages are machine-independent

    Explanation

    The first two generations are machine-dependent, while the third through fifth generations are described as machine-independent.

  53. 53

    Which representation is associated with low-level languages?

    1. A

      Common English phrases and database expressions

    2. B

      Only graphical icons and natural-language questions

    3. C

      Large collections of records and report templates

    4. D

      Binary digits or symbolic representations called mnemonics

    Correct answer
    D

    Binary digits or symbolic representations called mnemonics

    Explanation

    Low-level languages use binary digits or symbolic representations known as mnemonics.

  54. 54

    Which representation is associated with high-level languages?

    1. A

      English words and phrases

    2. B

      Only high- and low-voltage signals

    3. C

      Only processor-specific binary patterns

    4. D

      Only symbolic mnemonics for hardware operations

    Correct answer
    A

    English words and phrases

    Explanation

    High-level languages use English words and phrases to express instructions.

  55. 55

    Which statement correctly compares portability in low-level and high-level languages?

    1. A

      Low-level programs are portable, while high-level programs must target one machine

    2. B

      Neither type can run on another computer under any circumstances

    3. C

      Low-level programs are generally not portable, while high-level programs are more portable

    4. D

      Both types are equally portable because all computers use identical hardware

    Correct answer
    C

    Low-level programs are generally not portable, while high-level programs are more portable

    Explanation

    Low-level programs depend on machine-specific hardware, while high-level programs can generally run on other computers with little or no modification.

  56. 56

    How do low-level and high-level languages differ in hardware interaction?

    1. A

      Both types interact with hardware directly in exactly the same way

    2. B

      Neither type can communicate with hardware after translation

    3. C

      High-level programs interact directly with hardware, unlike low-level programs

    4. D

      Low-level programs can interact directly with hardware, unlike high-level programs

    Correct answer
    D

    Low-level programs can interact directly with hardware, unlike high-level programs

    Explanation

    Low-level programs can directly interact with system hardware, whereas high-level programs cannot do so directly.

  57. 57

    Which statement best compares the difficulty of low-level and high-level languages?

    1. A

      Low-level languages are harder to learn and implement than high-level languages

    2. B

      High-level languages are harder to learn because they use English phrases

    3. C

      Both types have the same learning difficulty because they use identical syntax

    4. D

      Low-level languages are easier because they require no understanding of hardware

    Correct answer
    A

    Low-level languages are harder to learn and implement than high-level languages

    Explanation

    Low-level languages are difficult to learn and implement, while high-level languages are easier for programmers to learn and use.

  58. 58

    What is a language translator?

    1. A

      A program that converts computer output into spoken English

    2. B

      A program that converts source code into machine code for computer execution

    3. C

      A program that stores source code without changing or executing it

    4. D

      A program that converts machine code into electrical hardware components

    Correct answer
    B

    A program that converts source code into machine code for computer execution

    Explanation

    Language translators, also called translators or language processors, convert source code written in another language into machine or object code.

  59. 59

    Why were language translators developed?

    1. A

      Computers needed programs that could operate without source code

    2. B

      Programmers wanted to make binary code more difficult to understand

    3. C

      Programmers needed easier languages whose code computers could still execute

    4. D

      Computers needed to stop using machine language altogether

    Correct answer
    C

    Programmers needed easier languages whose code computers could still execute

    Explanation

    Because writing long and complex programs directly in binary was impractical, easier languages were developed and translators converted them into machine code.

  60. 60

    Which three types of language translators are identified?

    1. A

      Compiler, algorithm, and syntax analyzer

    2. B

      Interpreter, mnemonic, and semantic processor

    3. C

      Assembler, compiler, and interpreter

    4. D

      Assembler, database manager, and graphical editor

    Correct answer
    C

    Assembler, compiler, and interpreter

    Explanation

    The three main types of language translators are assemblers, compilers, and interpreters.

  61. 61

    What does an assembler convert?

    1. A

      Machine-language object code into English-language instructions

    2. B

      High-level source code into assembly-language source code

    3. C

      Assembly-language source code into machine-language object code

    4. D

      Database commands into graphical user-interface designs

    Correct answer
    C

    Assembly-language source code into machine-language object code

    Explanation

    An assembler translates assembly-language source code into machine-language object code that the processor can execute.

  62. 62

    What is the result of assembly code after it is processed by an assembler?

    1. A

      English-language instructions that require another assembler

    2. B

      Machine-language object code that can be directly executed by the processor

    3. C

      High-level source code that cannot interact with the processor

    4. D

      A database report that must be interpreted by a web browser

    Correct answer
    B

    Machine-language object code that can be directly executed by the processor

    Explanation

    The assembler produces machine-language object code, which can be directly executed by the processor.

  63. 63

    What does a compiler generally translate?

    1. A

      Database records into binary hardware signals without source code

    2. B

      Machine code into assembly mnemonics during execution

    3. C

      High-level source code into machine code

    4. D

      Assembly code into English phrases for programmers

    Correct answer
    C

    High-level source code into machine code

    Explanation

    A compiler is a language translator that generally converts high-level source code into machine code.

  64. 64

    How does a compiler process a program?

    1. A

      It translates only the first statement and then permanently stops

    2. B

      It scans and translates the entire program as a whole

    3. C

      It translates each statement only after the processor executes it

    4. D

      It converts the program into English before checking its syntax

    Correct answer
    B

    It scans and translates the entire program as a whole

    Explanation

    A compiler scans the entire program and translates it into machine code as a whole.

  65. 65

    Why does a compiled program generally take less time to execute than an interpreted program?

    1. A

      The compiler translates each statement repeatedly during execution

    2. B

      The compiler translates the entire program before execution

    3. C

      The compiler allows the processor to execute English phrases directly

    4. D

      The compiler avoids producing any machine code

    Correct answer
    B

    The compiler translates the entire program before execution

    Explanation

    Because compilation translates the whole program before execution, the program does not need statement-by-statement translation while running.

  66. 66

    When does a compiler generally generate error messages?

    1. A

      Immediately after reading the first statement

    2. B

      Before receiving any source code from the programmer

    3. C

      Only after the processor has executed every statement

    4. D

      After scanning the entire program

    Correct answer
    D

    After scanning the entire program

    Explanation

    The content states that a compiler generates error messages after scanning the whole program.

  67. 67

    How does an interpreter translate a program?

    1. A

      It translates machine code back into a high-level language

    2. B

      It translates the entire program into object code before reading statements

    3. C

      It translates only comments and ignores executable instructions

    4. D

      It translates the program statement by statement

    Correct answer
    D

    It translates the program statement by statement

    Explanation

    An interpreter converts source code into machine code one statement at a time.

  68. 68

    What happens when an interpreter encounters an error?

    1. A

      It stops execution when it reaches the first error

    2. B

      It continues execution and reports all errors only after completion

    3. C

      It automatically converts the erroneous statement into assembly code

    4. D

      It ignores the error and executes the remaining statements unchanged

    Correct answer
    A

    It stops execution when it reaches the first error

    Explanation

    An interpreter translates until the first error is encountered and then stops execution.

  69. 69

    Which languages are identified as using compilers?

    1. A

      SQL and NATURAL

    2. B

      C and C++

    3. C

      Python and Ruby

    4. D

      OPS5 and MERCURY

    Correct answer
    B

    C and C++

    Explanation

    The content states that C and C++ use compilers.

  70. 70

    Which languages are identified as using interpreters?

    1. A

      Python and Ruby

    2. B

      FORTRAN and COBOL

    3. C

      C and C++

    4. D

      SQL and LANSA

    Correct answer
    A

    Python and Ruby

    Explanation

    The content states that Python and Ruby use interpreters.

Question 1 of 70
Question 1 of 70

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent