0% found this document useful (0 votes)
7 views26 pages

CSC 401 Part 3

The document provides a historical overview of several programming languages including ALGOL, C#, and Java, detailing their origins and key features. It also discusses fundamental concepts of data types, data structures, and operators in programming, emphasizing their importance in computer programming. Key data structures such as arrays, linked lists, stacks, and queues are explained, along with arithmetic, relational, and logical operators used in languages like C, Java, and Python.

Uploaded by

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

CSC 401 Part 3

The document provides a historical overview of several programming languages including ALGOL, C#, and Java, detailing their origins and key features. It also discusses fundamental concepts of data types, data structures, and operators in programming, emphasizing their importance in computer programming. Key data structures such as arrays, linked lists, stacks, and queues are explained, along with arithmetic, relational, and logical operators used in languages like C, Java, and Python.

Uploaded by

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

History of Some Programming Languages

• ALGOL
(ALGOrithmic Language) is one of several high level languages designed
specifically for programming scientific computations. It started out in the late
1950's, first formalized in a report titled ALGOL 58, and then progressed through
reports ALGOL 60, and ALGOL 68. It was designed by an international
committee to be a universal language. Their original conference, which took
place in Zurich, was one of the first formal attempts to address the issue of
software portability. . ALGOL's machine independence permitted the designers
to be more creative, but it made implementation much more difficult.
1
History of Some Programming Languages

• C#
Is one of the most popular programming languages ​developed by Microsoft, along
with the dot net framework development, which has been approved by ECMA-
334 and ISO. C# was designed to be general-purpose, high-level, fully object-
oriented, as well as a component-oriented programming language. Mr. Anders
Hejlsberg is the creator of this widely used programming language. The language
was based on C++ and Java, with additional extensions, libraries, and concepts
for implementing different OOPS and component-oriented programming
concepts.
2
History of Some Programming Languages

• Java
Java as a programming language was conceived in 1991 by a team of programmers
from sun Microsystems. This team comprised of James Gosling, Mike Sheridan
and Patrick Naughton. Initially the language was nicknamed “Oak” after a big
oak tree that stood outside James Gosling’s office, but the project was letter
renamed “Green;” and in 1995, it got its final name changed when it was
renamed Java after Java coffee.

3
Data Types
• Data type is classification of a particular type of information.
• Data types are essential to any computer programming
language.
• Without them, it becomes very difficult to maintain information
within a
Computer program.
• Different data types have different sizes in memory depending
on the machine and compilers.
4
Data Types
• Data Types
• •Integer
• •Floating-point
• •Character
• •String
• •Boolean

5
6
7
8
• String
• •String is a sequence of character.
• •Example:
• –Kuala Lumpur
• –John White
• –Computer

9
• Boolean
• •This data type only have two possible values:
• –True
• –False
• •Use this data type for simple flags that track true/false
conditions.

10
Data Structures

• A data structure can be defined as a particular scheme of organizing


related data items.
• There are a few data structures that have proved to be particularly
important for computer algorithms. Below are some common data
structures.
• Linear Data Structures - The two most important elementary data
structures are the array and the linked list.
• A (one-dimensional) array is a sequence of n items of the same data
type that are stored contiguously in computer memory and made
accessible by specifying a value of the array’s index. In the majority
of cases, the index is an integer either between 0 and n – 1 or
between 1 and n.
11
• A linked list is a sequence of zero or more
elements called nodes, each containing two
kinds of information: some data and one or
more links called pointers to other nodes of
the linked list. (A special pointer called
“null” is used to indicate the absence of a
node’s successor.).
12
• A stack is a list in which insertions and
deletions can be done only at the end. This
end is called the top because a stack is
usually visualized not horizontally but
vertically—akin to a stack of plates whose
“operations” it mimics very closely.
13
• As a result, when elements are added to (pushed onto) a
stack and deleted from (popped off) it, the structure
operates in a “last-in–first-out” (LIFO) fashion— exactly
like a stack of plates if we can add or remove a plate only
from the top.
• Stacks have a multitude of applications; in particular, they
are indispensable for implementing recursive algorithms.

14
• A queue, on the other hand, is a list from which elements are
deleted from one end of the structure, called the front (this
operation is called dequeue), and new elements are added to
the other end, called the rear (this operation is called
enqueue).
• Consequently, a queue operates in a “first-in–first-out” (FIFO)
fashion—akin to a queue of customers served by a single teller
in a bank.
• Queues also have many important applications, including
several algorithms for graph problems.
15
Operators
• An operator in a programming language is a symbol that
tells the compiler to perform specific mathematical,
relational or logical operation and produce final result.
• Discussion on the concept of operators and the important
arithmetic and relational operators available in C, Java,
and Python will be provided.

16
Arithmetic Operators
• Computer programs are widely used for mathematical
calculations.
• Take a look at the following two examples −

17
The following table lists down a few of the important arithmetic operators
available in C programming language. Assume variable A holds 10 and
variable B holds 20, then −

18
Relational Operators
• Consider a situation where we create two variables and assign
them some values as follows −
• A=10
• B=20
• Here, it is obvious that variable A is greater than B in values.
• So, we need the help of some symbols to write such expressions
which are called relational expressions.
• If we use C programming language, then it will be written as
follows − (A>B)
19
• Here, we used a symbol > and it is called a relational
operator and in their
• Relational operators produce Boolean results which
means the result will be either true or false.

20
The following table lists down a few of the important relational
operators available in C programming language. Assume
variable A holds 10 and variable B holds 20, then −

21
• Example of C Programming which makes use of relational
operators in if conditional statement.,
• We use if statement to check a condition and if the
condition is true, then the body of if statement is
executed, otherwise the body of if statement is skipped.

22
Logical Operators
• Logical operators are very important in any programming
language and they help us take decisions based on certain
conditions.
• Suppose we want to combine the result of two conditions, then
logical AND and OR logical operators help us in producing the
final result.
• The following table shows all the logical operators supported by
the C language. Assume variable A holds 1 and variable B holds
0, then −
23
Logical Operators

24
25
26

You might also like