Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Sant Baba Bhag Singh Institute of Engineering and Technology

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 104

SANT BABA BHAG SINGH INSTITUTE OF

ENGINEeRING AND TECHNOLOGY

FUNDAMENTAL OF COMPUTER PROGRAMMING


AND INFORMATION TECHNOLOGY

In the partial fulfillment of B.Tech (CSE)

Submitted To: Submitted By:

INDEX
1
SR NO. PRACTICAL NAME PAGE REMARKS
NO.

1. Familiarization of the computer 4-7


system and on hand practice on
power on and power off.

2. Loading window, closing, 8-16


maximizing, icon shifting &
ordering.

Changing drives and searching files


3. 17-23
and understanding file extensions.

4. Saving files protecting and 24-27


unprotecting

Formatting floppies and practice on


5. 28-36
virus recognition and protection.

Practice with file manager & control


6. 37-47
panel.

Practice with MS-Word, operating


7. and closing document, Preparation 48-59
of document, setting of document,
familiarization with various tools,
mail-merge practice.
Practice with C++ with the help of
8. 60-100
simple exercises giving on hand
practice and understanding of
various features.

9. INTERNET BROWSING 101-104


Practical 1: Familiarization of the computer system and on hand practice on
power on and power off.

Hardware (comper), equipment involved in the function of a computer. Computer hardware consists of
the components that can be physically handled. The function of these components is typically divided
into three main categories: input, output, and storage. Components in these categories connect to
microprocessors, specifically, the computer’s central processing unit (CPU), the electronic circuitry that
provides the computational ability and control of the computer, via wires or circuitry called a bus.

Software, on the other hand, is the set of instructions a computer uses to manipulate data, such as a
word-processing program or a video game. These programs are usually stored and transferred via the
computer's hardware to and from the CPU. Software also governs how the hardware is utilized; for
example, how information is retrieved from a storage device. The interaction between the input and
output hardware is controlled by software called the Basic Input Output System software (BIOS).

Although microprocessors are still technically considered to be hardware, portions of their function are
also associated with computer software. Since microprocessors have both hardware and software aspects
they are therefore often referred to as firmware

The main parts of a computer that we'll be focusing on are the Power Supply, Access Slots,
Motherboard, Hard Drive, CPU, RAM, CD-Rom, and Floppy Drive.

First, let's look at two simple diagrams of the inside of a computer.

3
Quickly, you may recognize some parts of you computer just from these simple diagrams. The first
diagram is of a tower computer, which currently is popular for the home PC. The second diagram is a
desktop computer, which normally is used for space as you can easily place the monitor on top of it and
have the whole computer compact in one easy spot.

POWER SUPPLY
The power supply is vital to the computer as it is the source of power. The power supply is usually a
small metal box in the top corner of a case (tower).

ACCESS SLOTS
Access slots or expansion slots are openings in a computer where a circuit board can be inserted to add
new capabilities to the computer. Examples of drives that may go here would be modems, USB drives,
networking cards, video adapters, and sound cards. These expansions are easy to install along with being
very useful to your computer to allow you to do new things, such as network computers together.

4
MOTHERBOARD
The motherboard has been an integral part of most personal computers for more than 20 years. The
motherboard contains various circuit cards performing various functions all plug into many similar
sockets on a common circuit board. Each circuit card performs a unique function in the computer and
gets its power from the socket.

The motherboard contains many circuits and slots, but let's focus on some of the important ones. The
motherboard is home to the processor (CPU) along with the access slots and RAM.

If we look at the diagram above I've labeled the parts of the motherboard that I wanted to discuss. The
objects labeled 1 are the access slots. 2 is the processor slot and 3 are slots to hold memory (RAM).

CPU
The CPU, or processor, is the heart of your computer no matter what type (PC, Server, and Laptop).
There are many brands for processors such as Intel and Athlon all with different processors for your
computer. The CPU processes everything that your computer does, therefore the better the processor, the
faster the computer.

RAM
Random Access Memory (RAM) is the form of memory contained in most computers. RAM is
considered "random access" because you can access any memory cell directly if you know the row and
column that intersect at that cell. When an application is running it stores its information in the RAM.
When you close the application the information is deleted from the RAM. This is why you need certain
amounts of RAM to run applications. The more RAM you have the faster your computer will be, and the
more applications you'll be able to run without loosing speed.

HARD DRIVE
Nearly every desktop computer and server in use today contains one or more hard-disk drives. These
hard disks do one thing well - they store changing digital information in a relatively permanent form.
They give computers the ability to remember things when the power goes out.

A hard drive stores all your files and information in a permanent form unlike storing it in RAM (which
is temporary). The larger your hard disk (drive) the more information and files you're able to store.
Today's average hard drive is 40 GB although slowly 80 GB hard drives are becoming used more often.

5
CD-ROM
The CD-Rom is quite simple, it reads CD's. CD-Rom completely stands for Compact Disk Read Only
Memory. The revolution of CD's is that they hold much more data than a floppy disk, although are not
as flexible when it comes to rewriting and storing personal data.

Using CD-RW you can make your own CD's and use them more like a floppy disk. These are becoming
more and more popular although you still need a CD-Rom to read them.

FLOPPY DRIVE
A floppy drive reads the popular floppy disk. Floppy disk are easy to use, rewritable, compact, and great
for storing information. The floppy drive is simple and allows you to read, write to, and write over
information stored on a floppy disk.

Now you have a basic knowledge of the parts of your own PC. In the future you'll be able to read more
advanced articles and have an understanding of the parts of a PC.

STEPS TO SWITCH ON THE COMPUTER:

1) Switch on the UPS.


2) Switch on the monitor.
3) Press the power key of the CPU to start the machine.

STEPS TO SWITCH OFF THE COMPUTER:

1) Click on START.
2) Select TURN OFF YOUR COMPUTER OPTION option.
3) Click on SHUT DOWN to turn off.
4) Switch off the monitor.
5) Switch off the UPS.

6
Practical 2: Loading window, closing, maximizing, icon shifting & ordering.

To start Windows installation: Put Windows XP CD and restart your computer. You will see “Press any
key to boot from CD …” so you must push any button on your keyboard to proceed.

Now Windows XP installation will start by itself. Please pay attention to the lower part of the screen.
Important commands will be displayed that you need to use in installation process.

If drivers for hard disk controller (SATA, SCSI) is needed, you must press “F6” and do three following

steps:
1. Insert diskette and press “Enter”
2. Choose adequate driver and press “Enter”

7
3. Press “Enter” to continue installation process

In this windows press “Enter” to continue the installation or press “F3” to cancel the installation

8
Then follows Windows Xp license, and if you agree with these rules and want to continue installation
press “F8”, but if you don’t agree and want to cancel installation press “F3”

If you install Windows XP in computer that already have installed Windows XP, then you will see
window and I recommend press “Esc” (don’t repair) in it. If you choose to press “R” than only the
windows files will be rewrited and viruses will stay in your computer. So press “Esc”

In this step we can divide disk in many pieces (partitions) if you need it.
1. If there is any partitions you can delete the with “D”
2. With “C” you can create new partitions
Choose partition where you want to install Windows XP and press “Enter”

9
Choose file system what you want format your disk. I usually advise to choose NTFS. If you don’t want
to wait long time you can choose NTFS (Quick) and press “Enter”

Your hard disk will be formatted and after that files will be copied to your hard disk. When all files will
be copied, computer will restart.

After restart don’t press any key when you see “Press any key to boot from CD …” Just wait and
Windows installation will continue.

10
After some time a windows will appear “Regional and Language Options”. Click customize if needed,
but if you don’t need to customize click “Next” to continue Windows XP installation. You can
customize it later after installation if you want.

Fill the fields Name and Organization, when it is done click “Next”

11
Write in your Windows XP license number (serial) and click “Next”

Fill the computer’s name and administrator’s password if needed. Then click “Next”
12
Choose your time zone and make sure that clock is correct. Then click “Next” Windows XP installation
will continue after that.

13
If you want to configure network’s configurations you can do it here, but you can do it after installation
as well. So you can choose ‘Typical settings’ and click “Next”. In next window click “Next”

Windows XP installation will continue and after that computer will restart again.

After booting in follow short wizard that offer you to activate windows and create user accounts.

Then choose “skip” and about windows registering in their site you can answer “No”

