M1 Part1 Notes

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

Introduction to C Programming BESCK104E [Module 1- Part 1]

Introduction to C Programming BESCK104E

Introduction to C: Introduction to computers, input and output devices , designing efficient


programs. Introduction to C, Structure of C program, Files used in a C program, Compilers,
Compiling and executing C programs, variables, constants, Input/output statements in C
---------------------------------------------------------------------------------------------------------------------

What is a computer?

• A computer is an electronic device that is designed to accept data, perform the required
mathematical and logical operations at high speed and output the result.

Characteristics of Computers

• A computer is an electronic device that performs a function based on a given set of


instructions known as a program. A computer accepts data, processes it, and produces
information.

• Computers are basically meant to solve problems quickly and accurately. The important
characteristics of a computer are:

• Speed

The speed of computers is usually given in nanoseconds and picoseconds, where

1 nanosecond = 1x10 -9 seconds and

1 picosecond = 1x10-12 seconds.

• Accuracy

Computer always gives accurate results, provided the correct data and set of instructions
are input to it. The output generated by a computer depends on the given instructions and
input data. If the input data is wrong, then the output will also be erroneous.

• Automation

Computers are automatable devices that can perform a task without any user intervention.
The user just needs to assign the task to the computer, after which it automatically
controls different evices attached to it and executes the program instructions.

Raghavendra T.K, Dept of CSE Page 1


Introduction to C Programming BESCK104E [Module 1- Part 1]

• Diligence

Computers never get tired of a repetitive task. It can continually work for hours without
creating errors. . Even if a large number of executions need to be executed, each and
every execution requires the same duration, and is executed with the same accuracy.

• Versatile

Versatility is the quality of being flexible. Computers are used in our daily life in
different fields.

For example, they are used for home use, for business-oriented tasks, weather
forecasting, teaching, railways, banking, medicine and so on, indicating that computers
can perform different tasks simultaneously.

On the PC that we use at home, can be used to play a game, Compose and send e-mails,
listen to music, etc. Therefore, computers are versatile devices as they can perform
multiple tasks of different nature at the same time.

• Memory

Computers have internal or primary memory (storage space) as well as external or


secondary memory. While the internal memory of computers is very expensive and
limited in size, the secondary storage is cheaper and of bigger capacity.

• No IQ

The trend today is to make computers intelligent by inducing artificial intelligence (AI) in
them, they still do not have any decision-making abilities of their own. That is, their IQ
level is zero. They need guidance to perform various tasks.

• Economical

Computers save time, energy, and money.When compared to other systems, computers
can do more work in lesser time.

For example, using the conventional mail system to send an important document takes at
least 2-3 days, whereas the same information when sent using the Internet (e-mail) will
be delivered instantaneously.

Generations of Computers: Over the past several decades, computers have gone through
roughly five generations of development.

Raghavendra T.K, Dept of CSE Page 2


Introduction to C Programming BESCK104E [Module 1- Part 1]

The First Generation:

• Used thousands of vacuum tubes for computation. Magnetic drums were used for
memory. Because of the huge size of vacuum tubes, these computers took lot of space.
Consumed large amount of power and generated lot of heat. So air conditioners were
used to cool down.

• Machine language (which understands only 1’s and 0’s)was used for programming. So it
was difficult to program. Punched cards was used as input and output was displayed
onpaper.

• Because of above drawbacks, these computers were used only for scientific work.

Advantage: They were the fastest calculating device of those times.

Disadvantages:

• Computers were too bulky and required a complete room for storage.
• Highly unreliable as vacuum tubes emitted a large amount of heat and burnt frequently.
• Required air-conditioned rooms for installation.
• Costly. Difficult to use.
• Required constant maintenance because vacuum tubes used filaments that had limited life
time.

The Second Generation:

• Transistors were used. Transistors were faster,smaller and consumed less power. Even
though transistors generated less heat, second generation computers still needed air
conditioning.

