Chapter 1
Chapter 1
Chapter 1
Mahfudzah Othman
UiTM Perlis
CHAPTER 1
What is a computer?
It is an electronic device that can input and store a set of instruction, input and
store data, process the stored data according to the instructions and finally
produce output to be relayed to its user.
Classifications of computer:
- Microcomputer
- Minicomputer
- Mainframe
- Supercomputer
1
CSC128
Mahfudzah Othman
UiTM Perlis
Definition of terminology of the computer
Compilation vs Execution
During compilation the computer runs the compiler program and produces the
object program. During execution the object program loaded into computer’s
memory and the computer runs the object program, doing whatever the program
instruct it to do.
In this subject, we will use the C++ language to do our program so before we
used it, we must know the concept of C++.
Environment of C++:
i) Editor
Is a special software that can be used to create text, edit it and save it as
a file using the keyboard and monitor.
ii) Preprocessors
It checks the C++ program for special instructions.
iii) Compiler
Is the software that converts a computer program written into a language
that can be understood by the computer. Translate from source code into
machine code.
iv) Linker
Is a component of the compiler, automatically combines the object code
that we need to produce executable code.
2
CSC128
Mahfudzah Othman
UiTM Perlis
v) Loader
Is a program that loads the executable code into the main memory for
execution.
vi) CPU
CPU takes each instruction and executes it, possibly storing new data
names as the program executes.
#include <iostream.h>
void main()
{
//instruction statement;
return 0;
}