0% found this document useful (0 votes)
16 views4 pages

Course Note 2

The document outlines the generations of programming languages, from low-level machine languages to high-level languages like C and Visual Basic, highlighting their characteristics and uses. It explains the relationship between high-level languages and computer architecture, emphasizing the role of compilers and interpreters in translating these languages for execution. Additionally, it provides examples of popular high-level languages, including Pascal, C, C++, BASIC, Visual Basic, and Java, along with brief descriptions and code snippets for each.

Uploaded by

jalalademola
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)
16 views4 pages

Course Note 2

The document outlines the generations of programming languages, from low-level machine languages to high-level languages like C and Visual Basic, highlighting their characteristics and uses. It explains the relationship between high-level languages and computer architecture, emphasizing the role of compilers and interpreters in translating these languages for execution. Additionally, it provides examples of popular high-level languages, including Pascal, C, C++, BASIC, Visual Basic, and Java, along with brief descriptions and code snippets for each.

Uploaded by

jalalademola
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

3.

3 GENERATIONS OF PROGRAMMING LANGUAGE

The first generation languages are low-level languages that are machine language.
The second generation languages are also low-level languages that generally consist of assembly
languages.
The third generation languages are high-level languages such as C.
The fourth generation languages are languages that consist of statements similar to statements in
a human language.
Fourth generation languages are commonly used in database programming and scripts.
The fifth generation languages are programming languages that contain visual tools to help develop a
program. A good example of a fifth generation language is Visual Basic

THE RELATIONSHIP BETWEEN HIGH-LEVEL LANGUAGES AND COMPUTER


ARCHITECTURE

The relationship between high-level languages and computer architecture is that high-level
languages are translated into low-level languages by a compiler or interpreter, which then
executes the machine-level code. This translation process allows high-level languages to be
executed on a computer, even if the computer's hardware does not directly support high-level
programming.

Some reasons why high-level programming has not been more widely adopted in computer
architecture include the complexity of compilers and interpreters for high-level languages, as
well as the potential performance overhead of executing high-level language programs
directly on hardware. However, high-level languages continue to be an important aspect of
computer science and programming, as they enable developers to write more complex and
efficient programs using a more natural and expressive syntax.

The followings are popular examples of high level languages:


A. Pascal
• A high-level programming language developed by Niklaus Wirth in the late 1960s.
• The language is named after Blaise Pascal, a seventeenth-century French mathematician who
constructed one of the first mechanical adding machines.
• It is a popular teaching language.
Example:
Program HelloWorld(output);
begin
end.
writeLn('Hello, World!')
B. C

• Developed by Dennis Ritchie at Bell Labs in the mid-1970s.


• C is much closer to assembly language than are most other high-level languages.
• The first major program written in C was the UNIX operating system.
• The low-level nature of C, however, can make the language difficult to use for some types of
applications.
Example:
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return 0;
}

C. C++
• A high-level programming language developed by Bjarne Stroustrup at Bell Labs.
• C++ adds object-oriented features to its predecessor, C.
• C++ is one of the most popular programming language for graphical applications, such as those
that run in Windows and Macintosh environments.
Example:
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}

D. BASIC

• Short for Beginner's All-purpose Symbolic Instruction Code.


• Developed in the 1950s for teaching University students to program and provided with every
self-respecting personal computer in the 1980s,
• BASIC has been the first programming language for many programmers.
• It is also the foundation for Visual Basic.
Example:
PRINT "Hello world!"
E. Visual Basic

• A programming language and environment developed by Microsoft.


• Based on the BASIC language, Visual Basic was one of the first products to provide a
graphical programming environment and a paint metaphor for developing user interfaces.
Example:
MsgBox "Hello, World!“
F. JAVA

• A high-level programming language developed by Sun Microsystems.


• Java was originally called OAK, and was designed for handheld devices and set-top boxes.
• Oak was unsuccessful so in 1995 Sun changed the name to Java and modified the language to
take advantage of the burgeoning World Wide Web.
• Java is a general purpose programming language with a number of features that make the
language well suited for use on the World Wide Web.
Example:
/* * Outputs "Hello, World!" and then exits */
public class HelloWorld {
}
}
public static void main(String[] args) {
System.out.println("Hello, World!");

You might also like