0% found this document useful (0 votes)
43 views15 pages

EC201 - Fundamental Programmin G: Unit 1 - Introductory To Programming

This document defines key programming terms and introduces various programming languages and programming paradigms. It covers popular languages like C, C++, BASIC, and Visual Basic, and discusses structured programming, modular programming, and object-oriented programming. The document also provides an overview of the typical phases involved in developing a C program from editing to execution.

Uploaded by

farahazura
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)
43 views15 pages

EC201 - Fundamental Programmin G: Unit 1 - Introductory To Programming

This document defines key programming terms and introduces various programming languages and programming paradigms. It covers popular languages like C, C++, BASIC, and Visual Basic, and discusses structured programming, modular programming, and object-oriented programming. The document also provides an overview of the typical phases involved in developing a C program from editing to execution.

Uploaded by

farahazura
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/ 15

EC201

FUNDAMENTAL
PROGRAMMIN
G
UNIT 1 INTRODUCTORY TO
PROGRAMMING

1.1 INTRODUCTION TO PROGRAMMING


CONCEPT AND TERMINOLOGY
Definition of Programming Terms

PROGRAMME
A set of instructions that enables the
computer to perform a certain task.
OR
A sequence of instructions that a
computer can interpret and
execute. The program required
several hundred lines of code.

PROGRAMMER
A

person writes a program so that data may


be processed by a computer.
OR
A person writes computer software.
Computer software is a collection of
computer programs and related data that
provides the instructions for telling a
computer what to do and how to do it.

PROGRAMMING LANGUAGE
A

programming language is an artificial


language designed to express computations
that can be performed by a machine,
particularly a computer.

Programming

languages can be used to create


programs that control the behavior of a
machine, to express algorithms precisely, or as a
mode of human communication.

THE VARIOUS TYPES OF POPULAR


PROGRAMMING LANGUAGES
BASIC
BASIC (Beginner's All-purpose Symbolic Instruction
Code) is a family of high-level programming
languages to provide computer access to nonscience students.
Example:
main( )
{
printf(HELLO WORLD");
}

QBasic
QBasic

(QuickBASIC) is an IDE (integrated


development environment) and interpreter for a
variant of the BASIC programming language.

Like

QuickBASIC, but unlike earlier versions of


Microsoft BASIC, QBasic is a structured
programming language, supporting constructs
such as subroutines and while loops.

Example:
PRINT "Hello, World!"

Visual Basic
Visual

Basic (VB) is the third-generation eventdriven programming language and integrated


development environment (IDE) from Microsoft for
its COM programming model.

Because

of its graphical development features


and BASIC heritage, VB is considered to be
relatively easy to learn and use.
Private Sub Form_Load()

Example:

' Execute a simple message box


that will say "Hello, World!"

MsgBox "Hello, World!"


End Sub

C
C

(pronounced /si/ see) is a designed for


implementing system software and used for
developing portable application software.

is a computer programming language


developed in 1972 by Dennis Ritchie at the Bell
Telephone Laboratories for use with the Unix
operating system.

Example

#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return 0;
}

C++
C++

(pronounced /si plas plas/ see plus plus) is a


statically typed, free-form, multi-paradigm,
compiled, general-purpose programming
language.

It

is regarded as a "middle-level" language, as it


comprises a combination of both high-level and
low-level language features.

Example

#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}

TYPES OF PROGRAMMING LANGUAGES


STRUCTURED PROGRAMMING
A

technique for organizing and coding


computer programs in which a hierarchy of
modules is used, each having a single entry
and a single exit point, and in which control
is passed downward through the structure
without unconditional branches to higher
levels of the structure.

Three

types of control flow are used:


sequential, test, and iteration.

MODULAR PROGRAMMING
is

a software design technique that increases


the extent to which software is composed of
separate, interchangeable components, called
modules.

Conceptually,

modules represent a separation


of concerns, and improve maintainability by
enforcing logical boundaries between
components.

Modules

are typically incorporated into the


program through interfaces.

module interface expresses the elements


that are provided and required by the
module.

The

elements defined in the interface are


detectable by other modules.

The

implementation contains the working


code that corresponds to the elements
declared in the interface.

Object-oriented programming (OOP)

is a programming paradigm that uses "objects"


data structures consisting of data fields and
methods together with their interactions to
design applications and computer programs.

Programming

techniques may include features


such as data abstraction, encapsulation,
modularity, polymorphism, and inheritance.

Many

modern programming languages now


support OOP.

Basics of a Typical C
Environment

Editor

Preprocessor

Phases of C Programs:
1. Edit
2. Preprocess
3. Compile
4. Link
5. Load
6. Execute

Program is created in
the editor and stored
on disk.
Preprocessor program
processes the code.

Disk

Disk

Compiler

Disk

Linker

Disk

Prima ry
Memory

Loader

Disk

..
..
..

Prima ry
Memory

CPU

..
..
..

14

Compiler creates
object code and stores
it on disk.
Linker links the
object code with the
libraries,creates
a.out and stores it
on disk
Loader puts program
in memory.

CPU takes each


instruction and
executes it, possibly
storing new data
values as the program
executes.

SUMMARY
Terms in programming :
Programme
Programmer
Programming

language

Various types of
programming language:
C language
C++ language
BASIC
QBASIC
Visual Studio
Pascal

Types of programming:
Structured programming
Modular programming
Object-oriented programming

You might also like