• Smaller magnetic cores were used instead of magnetic drums for storage.

• Programming was easier as programmer could specify words and symbols instead of 0’s
and 1’s. Programminglanguages like COBOL, FORTRAN, ALGOL
innovated.

Advantages:

Raghavendra T.K, Dept of CSE Page 3


Introduction to C Programming BESCK104E [Module 1- Part 1]

• Faster, smaller, cheaper, reliable, and easier to use than the first generation
computers.
• They consumed less electricity and generated less heat as compared to first
generation computers.
• Programming was done in high level programming languages.
Disadvantages: Transistors had to be assembled manually. This made production of computers
difficult and expensive.

The Third Generation:

• Integrated Circuit (ICs) was used, means components of the electronic circuit like
transistors, resistors, capacitors were integrated into single chip.

• Keyboard was used as input device and monitor was used as


output.

• Magnetic hard disk was used for secondary storage.

• The third generation computers also had OS. Operating System which is a special
program meant to control the resources of the computer.

• Programming languages like ALGOL-68, BASIC, C are innovated.

Advantages:

 They were faster than second-generation computers and could perform one million
transactions per second
 They were smaller, cheaper, and more reliable
 These computers had faster and larger primary memory and secondary storage.
Disadvantages:

 These computers were difficult to maintain.


 They got heated very quickly.

The Fourth Generation

• The Microprocessor was the most important component.With the help of LSI (Large
Scale Integration) and VLSI (Very Large Scale Integration) the entire CPU is on a single
chip.

• Semiconductor memories were used and HDD became cheaper, smaller in size and
larger in capacity.

• OS have moved from MSDOS to GUI (Graphical User Interface) like windows.
• Development of the mouse and handheld devices.
• The size was reduced and the speed was increased.

Raghavendra T.K, Dept of CSE Page 4


Introduction to C Programming BESCK104E [Module 1- Part 1]

• The networking technology has also been improved and allowed sharing of resources.
• Programming languages like C++ are innovated.
• Word processing, spreadsheet ,graphics packages were introduced.
Advantages:

• These Computers were smaller, cheaper, faster, and more reliable than their predecessors.
• They consumed less electricity and generated less heat.
• They had faster and larger primary memory and secondary storage.

Disadvantages: They were not intelligent systems.

The Fifth Generation

• Artificial Intelligence and use of natural languages are the main features of this
generations.

• Neural networks and expert systems have been developed.

• These systems are expected to interact with users in natural language.

• Speech recognition and speech output should also be possible. Such computers are still
in development.

• Computers must be able to perform parallel processing. The quad-core and octa-core was
also introduced.

Classification of Computers

The below diagram shows the classification of computers based on their speed ,amount of data
that they can process and their prices:

Supercomputers

• These are huge machines having most powerful and fastest processors.

Raghavendra T.K, Dept of CSE Page 5


Introduction to C Programming BESCK104E [Module 1- Part 1]

• It uses multiple CPUs for parallel data processing. They can perform more than one
trillion calculations per second. A single supercomputer can support thousands of users
at the same time.

• They are used for weather forecasting, Nuclear weapon design, Aircraft design,
automotive design, controlling industrial units.

• Examples of supercomputers are CRAY-1, CRAY-2, Control Data CYBER 205, and
ETA A-10.

Mainframe Computers

• Mainframe computers are large-scale computers (but smaller than supercomputers).

• Mainframes can also support multiple processors. For example, the IBM S/390
mainframe can support 50,000 users at the same time.

• Users can access mainframes by either using terminals or via PCs. Two types of
terminals that can be used with mainframe systems;

Dumb Terminals : Dumb terminals consist of only a monitor and a keyboard (or
mouse). They do not have their own CPU and memory.They use the mainframe system's
CPU and storage devices.

Intelligent Terminals : In contrast to dumb terminals, intelligent terminals have their


own processor and thus can perform some processing operations.They do not have their
own storage space. PCs can be used as intelligent terminals to facilitate data access and
other services from the mainframe system.

