2025 Basic Computer Programming Week01 Part2
2025 Basic Computer Programming Week01 Part2
(Basic Computer
Programming)
1
Chapter 1
Introduction to Computing
Components of a Computer
• Computer
– Electronic device which may be uses to perform various computations
involving arithmetic and logical operations.
• Output devices
– Computer to convey messages back to the users.
• Monitor
– The most common output device
Components of a Computer:
Memory
• The memory is broadly classified into primary memory and
secondary memory.
• Secondary memory
– Hard disk, flash drives, etc.
Components of a Computer:
Memory
• Operating System
– Linux, Windows, UNIX, macOS etc.
• Translators
– Translating a program written in high level language (HLL) into
machine language.
– HLL : C, C++, Java, etc.
Concept of Hardware and Software:
Types of Software
• Linker
– Linking together the object codes belonging to all the sub-
routines/functions of a program and forms an executables code.
• Loader
– Loading a program to be executed from the secondary memory into a
designated area of the main memory.
• Application Software
– Word processing, image editing, spread sheet, database software, etc.
Art of Programming through
Algorithms and Flowcharts:
Algorithms
Algorithm:
Algorithm to find Average of Three Numbers
• Algorithm
– Finite set of unambiguous instructions witch, when executed,
performs a task correctly.
Algorithm:
Algorithm to find Average of Three Numbers
• Algorithm
– Finite set of unambiguous instructions witch, when executed,
performs a task correctly.
Fig. 1.11 Algorithm and Flowchart to find Sum of Even numbers out of N numbers
Flowchart : Program to find Sum of Even numbers out of N
numbers
29
A Simple Program 1:
Printing a Message
• Output:
I see, I remeber
Sample Program 1:
Printing a Message
• Output:
100
106.10
Sample Program 3:
Interest Calculation
43
Windows System
• There are several IDEs.
– Borland C/C++
– Microsoft Visual Studio
– Dev-C++
– Turbo C/C++
– etc.
44
KEY CONCEPTS
• #define: Is a preprocessor compiler directive.