0% found this document useful (0 votes)
87 views

Comprog Reviewer

This document provides an overview of basic computer terminology and applications of computers in different fields. It discusses the key components of a computer system including the input unit, output unit, memory unit, control unit, and central processing unit. It also outlines how computers are used in business, banking, insurance, education, marketing, healthcare, engineering, the military, government, and communication. Computers provide benefits like speed, accuracy, storage capabilities, reliability, and automatic operation that have made them integral parts of many organizations and industries.

Uploaded by

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

Comprog Reviewer

This document provides an overview of basic computer terminology and applications of computers in different fields. It discusses the key components of a computer system including the input unit, output unit, memory unit, control unit, and central processing unit. It also outlines how computers are used in business, banking, insurance, education, marketing, healthcare, engineering, the military, government, and communication. Computers provide benefits like speed, accuracy, storage capabilities, reliability, and automatic operation that have made them integral parts of many organizations and industries.

Uploaded by

Rovic Vista
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

FUNDAMENTALS

Basic Terminologies Application of Computers

Computer - an electronic system designed to Business


manipulate data, they are machines for storing, moving,
A computer has high speed of calculation, diligence,
adding and subtracting, and evaluating data
accuracy, reliability, or versatility which has made it an
Data – any collection of facts integrated part in all business organizations.

Data Processing – the manipulation of data into a more Computer is used in business organizations for:
useful form
• Payroll calculations
Information - are processed data
• Budgeting

• Sales analysis Financial forecasting Managing


employee database

• Maintenance of stocks

Banking

Today, banking is almost totally dependent on


computers. Banks provide the following facilities:

• Online accounting facility, which includes checking


current balance, making deposits and overdrafts,
checking interest charges, shares, and trustee records.

• ATM machines which are completely automated are


making it even easier for customers to deal with banks.
Functionalities of a Computer Insurance
• Takes data as input Insurance companies are keeping all records up-to-date
with the help of computers. Insurance companies,
• Stores the data/instructions in its memory and uses
finance houses, and stock broking firms are widely using
them as required
computers for their concerns.
• Processes the data and converts it into useful
Insurance companies are maintaining a database of all
information Generates the output
clients with information showing:
ADVANTAGES OF COMPUTERS
• Procedure to continue with policies
• High speed Accuracy
• Starting date of the policies
• Storage capability
• Next due installment of a policy
• Diligence
• Maturity date
• Versatility Reliability
• Interests due
• Automatic operation
• Survival benefits
• Decision making capability
• Bonus
Education •Surgery - Nowadays, computers are also used in
performing surgery.
The computer helps in providing a lot of facilities in the
education system. Engineering Design

• The computer provides a tool in the education system One of the major areas is CAD (Computer Aided Design)
known as CBE (Computer Based Education). that provides creation and modification of images.
Some of the fields are:
• CBE involves control, delivery, and evaluation of
learning. •Structural Engineering - Requires stress and strain
analysis for design of ships, buildings, budgets,
• Computer education is rapidly increasing the graph of
airplanes, etc.
number of computer students.
•Industrial Engineering - Computers deal with design,
• There are a number of methods in which educational
implementation, and improvement of integrated
institutions can use a computer to educate the
systems of people, materials, and equipment.
students.
•Architectural Engineering - Computers help in planning
• It is used to prepare a database about performance of
towns, designing buildings, determining a range of
a student and analysis is carried out on this basis.
buildings on a site using both 2D and 3D drawings.
Marketing
Military
Advertising - With computers, advertising professionals
Computers are largely used in defense. Modern tanks,
create art and graphics, write and revise copy, and print
missiles, weapons, etc. Military also employs
and disseminate ads with the goal of selling more
computerized control systems. Some military areas
products.
where a computer has been used are:
Home Shopping - Home shopping has been made
• Missile Control
possible through the use of computerized catalogues
that provide access to product information and permit • Military Communication
direct entry of orders to be filled by the customers.
• Military Operation and Planning
Healthcare
• Smart Weapons
Computers have become an important part in hospitals,
Communication
labs, and dispensaries. They are being used in hospitals
to keep the record of patients and medicines. It is also Communication is a way to convey a message, an idea, a
used in scanning and diagnosing different diseases. ECG, picture, or speech that is received and understood
EEG, ultrasounds and CT scans, etc. are also done by clearly and correctly by the person for whom it is
computerized machines. meant. Some main areas in this category are:
•Diagnostic System - Computers are used to collect data • E-mail
and identify the cause of illness.
• Chatting
•Lab-diagnostic System - All tests can be done and the
reports are prepared by computer. • Usenet

•Patient Monitoring System - These are used to check • FTP


the patient's signs for abnormality such as in Cardiac • Telnet
Arrest, ECG, etc.
• Video-conferencing
•Pharma Information System - Computer is used to
check drug labels, expiry dates, harmful side effects, etc.
Government ALU (Arithmetic Logic Unit)