• Mainframe computers are typically used as servers on the world wide web. They are also
used in large organizations such as banks, airline companies and universities.

• Some examples of mainframe computers include IBM S/390, Control Data CYBER 176,
Amdahl 580, etc.

Mini Computers(Midrange computers)

• Minicomputers are smaller, cheaper, and slower than mainframes. They are called
minicomputers because they were the smallest computer of their times.

• Minicomputers are widely used in business, education, hospitals, government


organizations, etc.

• Minicomputers can be used only by a single user, or designed to handle multiple users
simultaneously.As with mainframes, minicomputers can also be used as servers in a
networked environment, and hundreds of PCs can be connected to it.

Raghavendra T.K, Dept of CSE Page 6


Introduction to C Programming BESCK104E [Module 1- Part 1]

Micro Computers

• Microcomputers also known as PCs. They are both used in standalone mode and in a
network.

• PCs can be classified into the following categories:

Desktop PCs: The system unit of the desktop PC can be placed flat on a desk or table. It
is widely used in homes and offices.

Laptops

• They are very handy and can be easily be carried from one place to another. They may
also be placed on the user's lap. Hence, laptops are very useful, especially when going on
long journeys.

• Laptops operate on a special battery and do not always have to be plugged in like desktop
computers.

Workstation

• Workstations are single-user computers with processing speed matches that of a


minicomputer or mainframe computer.
• Workstation computers have advanced processors, more RAM and storage capacity.
• They are more expensive and powerful than a normal desktop computer.
• Workstations are used by scientists, engineers, architects, and graphic designers , they
can also be used as servers in a networked environment.
Network Computers

• Network computers have less processing power, memory, and storage than a desktop
computer.

• These are specially designed to be used as terminals in a networked environment.


Network computers are specifically designed to access data stored on a network.

Handheld Computers

• A range of small personal computing devices. Commonly known as handheld computers,


Palmtop Computers, or Mini-Notebook computers.

• They can fit in one hand, while users can use the other hand to operate them. They have
small-sized screens and keyboards.

Raghavendra T.K, Dept of CSE Page 7


Introduction to C Programming BESCK104E [Module 1- Part 1]

• These computers are preferred by business travellers and mobile employees such as meter
readers.

• Some examples of handheld computers are Personal digital assistant (PDA), Cellular
telephones, H/PC Pro devices.

Applications of Computers

Computers are being effectively utilized to perform important tasks. The following are different
areas where computers are being widely utilized.

Word processing : This software enables users to read and write the documents and insert the
images, tables and graphs.

Internet :The Internet is a network of networks that connects computers all over the world. It
gives the user access to an enormous amount of information, much more than available in any
library.

Digital video or audio composition: Computers make audio or video composition and editing
very simple. This has drastically reduced the cost of equipment to compose music or make a
film.

Desktop publishing Desktop publishing software enables to create page layouts for entire
books.

Retail Business Computers are used in retail shops to enter orders, calculate costs, and print
receipts. They are also used to keep an inventory of the products available and their complete
description.

Sports In sports, computers are used to compile statistics, identify weak players and strong
players by analyzing statistics, sell tickets, create training programs and diets for athletes, and
suggest game plan strategies based on the competitor's past performance.

Digital video or audio composition: Computers make audio or video composition and editing
very simple. This has drastically reduced the cost of equipment to compose music or make a
film.

Health Care : In Health care system computers are used to store the records, surgical procedures
and for Better diagnosis and treatment .

E-Business : e-Business or electronic business is the process of conducting business via the
Internet. This may include buying and selling of goods and services using computers and the
Internet.

Raghavendra T.K, Dept of CSE Page 8


Introduction to C Programming BESCK104E [Module 1- Part 1]

Education System : A computer is a powerful teaching aid and can act as another teacher in the
classroom. Teachers use computers to develop instructional material. Teachers may use pictures,
graphs, and graphical presentations to easily illustrate difficult concept.

