Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
33 views3 pages

Ch9 Programming Languages Question Answer

The document contains exercises related to programming languages, including multiple-choice questions, fill-in-the-blanks, and short answer questions. It discusses various programming languages, their characteristics, and differences between low-level and high-level languages. Additionally, it covers the distinctions between compilers and interpreters, as well as the classification of programming languages into generations.

Uploaded by

Sadhika Kansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views3 pages

Ch9 Programming Languages Question Answer

The document contains exercises related to programming languages, including multiple-choice questions, fill-in-the-blanks, and short answer questions. It discusses various programming languages, their characteristics, and differences between low-level and high-level languages. Additionally, it covers the distinctions between compilers and interpreters, as well as the classification of programming languages into generations.

Uploaded by

Sadhika Kansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CHAPTER-9 PROGRAMMING LANGUAGES

EXERCISE

Choose the correct answer.

1. Which of the following languages is fastest in execution and takes least memory?
a. Assembly language
b. Machine language
c. C
d. Python

Ans: b

2. Which of the following languages encouraged common people to take up programming?


a. Machine language
b. Assembly language
c. High level language
d. SQL

Ans: c

3. Rajan wrote a high level program and the translator does not allow him to run the program unless all the
errors are removed. Which type of translator is this?
a. Interpreter
b. Compiler
c. Both a and b
d. Assembler

Ans: c

4. Computer understands only……


a. Machine language
b. Assembly language
c. High level language
d. None of these

Ans: a

5. Which software converts the entire source program into machine language before executing it?
a. Assembler
b. Compiler
c. Interpreter
d. None of these

Ans: b

Fill in the blanks.

1. A low-level language is a programming language that is machine dependent.


2. Least programming skills are needed in using fourth generation computer language.
3. SQL is an example of forth generation computer language.
4. An interpreter is also a separate program that converts the entire source program into machine language
before executing it. It translates and executes one statement at a time.
5. The fifth-generation languages, also known as natural languages are the programming languages that have
visual tools to develop a program

Answer the following questions.

1. How is a compiler different from an interpreter?

Ans:

Compiler A compiler is a software that converts the entire source program into machine language before executing
it. It converts the entire high-level language at once, It displays the errors for the whole program together.

Interpreter An interpreter is also a separate program that converts the entire source program into machine
language before executing it. It translates and executes one statement at a time. It displays the errors one line at
a time and it goes to the next line only after the error is corrected.

2. Compare the Third and Fourth generations of computer languages briefly.

Ans:

Third Generation Languages (3GL) In third generation languages (3GL), the programmer writes a series of English
like words that tell the computer what to accomplish and how to do. Many third generation languages also use
arithmetic operators such as * for multiplication and + for addition. Some early procedural 3GL are BASIC, PASCAL,
C and FORTRAN. Some other advanced object-oriented 3GL are C++, Java, and C#.

Fourth Generation Languages (4GL) The fourth generation languages also use English like statements. They specify
what the program should accomplish without explaining how. A 4GL is fast and requires less time and effort on
the part of the programmer. In fact, 4GLs are so easy to use and programmers with very little programming
background can develop programs. Examples of 4GL are SQL Perl, Python, etc.

3. Draw the diagram of classification of computer languages.


Ans:

4. Explain the difference between low level and high level languages.
Ans:
Low-Level Language (LLL) A low-level language is a programming language that is machine dependent. A
program written in machine dependent language runs only on one particular type of computer. There are two
categories low-level languages: Machine Language (1GL) Machine language is the only language understood
by the computer. It is also known as the first generation language (1GL). Machine language is very difficult for
programmers to use because it only consists of two digits, 0 and 1, called binary digits or bits. Where the bit
'0 represents the OFF state and the bit '1 represents the ON state. Assembly Language (2GL) Assembly
language is also known as second generation language (2GL). It is the language in which program codes are
written in the form of alphanumeric symbols called 'Mnemonics' instead of 0 and 1. In the assembly language,
a programmer writes abbreviations such as A for addition, C for compare, L for load, and M for multiply.
Because of this feature, it is also known as 'Symbolic Language'.
High-Level Language (HLL) High-level language is a programming language that enables a programmer to write
programs that are machine independent. This type of languages are considered as high-level languages
because they are closer to human languages and away from machine languages. The main advantages of high-
level languages over low-level languages is that they are easier to read, write and maintain.

5. What type of languages are known as natural languages. Give some examples.
Ans:
Natural Languages (5GL) The fifth-generation languages, also known as natural languages are the
programming languages that have visual tools to develop a program. Examples of fifth generation language
include Mercury, OPS5, and Prolog. Natural language is very easy to use. Natural languages are often
associated with expert system and artificial intelligence.

You might also like