• Budgets Memory Unit

• Sales tax department Income tax department Control Unit

• Computation of male/female ratio Output Unit

• Computerization of voter’s lists The output unit consists of devices with the help of
which we get the information from the computer. This
• Computerization of PAN card
unit is a link between the computer and the users.
• Weather forecasting Output devices translate the computer's output into a
form understandable by the users.
COMPONENTS OF A COMPUTER SYSTEM
Input Unit
All types of computers follow the same basic logical
structure and perform the following five basic • This unit contains devices with the help of which we
operations for converting raw input data into enter data into the computer.
information useful to their users.
• This unit creates a link between the user and the
Take Input The process of entering data and computer.
instructions into the computer system.
• The input devices translate the information into a
Store Data Saving data and instructions so that they are form understandable by the computer.
available for processing as and when required.
System CPU (Central Processing Unit)
Processing Data Performing arithmetic, and logical
• CPU is considered as the brain of the computer.
operations on data in order to convert them into useful
information. • CPU performs all types of data processing operations.
It stores data, intermediate results, and instructions.
Output Information The process of producing useful
information or results for the user, such as a printed • It controls the operation of all parts of the computer.
report or visual display. CPU itself has the following three components:

Control the workflow Directs the manner and sequence • ALU (Arithmetic Logic Unit) –
in which all of the above operations are performed.
•Memory Unit
Main Components of a Computer System
•Control Unit
Input Unit This unit contains devices with the help of
Output Unit
which we enter data into the computer. This unit
creates a link between the user and the computer. The The output unit consists of devices with the help of
input devices translate the information into a form which we get the information from the computer.
understandable by the computer.
This unit is a link between the computer and the users.
CPU (Central Processing Unit)
Output devices translate the computer's output into a
CPU is considered as the brain of the computer. form understandable by the users.
CPU performs all types of data processing operations. It
stores data, intermediate results, and instructions
(program). It controls the operation of all parts of the
computer.

CPU itself has the following three components:


ELEMENTS OF COMPUTER CLASSIFICATION OF COMPUTERS ACCORDING SPEED
and COMPUTING POWER
Computer Hardware – refers to the physical equipment
or components of an electronic data processing system. ✓ PC (Personal Computer) - It is a single user computer
system having moderately powerful microprocessor
Computer Software - includes all programs that
analyzes data, update files, and printout information ✓ Workstation - It is also a single user computer
and other processes data. Computer programs are sets system, similar to personal computer however has a
of instructions that computers can understand. They are more powerful microprocessor
instructions on how to carry out operations. It provides
the way through which the user can communicate with ✓ Minicomputer - It is a multi-user computer system,
the computer. capable of supporting hundreds of users
simultaneously.
Peopleware - refers to the people who use computers.
It also includes people who make programs that run on ✓ Mainframe - It is a multi-user computer system,
computer systems. capable of supporting hundreds of users
simultaneously. Software technology is different from
Dataware - represent as the data to be process,
minicomputer
considered as information.
✓ Supercomputer - It is an extremely fast computer,
Firmware - refer as the program inside the Integrated
which can execute hundreds of millions of instructions
Circuit.
per second.
CLASSIFICATION OF COMPUTERS ACCORDING TO
PURPOSE

General-Purpose - machines have the capability of


dealing with a variety of different problems, and are
able to act in response to programs created to meet
different needs.

Special-Purpose - designed to perform one specific task.


The program of instructions is built into or permanently
stored in the machine.

CLASSIFICATION OF COMPUTERS ACCORDING TO DATA


HANDLED

Analog - used for scientific, engineering, and process-


control purposes.

Digital - a machine that specializes in counting.

Hybrid – combines both features of an analog and


digital computers.
ALGORITHM AND FLOW CHARTING
Introduction • Example Problem: Determine the number of times a
name occurs in a list
A programming language is a standardized
communication technique for expressing instructions to • Input to the program: list of names, name to look for
a computer. Like human languages, each language has
• Output of the program: the number of times the
its own syntax and grammar. It enable programmers to
name occurs in a list
precisely specify what data a computer will act upon,
how these data will be stored/transmitted, and Algorithm Design and Representation
precisely what actions to take under various
circumstances. • Once our problem is clearly defined, we can now set
to finding a solution.
Programming is important in our daily life to enhance
and increase the power of computers and the internet, • Algorithm is a clear and unambiguous specification of
for speeding up the input and output processes in a the steps needed to solve a problem. It may be
machine, and to automate, collect, manage, calculate, expressed in either Human language, through a
analyze the processing of data and information graphical representation like a flowchart or through a
accurately. Flow charts help programmers develop the pseudocode, which is a cross between human language
most efficient coding because they can clearly see and a programming language.
where the data is going to end up. It also help Expressing our solution through Human language:
programmers figure out where a potential problem area
is and helps them with debugging or cleaning up code 1. Get the list of names
that is not working. 2. Get the name to look for, let's call this the keyname
The Program Development Life Cycle 3. Compare the keyname to each of the names in the
1. Problem Definition list

