Difficulty: Easy
Correct Answer: High level language that is closer to human readable notation than to machine code
Explanation:
Introduction / Context:
In compiler design and programming fundamentals, the term source program refers to the original program written by the programmer. This source code is later translated into an object program or machine code by a compiler or assembler. Understanding which level of language source programs are usually written in is a basic concept that appears in many introductory exams.
Given Data / Assumptions:
Concept / Approach:
Source programs are usually written in high level languages. High level means that the language provides abstractions that are closer to human thinking and problem descriptions than to specific CPU instructions. Examples include arithmetic expressions, if statements, and for loops. Some source programs are written in assembly language, which is a low level symbolic language, but in many exam contexts the term source program is associated primarily with high level languages. Compilers translate these high level source programs into object programs that are closer to machine language.
Step-by-Step Solution:
Step 1: Recognize that the question asks about the level of language used for source programs, not about the output of the compiler.Step 2: Recall that high level languages are designed for human programmers and need to be compiled or interpreted.Step 3: Note that machine language and binary code are the targets of translation, not the usual form of the original source program.Step 4: Compare the options and select the one that describes high level, human readable languages.
Verification / Alternative check:
Standard textbooks define a compiler as a program that translates a source program written in a high level language into an equivalent object program in a lower level or machine language. This definition directly links the term source program with high level language. While there are assemblers that take assembly language as input, exam questions of this type generally expect the association with high level languages.
Why Other Options Are Wrong:
Option A refers to alpha numeric code for punched cards, which is historical and not the usual classification of language level.Option C suggests that the source program is pure symbolic machine language, which contradicts the idea that it must be translated before execution.Option D describes binary machine language, which is typically produced after translation and not used as the primary form in which programmers write large programs.
Common Pitfalls:
Students sometimes confuse the levels of language and think that any program before execution counts as a source program, even if it is already in machine code. It is better to reserve the term source program for the higher level, human written code that serves as the input to compilers and assemblers. Remembering this distinction helps in many compiler design questions.
Final Answer:
The correct answer is High level language that is closer to human readable notation than to machine code.
Discussion & Comments