0% found this document useful (0 votes)
22 views19 pages

Topic 04

This document summarizes a lecture on word processing. It defines word processing as using a computer to create, edit, and print documents. The key operations of word processing are insertion, deletion, and replacement of text. Examples of each operation are provided to demonstrate how to insert, delete, and replace strings at different positions in a text. Independent practice problems are given at the end to have students apply the word processing operations.

Uploaded by

pakghost22
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)
22 views19 pages

Topic 04

This document summarizes a lecture on word processing. It defines word processing as using a computer to create, edit, and print documents. The key operations of word processing are insertion, deletion, and replacement of text. Examples of each operation are provided to demonstrate how to insert, delete, and replace strings at different positions in a text. Independent practice problems are given at the end to have students apply the word processing operations.

Uploaded by

pakghost22
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/ 19

Lecture# 04

Data Structure & Algorithms

By
Engr. Mohammad Nawaz
Lecturer at CSE&S Department
Balochistan UET khuzdar
Data Structure & Algorithms
CLO-1(PLO-1) 2
Previous Lecture Review
• String Definition
• Memory Representation
• Operations of String
– Substring
– Indexing
– Length
– Concatenation

Data Structure & Algorithms


CLO-1(PLO-1) 3
Today’s Lecture Outline:
• Word Processing
• Operations of word processing
– Insertion
– Deletion
– Replacement
• Examples

Data Structure & Algorithms


CLO-1(PLO-1) 4
Lecture Objectives
At the End of this Lecture You will be able to
• Describe word processor and word processing.
• Operations of word processing.

Data Structure & Algorithms


CLO-1(PLO-1) 5
Word Processing
• Past Word Processing Machine

• Present word Processing Machine

Data Structure & Algorithms


CLO-1(PLO-1) 6
Word Processing
• Word processing is the phrase used to
describe using a computer to create, edit, and
print documents.
• Editing means making necessary changes to
Existing Document.
• To perform word processing, you need a
computer, a special program called a
word processor,

Data Structure & Algorithms


CLO-1(PLO-1) 7
Example’s of Word Processing Software
Microsoft Office Suite Notepad

Portable document format(Pdf) Google Docs

Data Structure & Algorithms


CLO-1(PLO-1) 8
Word Processing Operations
• Basic Operations of word Processing
• Insertion
• Deletion
• Replacement

Data Structure & Algorithms


CLO-1(PLO-1) 9
1.INSERTION
• To insert or add a string to another string or text.

Formula
Insert = (text, position, string)

Data Structure & Algorithms


CLO-1(PLO-1) 10
Example of Insertion
Suppose M be a String variable such that
M= “A STUDENT”

0 1 2 3 4 5 6 7 8 9

M A S T U D E N T \0

INSERT(M, 2, “GOOD□”)
THEN
M=”A GOOD STUDENT”
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

M A G O O D S T U D E N T \0
Data Structure & Algorithms
CLO-1(PLO-1) 11
2. Deletion
To delete or remove number of characters from string with
given position.

Formula
DELETE (string, position, length)

Data Structure & Algorithms


CLO-1(PLO-1) 12
Example of Deletion
Suppose S be a String variable such that
S= “A GOOD STUDENT”
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

S A G O O D S T U D E N T \0

DELETE (S, 2, 5)
then
= (“A STUDENT”)
0 1 2 3 4 5 6 7 8 9

S A S T U D E N T \0
Data Structure & Algorithms
CLO-1(PLO-1) 13
3.Replacement
Replacing one string in the text by another.
Formula

REPLACE(text, pattern1, pattern2)

Old Text
New Text

Data Structure & Algorithms


CLO-1(PLO-1) 14
Example of Replacement
REPLACE(“XABYZ”, “AB”, “C”)
THEN
(“XCYZ”)

Data Structure & Algorithms


CLO-1(PLO-1) 15
Word Processing Examples
• Suppose Y is the Text “We are students of BUETK”. Use
Word Processing Operation to change Y so that it read
as:
• We are good students of BUETK.
INSERT(Y, 8, ”GOOD□”)
• We are students of CSES.
REPLACE(Y, ”BUETK”, ”CSES”)
• We are students.
DELETE(Y, “16”, 8)
Data Structure & Algorithms
CLO-1(PLO-1) 16
Independent Practice
Suppose M be a character variable such that
M=’WE ARE MUSLIMS AND STUDYING COMPUTER
ENGINEERING’.
USE WORD PROCESSING OPERATIONS TO CHANGE M SO
THAT IT READS:
1. I AM MUSLIM AND STUDYING COMPUTER ENGINEERING.
2. WE ARE MUSLIMS AND STUDYING.
3. WE ARE MUSLIMS, STUDYING COMPUTER ENGINEERING.
4. I STUDYING COMPUTER ENGINEERING.
5. WE ARE MUSLIMS AND STUDYING COMPUTER &
ELECTRICAL ENGINEERING.
Data Structure & Algorithms
CLO-1(PLO-1) 17
ANY QUESTION

Data Structure & Algorithms


CLO-1(PLO-1) 18
Data Structure & Algorithms
CLO-1(PLO-1) 19

You might also like