2. Problem Analysis 4. If the keyname is the same with a name in the list,
add 1 to the count
3. Algorithm design and representation (Pseudocode or
flowchart) 5. If all the names have been compared, output the
result
4. Coding and debugging

Problem Definition

• A clearly defined problem is already half the solution.


• Computer programming requires us to define the
problem first before we even try to create a solution.

• Let us now define our example problem:

• “Create a program that will determine the number of


times a name occurs in a list."

Problem Analysis

• After the problem has been adequately defined, the


simplest and yet the most efficient and effective
approach to solve the problem must be formulated.
This step involves breaking up the problem into smaller
and simpler sub-problems.
Expressing our solution through pseudocode Types of Flowcharts

Let nameList = List of Names Program Flowchart - describes graphically in detail the
logical operations and steps within a program and
Let keyName = the name to be sought
sequence in which these steps are to be executed for
Let Count = 0 the transformation of data to produce the needed
output
For each name in NameList do the following
System Flowchart - is a graphic representation of the
if name == keyName procedures involved in converting data on input media
Count = Count + 1 to data in output form

Display Count

Terminologies

Algorithm - is a list of instructions for carrying out some


process step by step

Flowchart - is a diagram representing the logical


sequence in which a combination of steps or operations
is to be performed. Typically it do not display
programming language commands, rather, they state
the concept in English or mathematical notation.

Coding and Debugging

• After constructing the algorithm, it is now possible to


create the source code. Using the algorithm as basis, BASIC CONTROL STRUCTURE
the source code can now be written using the chosen SEQUENCE – process is executed from one to another in
programming language. a straight forward manner
• Most of the time, after the programmer has written SELECTION – a choice is provided between two
the program, the program isn't 100% working right alternatives based on conditions outcome as either
away. The programmer has to add some fixes to the TRUE or FALSE
program in case of errors (also called bugs) that occurs
in the program. This process of is called debugging. ITERATION – or loop, enables certain
operations/tasks/instructions to repeat. These tasks are
Types of Errors or "bugs” repeated based on conditions outcome as either TRUE
Compile or Syntax Error – occurs if there is a syntax or FALSE
error in the code. The compiler will detect the error and
the program won't even compile. At this point, the
programmer is unable to form an executable that a user
can run until the error is fixed. Forgetting a semi-colon
at the end of a statement or misspelling a certain
command.

Runtime Error – when the end-user runs the program,


the program (or even their whole computer) freezes up
due to an infinite loop.

Logical Error - this happens when the actual syntax of


the code looks okay. But when you follow the code's
logic
DevC_IDE
Introduction 1. Create Project

• Dev-C++ is a full-featured IDE for the C/C++ • A project groups several files with a common purpose.
programming language
• In our programs, projects will include a file with
• As similar IDEs, it offers to the programmer a simple metadata about the project (.dev), a file with C source
and unified tool to edit, compile, link, and debug code (.c), a file with object code (.o), and a file with
programs linking instructions (makefile.win)

• It also provides support for the management of the • Only the .c file must be explicitly created -the
files of a program in “projects” containing all the remaining files are automatically created by Dev-C++.
elements required to produce a final executable
Files Explorer window - shows the name of the project
program
and the included files. The project tab usually contains a
• Dev-C++ is a free software distributed under the terms single file with the source code of the program. In this
of the GNU General Public License pane, we can find two additional tabs: Classes and
Debug. Classes tab shows the functions of the program.
Dev-C IDE
Debug tab shows watched variables in the debugging
process.

Results window - used to present the results of the


actions of the IDE: compilation errors, compiling
directives, debugging commands, etc.

Source code editor - shows the code of the program.

2. Write source code

• Once the project has been created, we can start


writing our C program.

• It is recommended to use the classic color


configuration of the editor (Tools > Editor options >
Syntax > Color Speed Settings > Classic) and to activate
the support for opening and closing brackets (Tools >
Editor options > General > Highlight matching braces /
parenthesis).

• The editor highlights with different colors keywords


and other elements of the C language. The classic
Steps in Creating Program scheme uses:
1. Create a project • Light blue for comments
2. Write source code • Green for included libraries
3. Compile and link the code • Red for text strings
4. Fix compilation errors, if any 5. Run the program • Bold black for C keywords
3. Compile and link the code

• To run a program, the source code must be compiled


and linked. Dev-C++ performs the complete process by
clicking the Compile button (or Ctrl + F9).

• While the compilation and link process is being


performed, the IDE shows a dialog with related
information. If the process is successful, the window
shows the message Done