Travel and Tourism : Computers are used to prepare tickets, monitor the train’s
or airplane’s route, and guide the plane to a safe landing. They are also used to research about
hotels in an area, reserve rooms, or to rent a car.

Online Banking : The world today is moving towards a cashless society, where we need not
have money in our pocket to purchase anything. we can just have our credit card or debit card.
The ATMs provide a 24x7 service and allow to draw cash, check the balance in our account, and
order a product.

Decision Support System :Computers help managers to analyse their organization’s data to
understand the present scenario of their business, view the trends in the market, and predict the
future of their products.

Weather Forecasting :When computers are fed with mathematical equations along with data
about air pressure, temperature, humidity, and other values, the solution of these equations gives
an accurate prediction of the weather of a particular area. (For example, a Cray X-MP
supercomputer installed at Mausam Bhavan in New Delhi is used to predict weather and climatic
changes in the Indian subcontinent.)

BASIC ORGANIZATION OF A COMPUTER

A computer is an electronic device that basically performs five major operations:

Accepting data or instructions (input)

Storing data

Processing data

Displaying results (output)

Controlling and coordinating all operations inside a Computer

The following figure shows all these functions and see how one unit of a computer interacts with
another to perform these operations.

Raghavendra T.K, Dept of CSE Page 9


Introduction to C Programming BESCK104E [Module 1- Part 1]

Input

• This is the process of entering data and instructions in to the computer system. The data
and instructions can be entered by using different input devices such as keyboard, mouse,
scanner, trackball, etc.

• Computers understand binary language, which consists of only two symbols (0 and
1).The input devices convert the input data into binary codes.

Storage

• Storage is the process of saving data and instructions permanently in the computer so that
they can be used for processing.

• The computer storage space stores the data and programs that operate on that data.It also
stores the intermediate results and the final results of processing.

• A computer has two types of storage areas:

• Primary storage also known as the main memory.

• Secondary storage Also known as the secondary memory or auxiliary memory

Primary storage(Main memory)

• It is directly accessible by the CPU at very high speeds.It is used to store the data and
programs that are currently being worked on by the computer, the intermediate results of
processing.

Raghavendra T.K, Dept of CSE Page 10


Introduction to C Programming BESCK104E [Module 1- Part 1]

• Primary storage space is very expensive and therefore limited in capacity.Another


drawback of main memory is that it is volatile in nature; that is, as soon as the computer
is switched off, the information stored gets erased.

• An example of primary storage is the RAM.

Secondary storage

• It is cheaper, non-volatile, and used to permanently store data and programs.Secondary


memory supplements the limited storage capacity of the primary memory.

• An example is the magnetic disk

Processing

• The process of performing operations on the data as per the instructions specified by the
user (program) is called processing.Data and instructions are taken from the primary
memory and transferred to the arithmetic and logical unit (ALU), which performs all
sorts of calculations. The intermediate results of processing may be stored in the main
memory.

• When the processing completes, the final result is then transferred to the main memory.

Output

• Output is the process of giving the result of data processing to the outside world.The
results are given through output devices such as monitor, printer.The output devices,
therefore, convert the results available in binary codes into a human-readable language
before displaying it to the user.

Control

• The control unit (CU) is the central nervous system of the entire computer system.It
manages and controls all the components of the computer system.It is the CU that decides
the manner in which instructions will be executed and operations performed. It takes
care of the step-by-step processing of all operations that are performed in the computer.

• The CPU is a combination of the ALU and the CU. ALU, CU, and CPU are the key
functional units of a computer system.

Inside the Computer

The following are some of the major parts of the computer :

• CPU : The CPU- Central processing unit is the brain of the computer. It performs all
calculations and controls the devices connected to the computer system.

Raghavendra T.K, Dept of CSE Page 11


Introduction to C Programming BESCK104E [Module 1- Part 1]

• RAM : Random Access Memory is also called as main memory. It stores the
information about the applications that are currently being executed by the CPU.