14
So you finally have installed Windows XP in your hard drive by now.

Important things to do after installation:


1. Please install firewall and antivirus before you plug in your internet cable.
2. After the installation process of Windows XP you can continue installing drivers and any software
you need.

MINIMIZING & MAXIMIZING WINDOW

A window can be maximized and minimized by clicking the minimize and maximize button. are
displayed on the right-top corner of the window on the title bar. A minimized button has hyphen (-)
symbol when u click it, windows will be iconized and icon will be moved to the task bar of the Desktop.
A maximize button is a small rectangular area (). When you click it, then your windows will occupy
whole monitor screen i.e. it will cover up the whole desktop.

CLOSING WINDOW

If you do not want to work more with your opened window, then you can close it by clicking the close
button, close button is next to the maximize button on the right top corner of the title bar. It has X
(cross0 sign in the small rectangular box. It is also called cross icon.

15
ICON SHIFTING & ORDERING

Drag and Drop is an action which helps the user to copy and to move an icon or an object from one
window to another, one folder to another etc. To drag & Drop an object on to another object is to move
the mouse pointer onto the source icon or source object which you want to drag, the by pressing down
the mouse left button, holding it down, move towards the destination object. When your dragged object
moves onto destination object, then drop the source object onto the target object by removing your
hands from the mouse button. So, dropping is to release of the mouse button from the target position
when you completely drag an object.

Ordering of icons on the Desktop is done by right clicking the mouse on the blank area of Desktop. Then
from the pop-up menu so displayed, select the ‘Arrange icons by’ option. From the further displayed
menu you can choose any one option according to which you want to arrange the icons and the various
options for ordering are: Arrange icon by-name, size, and type, modified.

Practical 3: Changing drives and searching files and understanding file extensions.

Changing Drives

Above you can see the three different types of drives, floppy drives, hard drives and network connected
drives. The floppy drive is located in the front of the machine. This is where you insert your 3.5 inch
disk. The hard drives are contained inside the machine. They have much more capacity than a floppy
drive, and are considerably faster. The hard drives contain the local system information for the particular
machine. The final type of drive is a network connected drive. These drives reside inside another
computer and are accessed via the network. The network drives typically contain programs that are run
by all of the machines on a network.

A directory window shows the directory structure of the current drive. The icon for the current drive is
surrounded by a rectangle. You can change drives by clicking on another drive icon in the directory
window. Double clicking a drive icon will display it without closing your current drive. You can also
open a drive by using the Select Drive command on the disk menu. When you change to a different
drive, the names of the files and directories on that drive are displayed in the directory window.

16
This is file manager with multiple drives being displayed:

Moving or Copying Files and Directories

To move files and folders from one folder to another, simply select the files hat are going to be moved.
Then hold down the left mouse button and 'drag' the files to the destination folder. The folder with
become highlighted when you have placed the mouse in the correct location. Once you have highlighted
the destination, release the mouse button. The system will ask if you want to move the files. If you are
certain that this is what you want to do, then click on the yes button. Otherwise click on the no button.

17
Copying files works the same as moving the files, with a few small differences. First of all, you must
hold down the SHIFT key when copying files. This will cause a '+' to appear in the pointer. This
indicates that you are going to copy files, not move them. To copy files, follow the same steps as above,
but hold the SHIFT key while releasing the mouse button.

18
It is possible to copy and move files from one drive to another. To do this, simply make certain that the
files you want to copy and the destination folder are both visible on the screen. You then select the files
to move or copy, and drag them to the destination. When moving files between drives, you must hold
down the CTRL key. NOTE: The default action for operations on the same drive is to move the files.
The default action for operations between drives is to copy the files.

Searching for files


If you don't remember which folder you saved a file in, you can search for it. To search for a file

Click Start, and then click Search.

19
In the left pane, click the type of file you want to search for, or click All files and folders.

Based on the type of file you chose to search for, specify your criteria. If you know part of the file
name, type it. Then click Search.

20
Windows XP searches your computer, which may take several minutes. Windows XP then displays
the search results, which you can browse just like files in a folder. Once you are done searching, click
Yes, finished searching.

If you want to view any of the search results, double-click the file and it will open in the relevant
application. You can do this as many times as necessary to find the file you need.

File extensions:--

 (.pdf)
21
The PDF file type is primarily associated with 'Acrobat' by Adobe Systems Incorporated.Adobe
Acrobat is a family of computer programs developed by Adobe Systems, designed to view,
create, manipulate and manage files in Adobe's Portable Document Format (PDF).

 (.mp4)
The MP4 file type is primarily associated with 'MPEG-4'. Play MP4 files with various players.
 (.flv)
The FLV file type is primarily associated with 'Flash' by Adobe Systems Incorporated.Adobe
Flash, initially known as Shockwave Flash and popularly called simply Flash, refers to both the
Adobe Flash Player and to the Adobe Flash Professional multimedia authoring program.
 (.rar)
The RAR file type is primarily associated with 'WinRAR' by RarLab. 

 (.doc)
The DOC file type is primarily associated with 'Word' by Microsoft Corporation.Office Word is
an authoring program that gives you the ability to create and share documents using a set of
writing tools.
 (.pps)
The PPS file type is primarily associated with 'PowerPoint' by Microsoft Corporation.
 (.dat)
The DAT file type is primarily associated with 'Data'. Can be just about anything: text, graphic,
or general binary data. There is no specific structure for a .DAT file
 (.exe)
EXE is short for "executable" and is the standard file extension used by Windows programs.
Therefore, whenever you double-click or open an EXE file in Windows, it will run a program.

 (.dos)

External command file (1st Reader) Network driver (eg. pkt_dis.dos). Text file
containing DOS specific info
 (.java)
22
Program written in the Java programming language, developed by Sun Microsystems; uses an
object-oriented approach, where data types are defined as objects; may contain the entire code
for a single program or may be one of many source code files referenced by a Java development
project.
 (.jpeg)
JPEG image files are commonly used for Web graphics and are produced by nearly all digital
cameras. They are saved in a compressed format that supports millions of colors, making them
ideal for digital photographs.

Practical 4: Saving files protecting and unprotecting.


Saving Files

23
When you save a file, you must pay close attention to several things at once. You must first notice which
disk drive you are saving to. Secondly, you must be concerned with which folder you are saving to
within that drive. Finally, you must give the file a meaningful filename and let the application handle the
extension for you.

Save As

When you first save a file, you are presented with a “Save As” dialog box. This box gives you all the
controls you need to specify exactly where and under what name your file is saved. Windows itself
provides a generic Save As dialog that can be used by applications, such as that from Notepad as shown
below.

Selecting a Drive

24
Perhaps the most important new feature is the buttons on the left-hand side that permit easy selection of
the saving location. “My Documents” is the most common location, If you are working directly off
removable media such as a Zip drive, or looking for a particular area, it is best to click on the button
labeled with the machine name, e.g., CTLdev in the above graphic.

While picking a saving location is easier with Windows 2000 than before, it is well to realize that the
“Save As” dialogs always have some default drive, folder and filename to which, if you simply click the
“Save” button, they will save your file. The problem is they only give you a clear look at the filename
and folder portion. They don’t immediately indicate where the folder is located. It could be on any drive,
and it could be at the root of that drive or in some folder or sub-folder. Since, for example, you could
have any number of “Scratch” folders, even on a single drive (provided they were in separate folders
themselves), it becomes very important to know which “Scratch” you are viewing.

An attempt has been made to configure the lab’s applications to automatically select the My Documents
(i.e., H:\My Documents) by default. However, many programs insist on defaulting to whatever drive and
folder was used last. So, unless you are sure, you need to check; otherwise, you may end up saying,
“The computer lost my file!”

There are two basic methods of determining the location to which you are saving. One method uses the
mouse and the other the keyboard; once you know them both, you may use whichever suits your
situation, or even some combination of the two.

How to Password Protect Files in Windows

It's too bad there is no obvious method to add a password to a file on a Windows XP system. But there
are several ways to get the job done, with varying levels of inconvenience. Let's look at a few ways to do
password protection:

If you have Microsoft Office, you can protect your documents with a password. To do so, first open the
document. In Office 2007, click the Office button, move the cursor down toPrepare, then click Encrypt
Document. (In older Office versions: Click Tools, thenProtect Document.) Now enter a password in
the dialog box and press OK. Re-enter the password and press OK again. The next time you try to open
the document, you will be prompted for this password.
25
So what if you don't have MS Office, or you want to protect something that's not an Office document?
There are hidden files in Windows, but anyone with a mouse and a few brain cells to rub together can
easily find hidden files.

Password Protection Via Compressed Files

There is another way to add password protection to any file on a Windows XP system. It involves using
compressed (zipped) folders, and it a little clunky, but it works for all files, not just Office documents.

To begin, open Windows Explorer and navigate to the file you want to protect. Right-click on the file,
select Send To, then select Compressed (zipped) Folder.

A new folder will be created, with an icon showing a zipper on a file. Double-click to open the zipped
folder, clickFile, then Add a Password. Enter the password twice and press OK. You're done, except
that you now have the original file, and the zipped file with password. So delete the original file. From
now on, when you open the zipped folder, Windows will prompt you for the password.

26
This way, you can have one password protected folder for all your sensitive files, instead of creating a
zipped folder for each file. To do so, right-click in the empty space on thedesktop (or in any open
folder), select New, and then click Compressed (zipped) Folder. Enter a name for the compressed folder,
press ENTER, and you'll see a new folder icon marked with a zipper. Add a password like we did above.
Now you can use drag and drop to move one or many files to the password protected folder.

27
Practical 5: Formatting floppies and practice on virus recognition and
protection.

How to format a floppy in windows

Step 1: Insert the floppy you would like to erase into the floppy drive of your computer.

Step 2: Click on the Start button, then click on run.

Step 3. The run dialog box should now be shown. Type explorer in the Open: field and press the OK
button. Alternatively, you can press down on the Windows key on your keyboard, which is generally
located between your left Control and Alt keys and looks like a small flag, and while holding that key
down press once on the letter E.

Both methods will open Windows Explorer . After Windows Explorer is opened you should see a
screen similar to Figure 1 below.

Step 3: Click once on My Computer as show in Figure 1 above to highlight it.

Step 4: Click once on the Floppy Drive, usually the A: drive. It should now be highlighted.

28
Step 5: Click on the File menu and then click on the Format option as shown in Figure 2 below.

Step 6: After you click once on Format as shown in Figure 2 above. You will see a screen similar to
Figure 3 below.

Step 7: Type in a descriptive name in the Volume Label field for this floppy or leave it blank. This is
optional, so it is up to you.

Step 8: Place a checkmark in the Quick Format box designated by the red box in Figure 3 above.
29
Step 9: Press the Start button. You will get a confirmation box as shown in Figure 4 below.

Step 10: If you want to continue formatting this floppy press the OK button, otherwise press Cancel.

Step 11: Windows will now format your floppy. If it has problems Quick Formatting the floppy, then it
will tell you so, you should tell it continue formatting the floppy. When it is done formatting, you will be
presented with a screen as shown in Figure 5 below telling you the format is complete.

Step 12: Press OK and then Close.

Your floppy is now ready to be used.

Virus Recognition and Protection

Virus (computer), a self-duplicating computer program that spreads from computer to computer,
interfering with data and software. Just as biological viruses infect people, spreading from person to
person, computer viruses infect personal computers (PCs) and servers, the computers that control access
to a network of computers. Some viruses are mere annoyances, but others can do serious damage.
Viruses can delete or change files, steal important information, load and run unwanted applications, send
documents via electronic mail (e-mail), or even cripple a machine’s operating system (OS), the basic
software that runs the computer.

30
HOW INFECTIONS OCCUR

A virus can infect a computer in a number of ways. It can arrive on a floppy disk or inside an e-mail
message. It can piggyback on files downloaded from the World Wide Web or from an Internet service
used to share music and movies. Or it can exploit flaws in the way computers exchange data over a
network. So-called blended-threat viruses spread via multiple methods at the same time. Some blended-
threat viruses, for instance, spread via e-mail but also propagate by exploiting flaws in an operating
system.

Traditionally, even if a virus found its way onto a computer, it could not actually infect the machine—or
propagate to other machines—unless the user was somehow fooled into executing the virus by opening
it and running it just as one would run a legitimate program. But a new breed of computer virus can
infect machines and spread to others entirely on its own. Simply by connecting a computer to a network,
the computer owner runs the risk of infection. Because the Internet connects computers around the
world, viruses can spread from one end of the globe to the other in a matter of minutes.

TYPES OF VIRUSES

There are many categories of viruses, including parasitic or file viruses, bootstrap-sector, multipartite,
macro, and script viruses. Then there are so-called computer worms, which have become particularly
prevalent. A computer worm is a type of virus. However, instead of infecting files or operating systems,
a worm replicates from computer to computer by spreading entire copies of itself.

Parasitic or file viruses infect executable files or programs in the computer. These files are often
identified by the extension .exe in the name of the computer file. File viruses leave the contents of the
host program unchanged but attach to the host in such a way that the virus code is run first. These
viruses can be either direct-action or resident. A direct-action virus selects one or more programs to
infect each time it is executed. A resident virus hides in the computer's memory and infects a particular
program when that program is executed.

Bootstrap-sector viruses reside on the first portion of the hard disk or floppy disk, known as the boot
sector. These viruses replace either the programs that store information about the disk's contents or the

31
programs that start the computer. Typically, these viruses spread by means of the physical exchange of
floppy disks.

Multipartite viruses combine the abilities of the parasitic and the bootstrap-sector viruses, and so are
able to infect either files or boot sectors. These types of viruses can spread if a computer user boots from
an infected diskette or accesses infected files.

Other viruses infect programs that contain powerful macro languages (programming languages that let
the user create new features and utilities). These viruses, called macro viruses, are written in macro
languages and automatically execute when the legitimate program is opened.

Script viruses are written in script programming languages, such as VBScript (Visual Basic Script) and
JavaScript. These script languages can be seen as a special kind of macro language and are even more
powerful because most are closely related to the operating system environment. The 'ILOVEYOU' virus,
which appeared in 2000 and infected an estimated 1 in 5 personal computers, is a famous example of a
script virus.

Strictly speaking, a computer virus is always a program that attaches itself to some other program. But
computer virus has become a blanket term that also refers to computer worms. A worm operates entirely
on its own, without ever attaching itself to another program. Typically, a worm spreads over e-mail and
through other ways that computers exchange information over a network. In this way, a worm not only
wreaks havoc on machines, but also clogs network connections and slows network traffic, so that it takes
an excessively long time to load a Web page or send an e-mail.

ANTI-VIRAL TACTICS

32
Preparation and Prevention

Computer users can prepare for a viral infection by creating backups of legitimate original software and
data files regularly so that the computer system can be restored if necessary. Viral infection can be
prevented by obtaining software from legitimate sources or by using a quarantined computer—that is, a
computer not connected to any network—to test new software. Plus, users should regularly install
operating system (OS) patches, software updates that mend the sort of flaws, or holes, in the OS often
exploited by viruses. Patches can be downloaded from the Web site of the operating system’s developer.
However, the best prevention may be the installation of current and well-designed antiviral software.
Such software can prevent a viral infection and thereby help stop its spread.

Virus Detection

Several types of antiviral software can be used to detect the presence of a virus. Scanning software can
recognize the characteristics of a virus's computer code and look for these characteristics in the
computer's files. Because new viruses must be analyzed as they appear, scanning software must be
updated periodically to be effective. Other scanners search for common features of viral programs and
are usually less reliable. Most antiviral software uses both on-demand and on-access scanners. On-
demand scanners are launched only when the user activates them. On-access scanners, on the other
hand, are constantly monitoring the computer for viruses but are always in the background and are not
visible to the user. The on-access scanners are seen as the proactive part of an antivirus package and the
on-demand scanners are seen as reactive. On-demand scanners usually detect a virus only after the
infection has occurred and that is why they are considered reactive.

Antivirus software is usually sold as packages containing many different software programs that are
independent of one another and perform different functions. When installed or packaged together,
antiviral packages provide complete protection against viruses. Within most antiviral packages, several
methods are used to detect viruses. Checksumming, for example, uses mathematical calculations to
compare the state of executable programs before and after they are run. If the checksum has not
changed, then the system is uninfected. Checksumming software can detect an infection only after it has

33
occurred, however. As this technology is dated and some viruses can evade it, checksumming is rarely
used today.

Most antivirus packages also use heuristics (problem-solving by trial and error) to detect new viruses.
This technology observes a program’s behavior and evaluates how closely it resembles a virus. It relies
on experience with previous viruses to predict the likelihood that a suspicious file is an as-yet
unidentified or unclassified new virus.

Other types of antiviral software include monitoring software and integrity-shell software. Monitoring
software is different from scanning software. It detects illegal or potentially damaging viral activities
such as overwriting computer files or reformatting the computer's hard drive. Integrity-shell software
establishes layers through which any command to run a program must pass. Checksumming is
performed automatically within the integrity shell, and infected programs, if detected, are not allowed to
run.

Containment and Recovery

Once a viral infection has been detected, it can be contained by immediately isolating computers on
networks, halting the exchange of files, and using only write-protected disks. In order for a computer
system to recover from a viral infection, the virus must first be eliminated. Some antivirus software
attempts to remove detected viruses, but sometimes with unsatisfactory results. More reliable results are
obtained by turning off the infected computer; restarting it from a write-protected floppy disk; deleting
infected files and replacing them with legitimate files from backup disks; and erasing any viruses on the
boot sector.

VIRAL STRATEGIES

The authors of viruses have several strategies to circumvent antivirus software and to propagate their
creations more effectively. So-called polymorphic viruses make variations in the copies of themselves to
34
elude detection by scanning software. A stealth virus hides from the operating system when the system
checks the location where the virus resides, by forging results that would be expected from an
uninfected system. A so-called fast-infector virus infects not only programs that are executed but also
those that are merely accessed. As a result, running antiviral scanning software on a computer infected
by such a virus can infect every program on the computer. A so-called slow-infector virus infects files
only when the files are modified, so that it appears to checksumming software that the modification was
legitimate. A so-called sparse-infector virus infects only on certain occasions—for example, it may
infect every tenth program executed. This strategy makes it more difficult to detect the virus.

By using combinations of several virus-writing methods, virus authors can create more complex new
viruses. Many virus authors also tend to use new technologies when they appear. The antivirus industry
must move rapidly to change their antiviral software and eliminate the outbreak of such new viruses.

VIRUS-LIKE COMPUTER PROGRAMS

There are other harmful computer programs that can be part of a virus but are not considered viruses
because they do not have the ability to replicate. These programs fall into three categories: Trojan
horses, logic bombs, and deliberately harmful or malicious software programs that run within a Web
browser, an application program such as Internet Explorer and Netscape that displays Web sites.

A Trojan horse is a program that pretends to be something else. A Trojan horse may appear to be
something interesting and harmless, such as a game, but when it runs it may have harmful effects. The
term comes from the classic Greek story of the Trojan horse found in Homer’s Iliad.

A logic bomb infects a computer’s memory, but unlike a virus, it does not replicate itself. A logic bomb
delivers its instructions when it is triggered by a specific condition, such as when a particular date or
time is reached or when a combination of letters is typed on a keyboard. A logic bomb has the ability to
erase a hard drive or delete certain files.

Malicious software programs that run within a Web browser often appear in Java applets and ActiveX
controls. Although these applets and controls improve the usefulness of Web sites, they also increase a
vandal’s ability to interfere with unprotected systems. Because those controls and applets require that

35
certain components be downloaded to a user’s personal computer (PC), activating an applet or control
might actually download malicious code.

Practical 6: Practice with file manager & control panel.

36
The control panel is required to customize Windows based Operating systems environment by doing
some settings like adjusting screen display and its color settings, modem adjustment,
increasing/decreasing the speed of mouse, set/reset password, set key repeat rate, enhance the fonts and
their size etc.

Control panel is a Windows based operating systems application used for maintenance of your system.
The control panel is a folder full of icons. To operate any operation, control panel should be opened. In
the Control Panel, you can do the following operations:

Add Hardware - This icon will allow you to add new hardware that the windows operating system
does not recognize on it's own (which isn't much) . This control panel takes the form of a wizard,

