0% found this document useful (0 votes)
25 views11 pages

Week 1

Uploaded by

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

Week 1

Uploaded by

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

LECTURE NOTES

On
Principles of Programming

Course Code: COM122

COM 122 Principles of Programming

By
Michael Kumakech
SYLLABUS - (12 Lectures)

• Lecture 1: A Beginner’s Guide • Lecture 7: Formatted Input-


• Lecture 2: Introduction to Output
Programming • Lecture 8: Operators
• Lecture 3: Introduction to C, • Lecture 9: Operators continued…
structure of C programming • Lecture 10: Control Statements
• Lecture 4: Elements of C • Lecture 11: Iterative statements
• Lecture 5: Variables, Statements, • Lecture 12: Jump statements
Expressions
• Lecture 6: Input-Output in C
INTRODUCTION TO COMPUTERS

• Any programming language is implemented


on a computer.
• Inputting: It is the process of entering data &
instructions to the computer system.
• Storing: The data & instructions are stored for
either initial or additional processing, as &
when required.
• Processing: It requires performing arithmetic
or logical operation on the saved data to
convert it into useful information.
• Outputting: It is the process of producing the
output data to the end user.
• Controlling: The above operations have to be
directed in a particular sequence to be
completed.
INTRODUCTION TO
PROGRAMMING
• A language that is acceptable to a
computer system is called a computer
language or programming language
and the process of creating a sequence
of instructions in such a language is
called programming or coding.
• A program is a set of instructions,
written to perform a specific task by
the computer. A set of large program is
called software.
• To develop software, one must have
knowledge of a programming language
PROGRAMMING LANGUAGE
TRANSLATORS
• High-level languages allow
programmers to write
instructions in a language that is
easier to understand than low-
level languages.
• Translators translate programs
written in high-level languages
into the machine code that a
computer understands.
INTRODUCTION TO C

Brief History of C
• The C programming language is a structure oriented programming
language, developed at Bell Laboratories in 1972 by Dennis Ritchie.
• C programming language features were derived from an earlier
language called “B” (Basic Combined Programming Language – BCPL)
• C language was invented for implementing UNIX operating system.
• In 1978, Dennis Ritchie and Brian Kernighan published the first edition
“The C Programming Language” and is commonly known as K&R C.
• In 1983, the American National Standards Institute (ANSI) established
a committee to provide a modern, comprehensive definition of C. The
resulting definition, the ANSI standard, or “ANSI C”, was completed
late 1988.
• Many of C’s ideas & principles were derived from the earlier language
B, thereby naming this new language “C”.
WHY IS C POPULAR
• Despite the prevalence of higher-
level languages, C continues to
empower the world.
• The following are some of the
systems that are used by millions and
are programmed in the C language.
WHY TO STUDY C

• By the early 1980s, C was already a dominant


language in the minicomputer world of Unix
systems. Since then, it has spread to personal
computers (microcomputers) and to
mainframes.
• Many software houses use C as the preferred
language for producing word processing
programs, spreadsheets, compilers, and other
products.
• C is an extremely flexible language—
particularly if it is to be used to write
operating systems.
• Unlike most other languages that have only
four or five levels of precedence, C has 15.
CHARECTERESTICS OF A C PROGRAM

High Level Middle Level Low Level


High level languages Middle level languages don’t Low level languages
provide almost everything provide all the built-in functions provides nothing
that the programmer found in high level languages, but other than access to
might need to do as provides all building blocks that the machines basic
already built into the we need to produce the result instruction set
we want
language

Examples: Java, C, C++


Python Assembler
CHARECTERESTICS OF A C
PROGRAM
Structure oriented Object oriented Non structure
In this type of language, large In this type of language, There is no specific
programs are divided into small programs are divided into structure for programming
programs called functions objects this language

N/A
Prime focus is on functions and Prime focus is in the data that is
procedures that operate on the being operated and not on the
data functions or procedures

Data is hidden and cannot be N/A


Data moves freely around the
systems from one function to accessed by external functions
another

N/A
Program structure follows “Top Program structure follows
Down Approach” “Bottom UP Approach”

Examples: C++, JAVA and C# (C sharp) BASIC, COBOL,


C, Pascal, ALGOL and Modula-2 FORTRAN
Reading Assignment
• https://www.scholarhat.com/tutorial/c/10-reasons-why-you-should-l
earn-c
• https://www.toptal.com/c/after-all-these-years-the-world-is-still-pow
ered-by-c-programming
• https://www.bbc.co.uk/bitesize/guides/z4cck2p/revision/3
• https://www.w3schools.com/c/c_intro.php

You might also like