• HDD : Hard disk drive is of the computer is the secondary memory of the computer
system where information is stored permanently. All types of data,documents, and
programs are stored on the hard disk. The larger the hard disk, the more the amount of
data that can be stored on the drive.

• Video Card : The video card is a board that plugs into the motherboard of the
computer and generates images for display.

• Modem : A modem (modulator–demodulator) is a device that enables the computer


to use a telephone line to communicate and connect to the Internet.

• Network Card : A network card is used to connect the computer either to other
computers or to the Internet.

• Fans : Fans are used to allow air inside and cool the computer.

• Cables : There are multiple wires inside the computer that are flat, ribbon-like
cables. They are used to provide power and communication to the various parts inside
the computer.
• Sound Card : sound cards are expansion boards that are used to enable a computer to
manipulate sound. For example, sound cards allow the users to plug in speakers and a
microphone. Some sound cards also provide the jacks for hooking your computer up
to a common stereo.
Mother Board

• The motherboard, also known as the main board or the parent board. Motherboard is the
primary component of a computer. It is used to connect all the components of the
computer.

• The motherboard is a printed circuit that has connectors for expansion cards, memory
modules, the processor, etc.

Following are the characteristics of Motherboard:

• Form Factor : Form factor refers to the motherboard’s geometry, dimensions,


arrangement, and electrical requirements. The mother board form factor describes its
general shape, power supply it can use and its physical organization.

• Chipset : The chipset is an electronic circuit that basically coordinates data transfers
between the different components of the computer (such as the processor and
memory).

Raghavendra T.K, Dept of CSE Page 12


Introduction to C Programming BESCK104E [Module 1- Part 1]

• Processor Sockets (CPU slot):CPU socket is used to connect a microprocessor with a


printed circuit board (PCB) without soldering, allowing the CPU to be installed or
replaced more easily on the motherboard. Common types of sockets are : PGA- Pin
Grid Array and LGA –Land grid Array.

• Input Output Connectors : The motherboard has a number of input-output sockets


on its rear panel, some of which include:
• A serial port to connect some old peripherals (keyboard)
• A parallel port to connect old printers
• USB ports to connect more recent peripherals such as mouse and pen drive.
• RJ45(Registered Jack ) connector (also known as LAN or Ethernet port) to connect
the computer to a network.
• Video graphics array (VGA) connector to connect a monitor.
• Audio plugs that include the speaker, line out , and microphone to connect sound
speakers, hi-fi(HIgh-FIdelity) system, or microphone.

Input Devices

• Input Devices : Input devices is a device that is used to feed the data and the
instructions to the computer. Below diagram show different input devices.

Raghavendra T.K, Dept of CSE Page 13


Introduction to C Programming BESCK104E [Module 1- Part 1]

1. Keyboard Keyboard is the standard Input device . QWERTY layout is used to place the
alphabets or letters in the keyboard. The characters which are possible to type using
keyboard have unique values assigned to them called ASCII value.
Types of keys in the keyboard

• Function keys : F1, F2… F12


• Numeric keys : 0, 1, 2, …..9
• Alphabet keys : A, B, C……Z, a, b, c……z
• Toggle keys (Caps Lock, Num Lock,
• Scroll Lock) so on.
Special keys

• Enter key terminates a line.


• Bbackspace key erases input from right to left, Delete erases text from left to right.
• The Ctrl key is always used in combination with other keys.
• The Alt key also used in combination of other keys.

2. Pointing Devices : A pointing input device enables the users to easily control the
movement of the pointer to select items on a display screen, to select commands from
commands menu, to draw graphs, etc. Some examples of pointing devices include mouse,
trackball, touchpad.
Mouse

• It is the key input device used in a graphical user interface (GUI).

• It can be used to handle the pointer easily on the screen to perform various functions such
as opening a program or file.The mouse has two buttons and a scroll wheel.

• The user may perform the following operations:Point, click, drag, scroll.

Trackball