37
so there is little to explain. This would be used to add excessively old hardware, or hardware on an old
computer.

Add or Remove Programs - It is vital that any Windows user be familiar with this control panel which
is used primarily for removing unwanted programs or adding/removing windows components (games,

38
system tools, etc.). There are three types of programs that you can install/use on Windows. The
first is a standalone executable, these are executables that simply launch a program; they never
have to be

installed. The second are programs that you must install, but do not make any registry entries
or add any Dynamic Link Libraries in the Windows Operating System. The third are programs that
you have to install, and that do make alterations to the system they are installed on. If a program
makes changes to the operating system it is very highly recommended that you use this program.

Date and Time - This control panel is for just what it says, changing the date, time, and/or time zone
on your computer. There is, however, one feature in this control panel that I highly recommend that

39
anyone, who is connected to a network, leave on at all times: Internet Time. This feature
synchronizes your computers clock with those on the internet, either Microsoft's or the
government's, on a regular basis so that your clock will not be out of sync.

Display - This control panel has all of the user specific visual customization for Windows. Here you
can switch backgrounds, alter environment colors, set font sizes, set screen savers, adjust
resolution and color depth, etc. Aside, you can alter you desktop drastically by changing the
"theme". Windows comes with two default themes, Classic, and XP, but you can find many more
online.

