JK C - 1 - An Overview of Programming Languages
JK C - 1 - An Overview of Programming Languages
JK C - 1 - An Overview of Programming Languages
languages
Objectives
• Learn basic computer terminology and
component architecture
2
Understanding Basic Computer
Terminology And Component
Architecture
• Understand basic computer terms
• Computer requires:
• Hardware
• Software
3
Understanding Basic Computer
Terminology And Component
Architecture (continued)
• Hardware
• Architecture
4
Computer Systems: Computer Hardware and Software
Hardware
Central
Processing
Unit
Input Output
Device Device
Main
Memory
Secondary
Storage
Software
What is a program?
Machine Languages
Assembly Languages
ADD bx, ax
High-level program languages more resemble English language than low-level languages. Examples:
• Visual Basic • C#
• Python • C
• Javascript • C++
• Java • PHP
18
High-level Languages (continued)
• Source code refers to the program written in a high-level
language.
19
20
Learning a Programming Language
• Understand basic vocabulary
• Keywords
– Words built into language
– Also called reserved words
• Statements
– Consist of:
• Keywords- Words with special meaning to Visual Basic (e.g.,
printf , scanf
• Identifiers - Names created by the programmer (e.g.,
sngGrossPay, btnClose)
• Operators: Special symbols to perform common operations
(e.g., +, -, *, and /)
• Comments - Remarks: Comments inserted by the programmer – these
are ignored when the program runs (e.g., any text preceded by a single
quote)
21
Learning a Programming
Language (continued)
• Syntax
– Rules of language
– Includes:
• Spelling
• Punctuation
• Grammar
– Each programming language has own unique
syntax and structure
22
Learning a Programming
Language (continued)
• Syntax error
– Mistake in program
23
Learning a Programming
Language
• Logic error
– Mistake in program
24
Solving Problems and
Developing Algorithms
• Computer programming is problem solving
• Problems solved by programs
– Require inputs
– Produce outputs
• Algorithm
– Sequence of steps used to transform input(s) into
desired output(s)
25
26
Summary
• Computer consists of:
– Hardware
– Software
• Programming languages:
– Machine language
– Assembly language
– High-level languages
27