• A trackball is a pointing device that is used to control the position of the cursor on the
screen.It is usually used in notebook computers, where it is placed on the keyboard.

• The user rolls the ball to position the cursor at an appropriate position on the screen and
then clicks one of the buttons (identical to mouse buttons) near the trackball

Touchpad

• A touchpad (or trackpad) is a small, flat, rectangular stationary pointing device with a
sensitive surface. The user has to slide his or her fingertips across the surface of the pad
to point to a specific object on the screen. There are also buttons around the edge of the
pad that work like mouse buttons.

• Touchpads are widely used in laptops, and are in built on the laptop keyboards.

Raghavendra T.K, Dept of CSE Page 14


Introduction to C Programming BESCK104E [Module 1- Part 1]

3. Handheld Devices
• Some common examples of handheld devices include smartphones, PDAs, handheld
game consoles, and portable media players (such as iPod).

Joystick

• A joystick is a cursor control device widely used in computer games.It consists of a


handheld lever and one or more push buttons, called switches.The lever of a joystick
moves in all directions to control the movement of the pointer on the computer screen.
Stylus

• A stylus is a pen-shaped input device used to enter information or write on the touch
screen of a handheld device. It can also be used to draw lines on a surface as input into a
device, choose an option from a menu, move the cursor to another location on the screen,
take notes, and create short messages.

Touchscreen

• A touchscreen is a display screen that can identify the position of a touch inside the
display region.The user can touch the screen either by using a finger or a stylus.
Touchscreen displays are available on computers, laptops and mobile phones.

4. Optical Devices
• Optical devices, also known as data-scanning devices.They use light as a source of
input for detecting or recognizing different objects such as characters, marks, codes,
and images.
• Some optical devices include barcode readers, image scanners, optical character
recognition (OCR) devices, optical mark readers (OMR), and magnetic ink character
recognition (MICR) devices.
Barcode Reader

• A barcode reader (also price scanner) is a handheld input device that is used to capture
and read information stored in a barcode.It consists of a scanner, a decoder its function is
to capture and translate the barcode into numerals and/or alphabets. Barcode readers are
widely used in Supermarkets and retail stores

Image Scanner

• A scanner is a device that captures images, printed text, and handwriting, from different
sources such as photographic prints, posters, and magazines and converts them into
digital images for editing and display on computers.

Optical Character Recognition

• Optical character recognition (OCR) is the process of converting printed materials into
text or word processing files that can be easily edited and stored.

Raghavendra T.K, Dept of CSE Page 15


Introduction to C Programming BESCK104E [Module 1- Part 1]

• The steps involved in OCR include:Scanning the text character by character and
Translate the character images into character codes (e.g., ASCII)

Optical Mark Recognition

• Optical mark recognition (OMR) is the process of electronically extracting data from
marked fields, such as checkboxes and fill-in fields, on printed forms.

• The optical mark reader, is fed with an OMR sheet.The OMR sheet is scanned by the
reader to detect the presence of a mark.

Magnetic Ink Character Reader Bank checks consists of magnetic ink printed characters that
can be recognized by high-speed magnetic recognition devices.The printed characters provide
important information such as check number, bank routing number.

5. Audio-visual Input Devices


This type of devices allow user to record songs, videos.

Audio Devices

• Audio devices are used to capture sound.They enable computers to accept music, speech,
or sound effects for recording and/or editing.Microphones are widely used audio input
devices. A microphone feeds audio input to the computer. The audio input must be
converted into digital data using sound card before being stored in the computer.

Video Input Devices

• Video input devices are used to capture video from the outside world into the
computer.Here, the term video means moving picture along with sound.Video cards are
used to convert video signals to digital data.Digital camera, web camera are examples of
Video Input Devices.

Output Devices

• Below diagram show the types of output devices based on the hard copy and soft copy
output.

Raghavendra T.K, Dept of CSE Page 16


Introduction to C Programming BESCK104E [Module 1- Part 1]