Folder Options - This control panel is mostly used to customize your experience while using Explorer
to browse through your systems files, but many of these settings have side effects in other
40
programs such as Internet Explorer since the programs are so tightly linked. Other things that you
can accomplish here are changing your file sharing mechanism to or from "Simple File Sharing,"
and altering file types and their associated programs.

41
Internet Options - These options control your default internet browser. Options you may want to
adjust in here are your homepage, cache size, history size, security preferences, and Internet
applications such as html editor or news group reader.

42
Network Connections - If you are having problems with your network connection then you should
come here and take a look at your settings. When you first open up this control panel you will see a
listing of network connections that you computer has configured. You may see several features on
these icons; a grayed-out icon means that connection is not active, and a red X on a connection means
that you do not have a valid connection. If the connection is active, does not have a red X, and you are
still having problems, you can click on the connection and repair the connection in the "Support"
tab.Advanced users can enter the properties and configure their network connection.

43
Printers and Faxes - This control panel is where you manage your printers. In this control panel you
can add a printer (network or local), share your printer, and troubleshoot your printer. The control panel
accomplishes this primarily through the use of wizards.

44
System Properties - This is, by far, the most important group of settings in the Control Panel. This
Control Panel controls such things as: General System Properties, Network ID, System Restore,
Remote Desktop, Automatic Updates, System Visual Settings, Virtual Memory, and Hardware Profiles.
This is the best place to come when trying to troubleshoot your workstation.

45
Taskbar and Start Menu - This control panel alters the settings for your taskbar and Start Menu. I
highly advise any user to take a look through these options since there are so manu ways to
significantly alter your Windows experience by changing a few of them. All of the changes discussed
on the previous two pages can be done here.

46
User Accounts - This is where you would come to create/delete users, change passwords, change
user cons, etc. If you are not an Administrator on your computer then you will can only change
your settings, and then only a limited group of them (whatever your Administrator allows). If
you need another settings altered you would need to consult your Administrator

47
Practical 7: Practice with MS-Word, operating and closing document, Preparation
of document, setting of document, familiarization with various tools, mail-merge
practice.

Introduction to MS-Word:

History-Evolution of Word:

Many concepts and ideas of word were brought from bravo, the original GUI word processor
developed at Xerox PARC. Bravo’s creator Charles Simonyi left Xerox PARC to work for Microsoft in
1981. Simonyi hired Richard Brodie, who had worked with him on Bravo, away from PARC that
summer. On February 1, 1983, development on what was originally named Multi-Tool Word began.

Having renamed it Microsoft Word, Microsoft released the program October 25, 1983, for the
IBM PC. Free demonstration copies of the application were bundled with the November 1983 issue of
PC World, making it the first program to be distributed on-disk with a magazine. However, it was not
well received, and sales lagged behind those of rival products such as WordPerfect.

Word featured a concept of “What You See Is What You Get”, or WYSIWYG, and was the first
application with such features as the ability to display bold and italics text on an IBM PC. Although MS-
DOS was a character based system, Microsoft Word was the first word processor for the IBM PC that
showed actual line breaks and typeface markups such as bold and italics directly on the screen while
editing, although this was not a true WYSIWYG system because available displays did not have the
resolution to show actual typefaces. Other DOS word processors, such as WordStar and WordPerfect,
used simple text-only display with markup codes on the screen or sometimes, at the most, alternative
colors.