4. Fix compilation errors, if any

• Compilation errors are errors that are detected by the


compiler. They are also named designvtime errors.

• To correct compilation errors, it is recommended to


solve the first one and then to re-compile the program
again, since next errors are frequently wrong sections of
the code that the compiler cannot interpret as a result
of the first error.

• Dev-C++ underlines in red the line of code where the


compilation error has been detected. The Compile tab
of the Results window provides a detailed description of
the error.

• The Compile Log shows the error message issued by


the compiler program.

5. Run the program

• As a result of the link process, an executable program


is created. To run this program, we have to click the Run
button (Ctrl + F10). Alternatively, we can find the
executable program (.exe) in the project folder and
double-click on it.

• NOTE: It is possible to compile and run the program in


a single step by clicking the Compile & Run button (F9).
IDE
Main Parts of Turbo-C IDE Creating a Program

Main menu • The process of writing a new C program by following


the rules of C language is called creating a C program.
Editor window
• To write a new C program, load the TC editor and type
Message window
the source code of program.
Status line
Editing a C Program
Main Menu
• You can also make changes during writing new
• File – contains group of commands used for saving programs as well as in the exiting C program.
program, operating existing program, printing source
• The process of writing, changing and revising the
code of program, exiting from Turbo C editor etc.
source code is called editing program.
• Edit - contains group of commands used for editing C
Saving a C Program
program source code. The important editing commands
are: Copy, Cut, Paste, Undo etc. • After writing or editing the source program, you
should save it on the disk as text file with an extension
• Search - contains group of commands used for
".c".
searching specific word as well as replacing it with
another one. • This process is called saving the program.

• Run – contains group of commands used for running C To save source code in TC editor, follow these steps
program
1. Select Save command from file menu or press F2 key.
• Compile - contains group of commands used for A dialog box will appear. The default file name of source
compiling C program code is NONAME00.C

• Debug - contains group of commands used for 2. Type the name of file such as "first.c" and press Enter
debugging C program. key. You can also select a specific folder (or location)
where you want to save the file. Turbo C editor
• Project – contains group of commands used for
automatically assigns the file extension as ".c"
opening, closing and creating projects.

• Options - contains group of commands used for


configuring IDE of Turbo C and setting up directories To save source code in TC editor, follow these steps
etc.
• Be sure that your directories are set properly. First, go
• Windows – contains group of commands used for to Option Menu, then select Directories. Input the
opening, closing various windows of IDE. correct directory as shown in the figure below:

• Help -- is used to get help about specific topic of C


language, You can also get help by pressing F1 key.
Similarly to get help about a specific keyword or
identifier of C, type a word, keep cursor on the word
and press keyboard shortcut Ctrl + F1.
STATEMENTS
Input Statements

scanf – function used to input single character or Control strings may consists the mixture of three items
sequence of characters from the keyboard, it needs the 1. Character to be displayed
control string codes. Spaces are not accepted upon
2. Format command
inputting. Terminated by pressing SPACE bar.
3. Escape character sequences
Syntax: scanf(“control string codes", &identifier_name);
Escape Character Sequences
getch – function used to input a single character from
the keyboard without echoing the character on the \n – Newline
monitor
\t – Tab
Syntax: getch();
\b – Backspace
getche – function used to input a single character from
the keyboard, the character pressed echoed in the \\ - Backslash character
monitor \’ – Single quote
Syntax: getche(); \” – Double quote
getchar – function used to input a single character from %C -Character
the keyboard, the character pressed echoed in the
monitor, terminated by pressing ENTER key %d - Signed decimal

Syntax: getchar(); %i - Integer

gets – function used to input sequence of character %e - Scientific notation


from the keyboard, spaces are accepted, terminated by %f - Floating point
pressing ENTER key
%0 - Unsigned octal
Syntax: gets(identifier_name);
%S - String
Output Statements
%u - Unsigned decimal
printf – function used to display the argument list on
the monitor. sometimes need the control string codes %x - Unsigned hexadecimal
to help displaying the remainin argument on the screen.
%% - Percent sign
Syntax: printf(“control string codes", argument_list);

putchar - function used to display a single character to


another characte in the monitor. Its like overwriting a
character.

Syntax: putchar();

puts - function used to display the argument list or


string on the monitor, doesn't need the help of control
string codes.

Syntax: puts();
OPERATORS
Assignment Operator

• A single equal sign(=) is used as an assignment


operator in C language.

• This means that the value on the right side of the


expression is assigned to the identifier on the left.

Arithmetic Operators

* - Multiplication

/ - Division

% - Modulus division

+ - Addition

- - Subtraction

> - Greater than

>= Greater than or equal to

< - Less than

<= - Less than or equal to

== - is equal to

!= - is not equal to

&& - AND

|| - OR

! - NOT

You might also like