• Soft copy devices :These devices produce an electronic version of an output. For
example, a file that is stored on a hard disk, CD, or pen drive and is displayed on the
computer screen.

• Hard copy devices : These devices produce a physical form of output. For example, the
content of a file printed on paper is a form of hard copy output

Soft Copy Devices

Monitor: The monitor is a soft copy output device used to display video and graphics
information generated by the computer through the video card.

• Monitors come in three variants

Cathode Ray Tube (CRT)

Liquid Crystal Display (LCD) and

Plasma

1.CRT monitors

• CRT monitors are very huge in size. The CRT monitor contains three electron guns
(RGB) for three primary colours. These work by firing charged electrons from these
guns at a phosphorus film. When electrons hit the phosphor-coated screen, they glow,
thereby enabling the user to see the output.

Advantages
• CRT monitors provide images of good quality (bright as well as clear).

• CRT monitors are cheapest when compared to LCD and plasma monitors.

Disadvantages
• CRT monitors are bigger in size and weight and therefore difficult to move from one
place to another when compared with other types of monitors.

• Power consumption is higher than the other monitors.

2.LCD

• An LCD monitor is a thin, flat, electronic visual display that uses liquid crystals. It has
thousands of liquid crystals which allow or block light passage through them. An image
is formed by applying voltage to these crystals.

• LCD screens are used computer monitors, televisions, video players. gaming devices,
calculators and telephones.

Raghavendra T.K, Dept of CSE Page 17


Introduction to C Programming BESCK104E [Module 1- Part 1]

Advantages

• LCD monitors are very compact and lightweight.

• They consume less power.

• They are more reliable than CRTs.

• They can be made in almost any size or shape.

Disadvantages

• They are more expensive than CRTs.

• Images are not very clear when tried to view from an angle.

3.Plasma monitor

• Plasma monitors are thin and flat monitors widely used in televisions and computers.

• The plasma display contains two thin glass plates that have hundreds of thousands of tiny
cells filled with xenon and neon gases. Displaying is achieved when electric current
begins to flow through the gas in the cell.

Advantages

• The technology used in plasma monitors allows producing a very wide screen.

• Very bright images are formed which look good from almost every angle.

• These monitors are not heavy and are thus easily portable.

Disadvantages

• These monitors are very expensive.

• They have a high power consumption.

Projector

• A projector is a device that takes an image from a video source such as a DVD player or
a computer and projects it onto a screen or another surface. To display the image on a big
screen, it uses bright light and a lens.

Speakers

Raghavendra T.K, Dept of CSE Page 18


Introduction to C Programming BESCK104E [Module 1- Part 1]

• Computer’s sound output is given to speakers and with different powers, sound quality of
speakers the user can enjoy music, movie or a game.In case the user wants to enjoy loud
music without disturbing the people nearby, a headphone can be used.

Hard Copy Devices

• Hard copy output devices are those that produce a physical form of output. For example,
the content of a file printed on paper is a form of hard copy output.

Printers

• A printer is a device that takes the text and graphics and prints it on to a paper.Printers
can be classified into impact and non-impact printers.

Impact Printers

• These works by physically striking the ink ribbon against the paper.

• An impact printer prints the character by striking them on the ribbon which is then
pressed on the paper. Impact printers are noisy.Examples : Dot matrix printers, Daisy
wheel printers and Line printers.

Non-Impact Printers

• Non-impact printers print characters without using ribbon.

• Noiseless, fast and produce high quality output compared to impact printers but these
printers are expensive. Examples of non-impact printers are Laser printer , Ink-jet Printer

Impact Printers

Dot matrix printer

• A dot matrix printer prints characters and images as a pattern of dots. This printer has a
print head (or hammer) that consists of pins representing the character or image. Prints by
striking an ink-soaked ribbon against the paper.

Advantages

Raghavendra T.K, Dept of CSE Page 19


Introduction to C Programming BESCK104E [Module 1- Part 1]

• It is cheap. It offers the lowest printing cost per page.