Word 2007 is the most recent version of Word. This release includes numerous changes,
including a new XML-based file format, a redesigned interface, an integrated equation editor,
bibliographic management, and support for structured documents. It also has contextual tabs, which are
functionally specific only to the object with focus, and many other features like Live Preview (which
enables you to view the document without making any permanent change(s), Mini Toolbar, Super-
tooltips, Quick Access toolbar, SmartArt, etc.

48
File Formats:

Word document formats (.DOC) as of early 2000s were a de facto standard of document file
formats due to their popularity. Though usually just referred to as “Word document format”, this term
refers primarily to the range of formats used by default in Word version 2-2003. In addition to the
default Word binary formats, there are actually a no of optional alternate file formats that Microsoft has
used over the years. Rich Text Formats (RTF) was an early effort to create a format for interchanging
formatted text between applications. RTF remains an optional format for word that retains most
formatting and all content of the original document.

Later, after HTML appeared, Word supported an HTML derivative as an additional full-fidelity
roundtrip format similar to RTF, with the additional capability that the file could be viewed in a web
browser. Word 2007 uses the new Microsoft Office Open XML format as its default format, but retains
the older Word 97-2003 format as an option. It also supports (for output only) PDF and XPS format.

COMPONENTS OF WORD WINDOW

When user opens a Microsoft Word window on the screen, it has number of different parts. These parts
are given as under:

(a) Title Bar


(b) Menu Bar
(c) Tool Bar
(d) The Ruler
(e) Status Area or Status Bar
(f) Scroll Bar
(g) Frame
(h) Working Area or Document Window Area
(i) View Button Bar

49
The main ones are explained as below:

(a) Title Bar: The title bar of the MS-Word window displays the name of the program as “Microsoft
Word”. It also displays the name of the document, which is currently opened. If we are creating a
new document, then it will be “document1” in the title bar with the “Microsoft Word”. When after
typing the textual information you save the document by pressing the Ctrl+S key combination from
the keyboard, it will ask you for the name of the document. When you assign the name of the
document, it will replace “Document1” with your entered name. You can move the window
anywhere on the screen by moving the mouse to title bar. Here click the left mouse button once and
by holding the mouse, you drag it anywhere.
(b) Menu Bar: The next line or bar of the Word window contains the menu bar. Word’s menus are
pulled down from the Menu Bar, located across the top of the screen. The menu bar contains several
menu items on the menu pads. Various menus are File, Edit, View, Insert, Format, Tools, Table,
and Window and Help having menu pads. Menus are accessed by picking a menu name from the
menu pad with the mouse pointer or by pressing Alt+X key combination from the keyboard, where
X is the underlined letter in the menu name. On selecting a particular menu pad, Word displays the
corresponding pull-down menu. Once a menu is pulled down, you can pick one of the selections
with the mouse pointer or again by typing the underlined letter of the desired selection. These
50
various types of menu selections on the pull down menu are also called Menu commands. When a
menu command is highlighted, you can get Help information about that selected command by
pressing the Function key F1. Now we will study various Pull-down menus as:

1. File: The File menu displays several menu commands. The File menu is used to perform a variety of
file and printing operations. The main menu selections or commands in the File pull down menu are
New, Open, Close, Save, Save As…, Save All, Properties…, Templates…, Page setup…, Print
Preview, Print, Send, Exit and some currently used and saved document files.

We can create a new document by selecting New command or pressing the Ctrl+N key
combination from the keyboard. You can open an existing document by clicking the open menu
command and close it by selecting and clicking the close menu command or menu option. You can save
your text or document by clicking the Save Command. If you want to save your document in another
drive or directory, then click the Save As command. If you want to save all opened documents then
select the Save All command. The properties selection displays information about the current document.
You can set the templates by clicking the Templates command. You can set the size, margins and
orientation of a page by selecting Page setup command. You can print the document and also take print
preview before printing by selecting Print and Print Preview Commands respectively. You can send
your document to E-mail by selecting Send to command or option. Ellipses (…) following a menu items
or commands indicate that dialogue boxes appear after the menu selection that performs an operation.
Exit selection will quit the user from MS-Word. Word also displays recently saved files at the bottom of
the file menu. You can open a recently used file by picking it with mouse pointer or by typing the
corresponding number.

2. Edit: The Edit menu displays several menu selections as Undo, Clear, Repeat, Cut, Copy, Paste,
Paste Special, Select all, Find, replace, Go to, Auto text, and Book mark. The Edit Menu is used
to delete, Copy and move blocks of the text. It also includes Undo (to cancel last executed
command) and Repeat the selection (i.e. redo operation). It will also find and replace the text. The
paste special selections used to link pasted objects from other applications. You can move to any
page with the help of Go to command. The Bookmark selection inserts reference points within a
document. Auto text does the alignment of the text.

51
3. View: The View menu displays the menu commands such as Normal, Outline, Page Layout,
Footer, Footnotes, Annotations, and Zoom. The view menu lets you to display your document in
no. of ways including Normal, Outline, Page layout, Master Document(which gives you the
document’s underlying structure) and Full screen. You can select any one of these views and take
the decision which is better for the viewing the information or textual data. View can also turn off
and on the display of the tool bars, the ruler, footnotes and annotations. It can also zoom the page
size to different percentages. View is used to create, edit header and footers and also set.
4. Insert: The Insert menu displays the several menu commands of Break, Page Number,
Annotations, Date and Time, Field, Symbol, Form Field, Footnote, Caption, Cross-Reference,
Index and Tables, File, Frame, Picture, Object and Database. Insert selection gives you the
ability to insert a variety of things into your document. This menu is used to insert page and section
breaks, page numbers, the current date and time, footnotes, annotations, special symbols, forms,
files, pictures, frames, objects, including equations, databases and captions for figures, tables or
equations. You can also identify text for an index or table of contents.
5. Format: The Format menu displays menu commands like Font, Paragraph, Tabs, Bullets and
Numbering, Heading Numbering, Auto format, Style gallery, Style, Frame, Picture and
Drawing objects. The format menu lists options for setting and modifying various fonts, one or all
paragraphs formats, to set the borders and apply shading on Borders, to insert or delete columns, to
set Bullets and set the Numbers, to set heading numbering, to do auto formation, to apply various
style settings, set picture in text and apply drawing objects.
6. Tools: The Tool menu has the main selections as Spelling, Grammar, Thesaurus, Hyphenation,
Language, Word count, Auto correct, Mail Merge, Envelopes and Labels, Protect Document,
Revisions, Macro, Customize, and Options. In this the user can use the built in spelling checker,
grammatical error remover and Thesaurus. User can count the words in the document, set the special
characters corresponding to different languages, turns hyphenation on or off, prepares the envelopes
and labels, mail merge the documents, create and run macros, customize the various toolbars menus
and shortcut keys. It can also protect and unprotect document and set the many Word options.
7. Table: The Table menu displays the selections of Insert row, Delete row, Merge cells, Split cells,
Select row, Select column, Select table, Table Autoformat, Cell height and width, Headings,
Convert table or text, Sort, Formula, Split Table, and Gridlines.

52
8. Window: The window menu displays several menu commands like New Window, Arrange All,
Split, and some document filenames. The window menu is used to create, arrange and select
document windows when more than one document is open.
9. Help: The Help menu comprises of Microsoft Word Help topics, Answer Wizard, The Microsoft
Network, Word perfect Help, and about Microsoft Word. By using the help menu option, one can
review the information about Word operations. You can press F1 at any selection and get the
required help. We can use the Help index and search features to locate specific information. The
Answer Wizard can be useful for direct Help.
(c) Tool bars: Each Office application comes with a set of tool bars. Word 6.0 and its advanced
versions come with several predefined toolbars. Each tool bar has a set of tools that are appropriate
for a particular type of task. By default, the standard and Formatting toolbars are displayed but you
can display other toolbars at any time by selecting these from the View menu. You can also hide all
the toolbars if you want to see more of your document on the screen. The main toolbars in Word 6
for Windows 3.x (3.0/3.1/3.11) are standard, formatting, Border, Database, Drawing, Forms,
Microsoft, Word for Windows 2.0 and Tip Wizard .

PAGE SETUP (MARGINS AND GUTTERS):

Clicking the file menu displays the page setup command. The page setup command will set the
margins (top, bottom, left, right, set gutter), define the paper size and its orientations (portrait or
landscape), and find the paper source (tray and others) and set the page layout. To work with page
setup, first of all click the file menu and select page setup command. When you click this command,
a page setup dialog box will be displayed.

53
CHANGING STYLE, FONTS AND FONT STYLE:

Styles: Ms-Word comes with a number of built in styles (several paragraph styles and flow character
styles) that can be applied to both the document heading and normal text. A style is a named set of
formatting characteristics which can quickly and easily paragraph and character formatting to text.
You define the style by giving it a name and various paragraphs or character formatting properties.
The paragraph or selected text automatically takes on the formatting characteristics assigned to the
style. The primary purpose of style is to simplify and standardize formatting. You can create any
number of styles according to your requirement. Ms-Word has mainly two types of styles as:
Paragraph style and character styles. A paragraph style applies to an entire paragraph and
improves the paragraph’s appearance. Some common paragraph formatting characters are line
spacing, Indent icon, Tab stops, Border and Font properties. Every paragraph has a style. The default
paragraph style is called normal. Character style applies only to selection of text rather than the

54
entire paragraph but you can apply it to whole paragraph. Some common character Paragraph styles
are Type face, Face size, Bold, Italics and Underline.
Applying style to a text: You can apply a style to a paragraph before or after you type the text in the
paragraph. To apply style to a paragraph or character move the mouse pointer to the desired location
and highlight the text to which you want to apply style if text is already written otherwise when you
type the text, it will automatically take the selected style. Now select the style from the style drop-
down list in the Formatting toolbar. This list provides you a preview of each style within the list
including the type face and font characteristics. You can also apply style by pressing the
Ctrl+Shift+N key combination and to activate the Font drop-down list press the Ctrl+Shift+F key
combinations. Also we can apply style by selecting the style command from the Format menu.

55
PAGE BREAKS:

MS-Word automatically warps text to the following page based on page margins, paragraphs indents
and other criteria. You can insert a manual page break any time you want to force Word to start a
new page. To insert a page break, move the cursor where you want to set the page break. Now there
are two ways to set page breaks between the continuous texts. First you can select Break Command
from the Insert menu and click the break command. If it is not selected then you can click the Page
Break radio button and click the ok button form the break dialog box.

HEADERS AND FOOTERS:

Header and Footer appear at the top and bottom respectively of a document. Header is a special text,
which is often used for repeating the title of document from a page to page and entering page
numbers at the top of the document. Also graphics symbol can be displayed at Header. Title of the
book is shown on every page of the book work as Header. Footers are often used for the same
purpose but at the bottom of a document. You have to enter the text for a header or footer only once.
Headers and Footers are also useful for placing backgrounds and watermarks on a page.

Auto text:

Cut and Copy both store information on the Clipboard. Each time you store new information on the
Clipboard, the old information is lost. If you wish to store text permanently so you can use it
repeatedly, use Auto text. For this purpose following are the steps:

a. Type the following:


Auto text information is stored permanently.
b. Highlight “Auto text information is stored permanently.”
c. Choose Insert> Auto text> New from the menu.
d. Microsoft Word suggests a name. The suggestion displays in the dialogue box. Change the name by
typing AT in the Please Name Your Auto text Entry Field.
e. Click OK.
56
f. Click anywhere in the text area to remove the highlighting.
g. Place the cursor between the period in the sentence you just typed and the paragraph marker.
h. Press the spacebar twice to leave two blank spaces.
i. Type AT.
j. Press F3.
k. Your text should now read:
“Auto text information is stored permanently. Auto text is stored permanently.”

The Tab Key:


The default tab setting for Microsoft Word is .5 inches. When you press the Tab Key, the cursor moves
½ inches across the page and an arrow appears on the screen. The arrow is a non printing character,
when you print your document the arrow does not print. Press the Tab key a few times. Note how the
cursor moves across the page.

Printing the document file:


We can print a document, table, chart or any text or graphics materials from the document file. Note
that before using the Print command, document should be opened. Also note that before using the Print
command, you should take the view of your printed document using the print preview facility.

PREVIEWING Documents:

Previewing is the procedure to view the document before printing i.e. in other words Previewing a
document means viewing a screen representation of one or more pages before you print them. To print
preview a document, the procedure can be taken as:
a. Select the Print Preview option from the file menu. Alternatively, click on the Print Preview button on
the standard toolbar.
b. Use the magnifier button or select the Zoom options from the view menu to enlarge the document. When
you use Print Preview, several preview buttons are displayed on the Print Preview toobar

57
Background printing:
Some printing jobs take hours to complete. In such situations, you can use the background printing
utility offered by Word. Background printing enables you to do other things while the printer prints in
the background. You can also check and control the status of multiple print jobs. In background
printing, the system sends the print jobs to a file on the hard disk rather than directly to the printer. It
then sends it to the printer in the background.

MAIL MERGE

The term mail merge is typically used to describe the process of merging some form of address data
base with a form of letter to create a group of individual letters. It is a good feature of the Microsoft
Word. Mail merge is used to print letters, envelopes, mailing labels etc.
Mail merging uses two files. Actually Mail merging means to combine two different files in one
at the time of printing. Mail merge uses the main file or main document and picks the first Name,
address from the data files or label files and combine these file into one. Similarly it picks the second
address and combines it with general letter and creates the second letter. Again similarly it will
continue this process until last address in the data file.

58
How to create a mail merge file:

Mail merge list summarizes the steps involved in performing a mail merge operation:
a) Create the Main letter: It has the general body of letter.
b) Create the Data source: It has the label address of the letter.
c) Define merge files in the main document: User defines merge fields in the main document. These fields
tell the Ms-Word where to insert specific data items from the data source.
d) Merge the data with the Main document: when the main document and the data source are ready, you
can merge two. The result is a single document containing all the personalized documents with page
break separating one document from another.
e) Print the document: as all personalized documents are placed in a single document file, you can print all
documents in one operation.

