Erstellt von Balikkoftesi
vor mehr als 9 Jahre
|
||
Frage | Antworten |
Name the first generation | Machine Code |
Name the second generation | Assembly Language |
Name the third generation | Imperative High Level |
Name the fourth generation | Declarative Programming |
Do each of these generations need a translator and if they do, what do they need? | Machine Code does not need a translator. Assembly language needs an assembler. High level languages need a compiler or an interpreter. |
What is an assembler? | Translates low level programs |
A programmer writes a program in a second generation programming language. What has to be done to this program before it can be executed? | It needs to be translated into machine code using an assembler. |
What is a compiler? | Translates the high level languages' whole source code into object code. |
What is an interpreter? | Translates high level languages line by line as it executes/runs the program. |
Give some information about the compiler. | Compiled programs run faster than interpreted programs because the compiler translates the entire program in one go and then executes it. The compiler is only needed during the translation stage. If there's an error report, the compiler will generate it after the translation of the entire program. |
Give some information about the interpreter. | The interpreter must be in memory to execute the program. The interpreter takes a statement then translates and executes it, and then takes another statement. If there's an error report, the interpreter will stop the translation to fix it. |
When do you use a compiler? | When the execution should run as fast as possible. When development is finished, To protect source code from end user interference. |
When do you use an interpreter? | During development time for testing/debugging/finding and correcting mistakes. To support platform independence. |
What are the disadvantages of programming in low level? | Very hard to read or learn. Time consuming to write. Very hard to debug/program. Easier to make mistakes. Machine dependent (not portable). |
What are the characteristics of high level languages? | One to many mapping of high level language statements to machine code statement. Easy to write and debug. Problem orientate. Data types; structured statements; local variables; parameters. |
What is meant by Imperative? | A computer that executes instructions in a programmer define sequence. e.g. Basic, Pascal, Java, C, C++ |
What is meant by Declarative? | It defines what is to be computed rather than how the computation is to be done. e.g. PROLOG, SQL |
Why are there so many third generation programming languages? | Languages used for specific problem type (different uses/purposes/tasks). Languages developed for specific hardware. Languages developed for visual applications. Competition between different companies who develop languages. Provide different function libraries. Access to specific data types. |
What is meant by high level language? | A language that uses English-like/more meaningful keywords. Has structures for assignment/iteration/selection. One instruction maps to several machine code instructions. |
What is the relationship between high level language with machine code? | 1 to many relationship. One statement in a high level language translates into several machine code instructions. |
What is the relationship between low level and machine code? | 1 to 1 relationship. One statement in a low level language translates into one machine code instruction. |
What is the contrast between high level language and low level language? | High level language: - processor independent - task oriented - one to many - translated by compiler - quicker/easier to write Low level language: - processor dependent - machine orientated - one to one - translated by assembler |
Möchten Sie mit GoConqr kostenlos Ihre eigenen Karteikarten erstellen? Mehr erfahren.