• It is widely used for bulk printing where the quality of the print is not of much
importance.
Disadvantages

• This type of printer creates a lot of noise


• It is very slow.
• It has poor print quality.
Daisy wheel printer

• Uses wheel mechanism to print.The print head of a daisy wheel printer is a circular wheel
with arms or spokes. These arms contain characters at the outer ends. To print a
character, the wheel is rotated to position arm with required character, in front of the
ribbon.The arm is then hit by a hammer which results in striking the ribbon on the paper.

• The key benefit of using a daisy wheel printer is that the print quality is high, but more
expensive than Dot-matrix printer.

Line printer

• A line printer is a high-speed impact printer in which one typed line is printed at a time.
The speed of a line printer usually varies from 600 to 1200 lines per minute.

• It is extremely noisy.

Non-Impact Printers:

Inkjet printer:

• The print head of inkjet printers has several tiny nozzles also called jets. As the paper
moves past the print head, the nozzles spray ink onto it at high pressure, forming
characters and images. Inkjet printers are cheaper than laser printers,
they are more expensive to maintain.

• The cartridges of inkjet printers have to be changed more frequently.

Laser printer

• A laser printer, is a nonimpact printer that works at very high speeds and produces
high-quality text and graphics.When a document is sent to the printer, the following steps
take place:
• A laser beam draws the document on a drum using electrical charges.
• The drum is then rolled in a toner (a dry powder type of ink).
• The toner is transferred onto a piece of paper with heat and pressure.

Raghavendra T.K, Dept of CSE Page 20


Introduction to C Programming BESCK104E [Module 1- Part 1]

Plotters

• A plotter is a printing device that is usually used to print vector graphics or line drawings
with high print quality.
• They are widely used to draw maps, in scientific applications, and in CAD CAM.
• Architects use plotters to draw blueprints of the structures they are working on.
Two types of plotters.

Drum plotter

• A drum plotter is used to draw graphics on paper that is wrapped around a drum.
• The drum plotter works by rotating the drum back and forth to produce vertical motion.
• The pen, which is mounted on a carriage, is moved across the width of the paper.
• Hence, the vertical movement of the paper and the horizontal movement of the pen create
the required design under the control of the computer.
• This type of plotter is usually used with mainframe and minicomputer systems.
Flatbed plotter

• In a flatbed plotter, the paper is spread on the flat rectangular surface of the plotter, and the
pen is moved over it.
• Flatbed plotters are less expensive, and are used in many small computing systems.

1. Define computer? Explain the characteristics of the computer?

2. Define computer? Explain the applications of the computer?

3. Explain the classification of computers based on their Size, Speed, Storage and Price?

4. Define computer? Briefly Explain the Generation of computers?

5. Explain with neat diagram the Organization/Block Diagram of the computer of the
computer or What are the essential computer units or Explain the functional organization
of the computer or What are the basic functional units of the digital computer?

6. Define Motherboard and Explain different characteristics of the Motherboard?

7. Differentiate between primary and secondary memory?


[ Answer:

Primary Memory Secondary Memory

Raghavendra T.K, Dept of CSE Page 21


Introduction to C Programming BESCK104E [Module 1- Part 1]

Primary memory is the internal memory and Secondary memory is the external memory and
also called as main memory also called as auxiliary memory

Accessing the data is much faster Accessing the data is slower

Primary memory is expensive Secondary Memory is cheaper

Primary memory is temporary storage Secondary memory is permanent storage

Huge amount of data cannot be stored Huge amount of data can be stored

Semiconductor memory Maganetic memory

Example: RAM, ROM Example: Hard Disk, Floppy, Pen Drive, CD


etc}

8. Define Input and Output Devices? List different Input and Output Devices and explain any
two input devices and two output devices?
9. What is a printer? Explain different types of printers.
10. What are soft copy output devices? Explain any one soft copy output device.

Raghavendra T.K, Dept of CSE Page 22

You might also like