Types of documents you can create:

The main document in a mail merge operation is the one that contains the boilerplate text and graphics,
which are the same in all resulting documents. There are few types of main documents used in Mail
merge:-
i. Form letter: when you want to create a form letter, Ms-Word merges the main document and the data
source to create a single document that contains all he personalized letters, with each letter in its own
section.
ii. Envelopes: Ms-Word automates the process of creating envelopes, enabling you to specify the envelope
type, print options and other variables.
iii. Labels: Word allows you to specify the type of label having size, number per page etc. and then creates
a main document consisting of page label. Each label cell contains the fields to insert the address
information. The resulting merged document contains multiple pages of labels all in one section.
iv. Catalog: a catalog is much like a form letter which has resulting merged document contains all the data
in one section instead of individual sections.

59
Practical 8: Practice with C++ with the help of simple exercises giving on hand
practice and understanding of various features.

1.Write a Programme to print HELLO

#include<iostream.h>
#include<conio.h>
void main()
{
cout<<"HELLO";
getch();
}

60
2. Write a Programme to print the product of two numbers.

#include<iostream.h>

#include<conio.h>

void main()

int a,b,multiply;

cout<<"enter the values of a and b";

cin>>a>>b;

multiply=a*b;

cout<<multiply;

getch();

61
3. Write a Programme to divide two numbers and print the result.

#include<iostream.h>

#include<conio.h>

void main()

int a,b,divide;

cout<<"enter the values of a and b";

cin>>a>>b;

divide=a/b;

cout<<divide;

getch();

62
4. Write a Programme to print the difference of two numbers.

#include<iostream.h>

#include<conio.h>

void main()

int a,b,differ;

cout<<"enter the values of a and b";

cin>>a>>b;

differ=a-b;

cout<<differ;

getch();

63
5. Write a Programme to print the mod of two numbers.

#include<iostream.h>

#include<conio.h>

void main()

int a,b,mod;

cout<<"enter the values of a and b";

cin>>a>>b;

mod=a%b;

cout<<mod;

getch();

64
6. Write a Programme to find average of 3 nos.
#include<iostream.h>

#include<conio.h>

void main()

int a,b,c,sum,avg;

