Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

Basic Programming Handouts

This document provides an introduction to C programming, including: 1. It defines algorithms, digital computers, and their basic components like CPU, memory, and input/output devices. 2. It explains the differences between system software and application software, and defines a computer program as data and instructions for manipulating the data. 3. It outlines the different types of programming languages from low-level like machine language to high-level languages like C++, and provides a brief history of the C programming language.

Uploaded by

Nympha Lachaona
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Basic Programming Handouts

This document provides an introduction to C programming, including: 1. It defines algorithms, digital computers, and their basic components like CPU, memory, and input/output devices. 2. It explains the differences between system software and application software, and defines a computer program as data and instructions for manipulating the data. 3. It outlines the different types of programming languages from low-level like machine language to high-level languages like C++, and provides a brief history of the C programming language.

Uploaded by

Nympha Lachaona
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to C Programming Handout #1: Introduction

Handout #1
Introduction

Electronic Data Processing Concepts

IPO Diagram

Input Process Output

Algorithm (from "Fundamentals of Data Structures", by Horowitz & Sahni)

An algorithm is a finite set of instructions which, if followed, accomplish a particular task. In addition,
every algorithm must satisfy the following criteria:

1. Input: there are zero or more quantities which are externally supplied
2. Output: at least one quantity is produced
3. Definiteness: each instruction must be clear and unambiguous
4. Finiteness: if we trace the instructions of an algorithm, then for all cases, the algorithm will
terminate after a finite number of steps
5. Effectiveness: every instruction must be sufficiently basic that it can in principle be carried out by a
person using only pencil and paper. It is not enough that each operation be definite, but it must also
be feasible.

Digital Computer

A digital computer is a machine (also called hardware) that is capable of storing data and executing
algorithms. It is made up of the following physical components

1. Central Processing Unit (CPU)


2. Memory
2.1 Primary Memory
Read Only Memory (ROM)
Random Access Memory (RAM)
2.2 Secondary Memory
Includes magnetic, hard disk, floppy diskette, ZIP disk, CD-ROM
3. Input/Output Devices (I/O)
3.1 Input devices include keyboard, mouse, touchpad etc.
3.2 Output devices include display screen, printer, plotter

Software

In loose terms, software refers to computer programs which serve as interface between the user and the
hardware. Software can be categorized into two, namely:

1. System Software
- including operating system, compilers, linkers etc.

1
Introduction to C Programming Handout #1: Introduction
2

2. Application Software
- including word processor, spreadsheet, calculator etc.

What is a computer program?

A computer program is very much like an algorithm. However, it may not be finite, i.e., a program need
not terminate after a finite number of steps. An example of such a program is an operating system.

Basically, a computer program is made up of two components:


1. Data
2. Instructions for manipulating data

A computer program is written using a certain computer programming language.

Computer Programming Language

A programming language describes the:


1. vocabulary (set of symbols and words)
2. syntax (rules)
3. semantics (meaning)
that are used to write a valid computer program.

Types of Computer Programming Languages

1. Low-Level Languages
Low-level languages include:
- machine language (lowest level, defined in terms of zero's and one's)
- assembly language (uses mnemonics)
They are called low-level because they require the programmers to have a good
understanding of the underlying hardware for which the programs are intended to run
Programs written using low-level languages are not portable, i.e. they cannot be executed
in two different and incompatible processors

2. High-Level Languages
High-level languages include:
- FORTRAN
- ALGOL
- COBOL
- PL/1
- BASIC
- Pascal
- C++
- Java
They are called high-level because (1) the language is quasi-English and (2) it does not
require the programmer to know the actual computer hardware
The programs written in high-level languages are able to exhibit portability

The C Programming Language

The C programming language is a general-purpose programming language.


It is mainly associated with systems programming, but theoretically it can be used for
programming in different domains including scientific and business applications.
It was developed by Dennis Ritchie (one of the authors of "The C Programming Language" book).

2
Introduction to C Programming Handout #1: Introduction
3

Evolutions of C is as follows:

BCPL 1967 (Martin Richards)

B 1970 (Ken Thompson)

C 1972 (Dennis Ritchie)

ANSI C 1989

C++ 1990 (Bjourne Stroustrup)

You might also like