Flashcards
Generations of Programming Languages
Flashcards do conjunto (22)
- 1Name the first generationMachine Code
- 2Name the second generationAssembly Language
- 3Name the third generationImperative High Level
- 4Name the fourth generationDeclarative Programming
- 5Do 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. - 6What is an assembler?Translates low level programs
- 7A 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.
- 8What is a compiler?Translates the high level languages' whole source code into object code.
- 9What is an interpreter?Translates high level languages line by line as it executes/runs the program.
- 10Give 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. - 11Give 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. - 12When 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. - 13When do you use an interpreter?During development time for testing/debugging/finding and correcting mistakes.
To support platform independence. - 14What 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). - 15What 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. - 16What is meant by Imperative?A computer that executes instructions in a programmer define sequence.
e.g. Basic, Pascal, Java, C, C++ - 17What is meant by Declarative?It defines what is to be computed rather than how the computation is to be done.
e.g. PROLOG, SQL - 18Why 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. - 19What 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. - 20What 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. - 21What 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. - 22What 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
Informações
- Descrição
- Programming languages
- Criado por
- Balikkoftesi
- Visualizações
- 303
- Tags
- Avaliação
Mais sobre Programming Language Types and Generations