cout<<"enter 3 nos";

cin>>a>>b>>c;

sum=a+b+c;

avg=sum/3;

cout<<"average="<<avg;

getch();

65
7. Write a Programme to swap two numbers.

#include<iostream.h>

#include<conio.h>

void main()

int a,b;

cout<<"Enter the value of a \n";

cin>>a;

cout<<"Enter the value of b \n";

cin>>b;

cout<<"Initially the value of a is "<<a<<"\n";

cout<<"Initially the value of b is "<<b<<"\n";

a=a+b;

b=a-b;

a=a-b;

cout<<"Finally the value of a is "<<a<<"\n";

cout<<"Finally the value of b is "<<b<<"\n";

getch();

66
67
8. Write a Programme to print the sum of two numbers.

#include<iostream.h>

#include<conio.h>

void main()

int a,b,sum;

cout<<"enter the values of a and b";

cin>>a>>b;

sum=a+b;

cout<<sum;

getch();

68
9. Write a Programme to print the greatest of three numbers input by the user.

#include<iostream.h>

#include<conio.h>

void main()

int a,b,c;

cout<<"Enter three numbers";

cin>>a>>b>>c;

if(a>b && a>c)

cout<<a<<" is greatest";

else if(b>a && b>c)

cout<<b<<" is greatest";

else

cout<<c<<" is greatest";

getch();

69
70
10 . Write a Programme TO Find wheather a number is palindrome or not

#include<iostream.h>

#include<conio.h>

void main()

{
clrscr();
int a,d,temp,rev=0;

cout<< "ENTER A NUMBER";

cin>>a;

temp=a;

while(temp>0)

d=temp%10;

temp/=10;

rev=rev*10+d;

if(rev==a)

cout<<a <<"IS PALIDROME";

else

cout<<"not PALIDROME";
getch();
}

71
72
11. WRITE A PROGRAMME TO ENTER A CHARACTER AND OUTPUT ITS
ASCII CODE

#include<iostream.h>

#include<conio.h>

void main()

clrscr();

char charac;

cout<<"Enter the character:"<<endl;

cin>>charac;

int num1=charac;

cout<<"The ASCII code for "<<charac<<" is "<<num1<<"."<<endl;

getch();

73
12. WRITE A PROGRAMME TO SHOW THE GRADE OF STUDENT WITH IF
AND ELSE IF

#include<iostream.h>

#include<conio.h>

void main()

clrscr();

int grade;

cout<<"Welcome to School year end\n\n";

cout<<"Enter your grade this year....\n\n";

cin>>grade;

if(grade>+80)

cout<<"A\nEXCELLENT!!\n\n";

else if(grade>=70)

cout<<"B\nGOOD!!\n\n";

else if(grade>=60)

cout<<"C\nNeed Practice!!\n\n";

else

cout<<"D\nFAil!!\n\n";

getch();

74
75
13. WRITE A PROGRAMME TO FIND REVERSE OF THE NUMBER

#include <iostream.h>
#include <conio.h>

void main()
{
clrscr();
long int num1,num2,rnum=0;
cout << "Enter an integer : " << endl;
cin>>num1;
num2=num1;
do
{
rnum=rnum*10;
int digit=num1%10;
rnum+=digit;
num1/=10;
}
while(num1);
cout << "The integer you typed is " << num2 << "." << endl;
cout << "The reversed integer is " << rnum << "." << endl;
getch();
}

76
77
14. Write a Programme to convert temperatures from Celsius to Fahrenheit and vice versa
#include <iostream.h>

#include <conio.h>

void main()

clrscr();

int choice;

float ctemp,ftemp;

cout << "1.Celsius to Fahrenheit" << endl;

cout << "2.Fahrenheit to Celsius" << endl;

cout << "Choose between 1 & 2 : " << endl;

cin>>choice;

if (choice==1)

cout << "Enter the temperature in Celsius : " << endl;

cin>>ctemp;

ftemp=(1.8*ctemp)+32;

cout << "Temperature in Fahrenheit = " << ftemp << endl;

else

cout << "Enter the temperature in Fahrenheit : " << endl;


78
cin>>ftemp;

ctemp=(ftemp-32)/1.8;

cout << "Temperature in Celsius = " << ctemp << endl;

getch();

79
15. WRITE A PROGRAMME TO FIND MATRIX TRANPOSE

#include<iostream.h>

#include<conio.h>

int main()

int a[10][10],i,j,m,n;

clrscr();

cout<<"Enter the rows and columns=";

cin>>m>>n;

cout<<"Enter the matrix =";

for(i=0;i<m;i++)

for(j=0;j<n;j++)

cin>>a[i][j];

cout<<"The Transpose of the matrix is=\n";

for(i=0;i<m;i++)

for(j=0;j<n;j++)

80
{

cout<<a[j][i]<<"\t";

cout<<endl;

getch();

return 0;

81
16. WRITE A PROGRAMME TO DO ADDITION OF MATRIX:

#include<iostream.h>

#include<conio.h>

#include<iomanip.h>

void main()

clrscr();

int m[3][3] = {{1,1,1},{2,2,2},{3,3,3}}, n[3][3] = {{1,1,1},{2,2,2},{3,3,3}};

int r, c;

cout<<"Matrix M\n--------\n";

for (r=0; r<3; r++)

for (c=0; c<3; c++)

cout<<setw(3)<<m[r][c];

cout<<"\n";

cout<<"\nMatrix N\n--------\n";

for (r=0; r<3; r++)

for (c=0; c<3; c++)

{
82
cout<<setw(3)<<n[r][c];

cout<<"\n";

cout<<"\nSum of Matrices\n--------\n";

for (r=0; r<3; r++)

for (c=0; c<3; c++)

cout<<setw(3)<<m[r][c] + n[r][c];

cout<<"\n";

getch();

83
84
17. WRITE A PROGRAMME FOR MULTIPLICATION OF MATRIX:

#include<iostream.h>

#include<conio.h>

#include<stdlib.h>

#include<iomanip.h>

void main()

clrscr();

int x[20][20], y[20][20], z[20][20], m, n, p, q, k, r, c;

cout<<"Enter size of matrix X (for row and column) :";

cin>>m>>n;

cout<<"\n\nEnter size of matrix Y (for row and column) ;";

cin>>p>>q;

if (n!=p)

cout<<"\n\nMultiplication is not possible.";

getch();

exit(0);

else

{
85
for (r=0; r<m; r++)

for (c=0; c<n; c++)

cout<<"Enter value of matrix X : ";

cin>>x[r][c];

for (r=0; r<p; r++)

for (c=0; c<q; c++)

cout<<"Enter value for matrix Y : ";

cin>>y[r][c];

for (r=0; r<m; r++)

for (c=0; c<q; c++)

z[r][c] = 0;

86
for (k=0; k<n; k++)

z[r][c] = z[r][c] + x[r][k]*y[k][c];

}}}

clrscr();

cout<<"Matrix X\n--------\n\n";

for (r=0; r<m; r++)

for (c=0; c<n; c++)

cout<<setw(5)<<x[r][c];

cout<<"\n";}

cout<<"\n\nMatrix Y\n--------\n\n";

for (r=0; r<m; r++)

for (c=0; c<n; c++)

cout<<setw(5)<<y[r][c];

cout<<"\n";

87
}

cout<<"\n\nMatrix Z\n--------\n";

for (r=0; r<m; r++)

for (c=0; c<n; c++)

cout<<setw(5)<<z[r][c];

cout<<"\n";

getch();

88
89
18. WRITE A PROGRAMME USING CLASS TO FIND THE WAGES OF
WORKER

#include<iostream.h>

#include<conio.h>

#include<stdio.h>

#include<string.h>

class worker

char wnm[25];

float hrwk,wrt;

float totwag;

float calwage();

public: void inputdata();

void showdata();
};
void worker:: inputdata()
{
clrscr();

cout<<"\n entername of worker";

cin>>wnm;

cout<<"\n enter hours worked";

cin>>hrwk;

90
cout<<"\n wages rate: ";

cin>>wrt;

totwag=calwage();

float worker:: calwage()

return hrwk*wrt;

void worker::showdata()

clrscr();

cout<<"\n name="<<wnm;

cout<<"\n wages rate="<<wrt;

cout<<"\nhours worked="<< hrwk;

cout<<"\n total wages="<< totwag;

void main()
{
worker w;
w.inputdata();
w.showdata();
getch();
}
91
92
19. WRITE A PROGRAMME TO COLLECT DATA OF STUDENT USING
STRUCTURE

#include<iostream.h>

#include<conio.h>

struct student

int a;

int cl;

char nm[20] ;

char fn[50];

float ma;

}s1 ;

void main()

clrscr ();

cout<<"Enter the name of the student=";

cin>>s1.nm;

cout<<"Enter the father name= ";

cin>>s1.fn;

cout<<"Enter the age of the student=";

cin>>s1.a;

cout<<"Enter the class";


93
cin>>s1.cl;

cout<<"Enter the marks";

cin>>s1.ma;

cout<<endl<<" The student data is "<<endl;

cout<<endl<<"Name of student is :"<<s1.nm;

cout<<endl<<"Name of father is :"<<s1.fn;

cout<<endl<<"Age of student is :"<<s1.a;

cout<<endl<<"Class is :"<<s1.cl;

cout<<endl<<"marks is :"<<s1.ma;

getch ();

94
20. WRITE A PROGRAMME TP FIND FACTORIAL OF A NUMBER USING
RECURSION

#include<iostream.h>

#include<conio.h>

void main()

clrscr();

int n,factorial(int);

cout<<"Enter the value of n :";

cin>>n;

cout<<"\n Factorial of"<<n<<"is:"<<factorial(n);

getch();

int factorial(int n)

int m;

if(n==1)

return (1);

else
95
{

m=n*factorial(n-1);

return(m);

96
21. WRITE A PROGRAMME TO PRINT FIBONACCI SERIES

#include<conio.h>

#include<iostream.h>

void main()

clrscr();

int n;

cout<<"enter the last limit for the series(>2)";

cin>>n;

int a=1,b=1,c=0;

cout<<a<<"\n"<<b<<"\n";

for(int i=1;i<=n-2;i++)

c=a+b;

cout<<c<<"\n";

a=b;

b=c;

getch();

97
98
22. WRITE A PROGRAMME TO PRINT TABLE OF A NUMBER:

#include<iostream.h>

#include<conio.h>

void main()

clrscr();

int n,i;

cout<<"\nEnter a Number :";

cin>>n;

for(i=1; i<=10; ++i)

cout<<"\n "<<n<<”*”<<I<<”= ”<<n*i;

getch();

99
100
9. INTERNET BROWSING

Internet:

The internet is a network of computer networks that makes it possible for any computer connected to it
to send and receive data from any other computer connected to it. America Online, CompuServe, etc. are
examples of Internet service providers. They make it physically possible for users to send and access
data from the Internet. They allow you to send and receive data to and from their computers or routers
which are connected to the Internet. It supports:

 Multimedia Information (text, movies, pictures, sound, programs…).


 Hypertext Information (information that contains link to other information resources).
 Graphic user Interface (so users can point and click to request information instead o typing in
text commands).

The server software for the World Wide Web is called HTTP server (or informally a Web server).
Examples are Mac HTTP, CERN HTTP, and NCSA HTTP. The client software for World Wide Web is
called a Web Browser. Examples are: Netscape, Internet Explorer, and Lynx. These examples are
particular “brands” of software that have a similar function, just like Lotus 123 and Excel are both
spreadsheet software packages.

There are many different information protocols/services besides HTTP (HyperText Transfer Protocol).

Some of these are:

 E-mail (STMP) - for sending information electronic mail messages.


 Usenet News (NNTP) – for having electronic group discussions.
 File Transfer Protocol (FTP) – for transferring files between computers.
 Telnet – for running programs on remote computers.
 WAIS – for searching remote collections of indexed information
 Gopher – for browsing remote text information through a menu interface.

101
The internet has actually redefined the concept of information resources and the process of conducting
research. Today, the term information resource encompasses not only materials available in libraries
such as books, periodicals, and audiovisual materials, but also includes e-mail messages stored in
discussion group archives, electronic books, online magazines, journals and encyclopedia articles from
Internet-accessible databases or research services, sound files, maps, digital photographs, streaming
audio or video files that can be downloaded to your home computer, interactive tutorials offering a
variety of multimedia features, or a new type of resource that may be created tomorrow.

Although computers are now the primary means of accessing the Internet, other devices are being used,
such as cell phones, personal digital assistants, and pagers, which can send and receive e-mail and
access the Web. Soon, a variety of appliances, including your car on your TV set, may be connected to
the network, communicating with each other, and providing access to information. The internet has
expanded at a very fast pace in the past few couple of years.

Internet connectivity:

To have a dial up connection, following are required:

 Computer
 Modem. Configuration: 28.8 kbps
 TCP/IP software, e.g. Win95 Dial-up Networking, Trumpet Winsock
 Internet application software, e.g. Netscape Navigator, Internet Explorer
 ISP dial-up telephone number.
 ISP DNS name-server address.
 ISP mail-server address.

To go online your computer must be equipped with a modem a device that translates the digital signals
from your computer into analog signals that travel over a standard phone line. Those are the scratchy
sounds you hear from a modem’s speaker. A modem on the other end of the line understands it and
converts it sounds back into digital information. Modems come in different speeds and are measured in

102
bps or bits per second. A 28.8 Kbps modem transmits data at speeds upto 28,800 bits per second. A 56
Kbps modem is twice as fast, sending and receiving data at a rate of upto 56000 bits per second.
To connect an external modem to your computer, you’ll need a serial modem cable. Most likely,
your computer will have a connector on the back labelled serial. This connector comes in two varieties :
9-pin(male) or 25-pin (female). If you have only one of these ports, it will probably be COM1. If you
have two, one will be COM1, and the other will be COM2. After you plug in your modem, you can sign
up for Internet service.
Usually your setup program will try and find your modem and its COM port. If it can’t , it will
ak you which COM port your modem is attached to. If you don’t know, the easiest thing to do is try
them all. Even if you have all serial ports, you may be able to select one of the four COM ports. Also,
there are some other devices that use the COM ports. In some computers, the mouse is plugged into a
serial port. This is known as a serial mouse. If you’ve got a serial mouse plugged into COM1, then just
plug the modem into COM2. If you don’t have a second COM port, you can purchase a card that goes
inside your computer that will give you a second COM port. If this is necessary, you should check with
the manufacturer of your computer.

Working of Internet: PROTOCOLS

You might take for granted that when you retrieve a file of information or send an e-mail
message across the Internet it will always reach its destination. But sometimes it doesn’t, because the
process for sending information is extremely complex.
In order for the Internet to work in connecting many different types of computers, software and
files together, standardized rules called protocols must be used, that define how computers
communicate. A good example of an early communications protocol was Morse Code. The protocol for
Morse Code used standardized dots and dashes to communicate over telegraph lines by transmitting
electrical impulses. These connections are made with a series of protocols called TCP/IP. The TCP/IP
protocols define the Internet a packet switched network. With a packet switched conection, there is no
single, unbroken connection between sender and receiver, like there is with the telephone system.
A packet –switched network does not require two computers to establish a dedicated, unbroken
connection for data transfer. It instead breaks the data into small units or packets and transfer the packets
over any phone or data lines that are currently available.
103
When you ask your browser to go to a specific Internet address, or when yo click on a hyperlink,
the sending computer breaks the data you have asked for into packets. Each packet contains a piece of
the data. Each packet is labeled with the addresses of the sending and receiving computers along with
some instructions on how to put the data back together again once it has reached its destination.
The data in these small packets is transferred over phone lines or data lines. The packets take
different routes through a complex series of routes. Each router examines the destination address and
decides the best way to get the packets to their destination.
The packets eventually all reach their destination, your computer, and are put back together
again, using the instructions they have been labeled with. This is why sometimes takes a while to load
the data, before information appears on your screen. Of course, the speed of the data transfer depends on
the type of network connection or modem you use.

All Internet functions depend on Protocols, which standardize how the data for those functions
are transferred. Such protocols include :

HTTP- Hypertext Transfer Protocol for accessing World Wide Web


Protocol documents
FTP- File Transfer Protocol Protocol for transferring files from one
computer to another
GOPHER Protocol for accessing documents via Gopher
Menus (archiac,no longer widely used)
Telnet Protocol that allows user to logon to a remote
computer

104

You might also like