Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

Revision questions for I PU Computer Science

Chapter 1 – Fundamentals of computer


1 Mark

Question 1

What is a computer?
Answer:
Computer is defined as an electronic machine used for storing, processing and
analysing data or information as per a set of instructions given to it by
humans.

Question 2.
What is computer hardware?
Answer:
The physical components of a computer are called the hardware.

Question 3.
Define program.
Answer:
A computer program is a sequence of logical actions or instructions.

Question 4.
Define software.
Answer:
A group of programs that are put into a computer to operate and control its
activities are called the “software”.

Question 5

Define computer memory.


Answer:
The working place in the computer where all the data and instructions are
stored is called the memory.

Question 6
What are the registers?
Answer:
It is a temporary storage location of the CPU.
Question 7

Name the oldest computing tool.


Answer:
Abacus is the oldest computing tool.

Question 8
What is the contribution of Prof. John Napier in the field of computers?
Answer:
John Napier invented a calculating device which is a set of 9 marked rods
called “Napier

Question 9
Name the device invented by William Oughtrcd to do computations.
Answer:
The device invented by William Oughtred for computations is the “slide rule”.

Question 10.
Who is the inventor of Pascaline?
Answer:
A French philosopher Blaise Pascal invented “Pascaline” the first mechanical
calculator.

Question 11.
Who invented Jacquard loom?
Answer:
Joseph Mary Jacquard invented Jacquard loom.

Question 12.
Who is the father of the computer?
Answer:
Charles Babbage is known as the father of the computer.

Question 13.
Who invented the difference engine?
Answer:
Charles Babbage invented the difference engine.

Question 14.
Who is the first computer programmer?
Answer:
Lady Ada Lovelace was the first computer programmer.

Question 15.
Where was Herman Hollerith machine was used?
Answer:
Herman Hollerith machine was used in a faster way to process the US census
in a faster way in the year 1890.

Question 16.
What is the earlier name of IBM?
Answer:
Tabulating Machine Company.

Question 17.
Expand IBM.
Answer:
International Business Machine

Question 18.
Expand the term ENIAC.
Answer:
Electronic Numerical Integrator and Calculator.

Question 19.
Expand the term EDVAC.
Answer:
Electronic Discrete Variable Automatic Computer.

Question 20.
Who developed the stored program concept?
Answer:
John von Neumann developed the stored program concept.

Question 21.
Expand the term UNIVAC.
Answer:
UNIVersal Automatic Computer.
Question 22.
Expand the terms COBOL and FORTRAN.
Answer:
Common Business Oriented Language and Formula Translation.

Question 23.
What is a microprocessor?
Answer:
The CPU of a computer system in which thousands of integrated circuits are
built onto a single silicon chip is called a microprocessor.

Question 24.
Expand the term PDA.
Answer:
Personal Digital Assistants.

2 Mark

Question 1.
Mention the main characteristics of a computer.
Answer:
The main characteristics of a computer are speed, storage capacity, accuracy,
and diligence.

Question 2.

What is the stored program concept? Who developed it?


Answer:
A stored-program concept is one in which program and data are stored in the
main memory and then the processor fetches instructions and executes them,
one after another. It was developed by von Neumann.

Question 3.
Write the names of any two First generation computers.
Answer:
ENIAC, EDSAC

Question 4.
What is the main difference between microcomputer and minicomputer?
Answer:
The main difference is microcomputers are single-user computers and mini-
computers are multi-user computers.

Question 5.
How mainframe computers are different from supercomputers?
Answer:
Mainframe computers are used in business process applications and
supercomputers are used in scientific applications and calculations.

Question 6.
Give the application of hybrid computers.
Answer:
Hybrid computers are used in Process control (industries) and Robotics.

Question 7.
How computers are useful in education? Mention any two uses.
Answer:
Using Computer Aided Learning (CAL) & Computer Based Training

 Students can readily learn and get new skills at their own convenient
speed.
 Students can get timely and high-quality training on demand.
 Students can solve different kinds of problems quickly and efficiently, by
using computers.

Question 8.
Give the application of computers in industries.
Answer:

 Computers are used to control machines and the continuous running of


machinery.
 A robot is an automatic programmable machine and can be used in
hundreds of applications like assembling and spray painting of cars etc.

Question 9.
What are the advantages of computers in business?
Answer:

 Office paperwork is reduced by using computers.


 Many businesses use websites to sell their products and contact their
customers.
 Computerized banking saves time and is convenient for the customer.

Question 10.
Explain the uses of computers in the entertainment and multimedia field.
Answer:

o Nowadays, the computer can be used to watch television programs on


the Internet. People can also watch movies, listen to music and play
games on the computer.
o Multimedia is used to develop special effects in movies and animations.

Question 11.
What are the uses of computers in the field of science and technology?
Answer:

 A flight simulation can be used to train pilots and how to deal with
critical situations.
 Computer-based weather forecasting collects accurate data from many
devices all around the world to predict more reliable weather forecasts.

Five Marks
Question 1.
Briefly explain the characteristics of a computer.
Answer:
1. Speed:
Computers are fast in doing calculations. The speed of the computer is
measured in terms of No. of million instructions per second (MIPS).

2. Storage Capacity:
Computers come with a very large amount of memory space. They can hold a
lot of data. Computers can extract a particular piece of information from a
large amount of available data within a very short time.

3. Diligence:
After doing work for some time, humans become tired but computers do not
become tired. They work continuously. In fact, Computers which control
telephone exchanges, are never shut down. This is called diligence.
4. Accuracy:
The results that the computers produce are accurately provided that the input
data and programs are reliable.

Question 2

Draw the schematic block diagram of a computer showing its essential


components. Discuss the function of each component.
Answer:

1. Input Unit:
It is a device through which we enter the program and data into the computer.
The data is then stored and processed with the help of programs.

2. Central Processing Unit:


The Central Processing Unit (CPU) consists of three units namely, the control
unit, the arithmetic, and the logic unit and the memory unit.

3. Control Unit:
This unit is considered to be the nervous system of the computer. It controls
all the arithmetic operations to be performed. It also coordinates the functions
of all the hardware units of the computer.

4. Arithmetic and Logic Unit (ALU):


This unit performs all the arithmetic calculations and logical operations
involved in the program.

5. Memory Unit:
The function of this unit is to store the data and the set of instructions given
by the programmer. The computation results are also stored in the memory
and they may be used for subsequent computations or sent to the output unit.

6. Output Devices:
Output devices receive information from the CPU and present it to the user in
the desired form. Some common output devices are a visual display unit
(VDU), Printer, etc.

(NOTE: If one 5 marks question for all generation then time, component
used, 2 advantages and 2 disadvantages of each generation if enough)

Question 4.
Write a short note on the first generation of computers.
Answer:

1. The first computers used vacuum tubes for electronic circuitry and
magnetic drums for memory.
2. They were very expensive to operate and the power consumption was
high, generated a lot of heat, which was often the cause of
malfunctions.
3. First-generation computers were communicated through machine
language to perform operations, and they could only solve one problem
at a time.
4. Input was based on punched cards and paper tape, and output was
displayed on printouts.
5. UNIVAC and ENIAC computers are examples of first-generation
computing devices.

Advantages:

 For Calculation and computation.


 Payroll Processing
 Record keeping

Disadvantages:

 Required a huge space


 Too big in size
 Very slow in speed
 Low level of accuracy and reliability
 Low storage capacity
 High power consumption
 High heat generation
 Used machine language
 Difficult to maintain
 Fault finding was very difficult.

Question 5.

Explain second generation computers in detail.


Answer:

1. In the second generation computers, symbolic or assembly languages


were used.
2. High-level programming languages were also in use at this time, such as
early versions of COBOL and FORTRAN.
3. The memory storage used was magnetic core technology.
4. Second-generation computers still relied on punched cards for input
and printouts for output.

Advantages:

 Smaller in size
 Better speed
 Low power consumption
 No heat was generated.
 Better storage capacity
 More reliability
 Compact Design
 Faster than I Generation Computers.

Disadvantages:

 Needed Air conditioning environment


 Constant maintenance needed.
 No operating system.
Question 6.

Write a short note on the third generation computers.


Answer:

1. The development of the integrated circuit was made used in third-


generation computers. Transistors were miniaturized and were placed
on silicon chips, called semiconductors.
2. The processing speed and efficiency of computers increased.
3. Keyboards and monitors were used as input and output devices.
4. The computer system had an operating system and helped to run
multiple applications simultaneously. Computers gained a lot of
popularity because of small size and low cost.

Advantages:

 Better than first and second-generation computers


 Used high level language
 Size got reduced further
 Speed got increased
 Much better performance
 Much more reliability

Disadvantages:

 Initial problem with Manufactures.

Question 7.

Explain fourth generation computers in detail.


Answer:
1. The microprocessor was used in the fourth generation computers, as
thousands of integrated circuits were built onto a single silicon chip.
2. The Intel 4004 chip, developed in 1971, located all the components of
the computer – from the central processing unit and memory to
input/output controls – on a single chip.
3. In 1981 IBM introduced its first computer for the home user, and in
1984 Apple introduced the Macintosh.
4. Network technology was introduced at this time. Fourth generation
computers also saw the development of GUIs, the mouse and handheld
devices.

Advantages

 Speed and Reliability are more


 Computer occupies every walks of life.
 More superior to earlier computers.
 Computer-aided Design introduced (CAD)
 LAN (Local Area Network) and WAN (Wide area network) got
introduced.

Question 9.
Explain the use of computers in the field of business.
Answer.
All business firms do certain business tasks on a daily basis like generating
customer bills, studying sales of various products at different locations, etc.,
using computers. There are many departments like sales, purchase, finance,
etc., is big business firms. These departments are involved in different business
tasks which are large in volume and huge storage space is required and
computers are used in such places.
1. Marketing:
Marketing applications provide information about the products, their
distribution, advertising and selling activities.

2. Stock Exchanges:
The stock market uses a computerized system that makes it possible for
stockbrokers and customers to do all their trading electronically. Brokers
connect to stock exchanges using the internet and do the buying and selling
of shares online. Money transfer is done electronically.

3. Banks:
Computerized banking saves time for the customer. Cheques are read by
MICR (Magnetic Ink Character Reader, a device used to allow the data on
cheques to be read by machines). Banks use computers to maintain their
customer‟s accounts and their transaction details. Customers can also use
internet banking to transfer money. Money can be withdrawn from any ATM‟s
any time.

4. Departmental Stores:
At departmental stores, cashiers enter sales data by waving a bar code
scanner. Bar codes are read by bar code readers that translate the bar code
symbols into digital forms. The price of a particular item is set with the store‟s
computer and appears on the computer and billing is done automatically. The
report of purchases, sales and stock are generated using computers. Security
cameras are used and continuous recording using DVR is widely used in
departmental stores and other locations to monitor home or business
operations to ensures security and safety.

5. E-Commerce:
E-commerce (electronic commerce) is the buying, selling, and exchanging of
products, services, and information via computer network/internet. It
promotes online buying and selling of goods and services. A buyer can buy
products using a computer connected to the internet sitting anywhere in the
world at any time of the day.

Question 10.
Write a note on the classification of computers in detail.

Or

Explain the classification of computers based on size, speed, and performance.

Answer:
Based on operating principles, computers can be classified into 3 types. They
are,

1. Digital Computers
2. Analog computers
3. Hybrid computers

1. Digital computers:
They operate essentially by counting. All quantities are expressed as discrete
digits or numbers. Digital computers are useful for evaluating arithmetic
expressions and the manipulation of data. The majority of the computers used
in the world today are digital.
2. Analog Computers:
They operate by measuring rather than counting. The computer functions by
establishing similarities between two quantities that are usually expressed as
voltages or currents. Analog computers are powerful tools to solve differential
equations.
3. Hybrid Computers:
Computers which combine features of both analog and digital type are called
hybrid computers.

Computers are also classified in terms of speed, accuracy, word length and
storage capacity. Computers are also available in different sizes and with
different capabilities. Broadly, they may be categorised as microcomputers,
mini, mainframe, and supercomputers.
1. Micro Computers:
Computers using Microprocessors are called Microcomputers. This is the
smallest general-purpose processing system usually designed for use by a
single person at a time.

2. Mini Computers:
These are medium-sized computers that are costlier and powerful than a
microcomputer. An important distinction between a micro and a
minicomputer is that a mini-computer is usually designed to serve multiple
users simultaneously. This type of computers need less power and less cooling
arrangements. Up to 8 users can use the system simultaneously, running their
own individual programs.

3. Super Computers:
The supercomputer is the largest, fastest and most expensive mainframe
computer. It is normally used by large business organisations that require an
extraordinary amount of computing power. Their computing speed is 10 times
faster than any other type of computer. These computers are capable of
executing more than 10,000 million instructions per second and have storage
capacities of millions of bits per chip.
Normally, the supercomputer is used for solving or handling large scale
numerical problems in scientific and engineering fields. These include
applications in electronics, petroleum engineering, weather forecasting,
structural analysis, chemistry, medicine, and physics.
Input Output and Memory Devices

1 mark

Question 1.
What are input devices?
Answer:
The devices which are used to input data and programs in the computer, are
known as “Input Devices”.

Question 2.
List any two commonly used input devices.
Answer:
Keyboard and Mouse

Question 3.
What is the name of the standard keyboard?
Answer:
QWERTY is the name of the standard keyboard.

Question 4.
How many keys are there in a standard keyboard?
Answer:
There are 101 keys in a standard keyboard.

Question 5.
What are ergonomic keyboards?
Answer:
It is a special type of keyboard that allows typing without much strain and
bending at the wrists. It reduces the muscle and finger pain while typin

Question 6

Expand the term OMR.


Answer:
Optical Mark Reader/Recognition.

Question 7.
Expand the term OCR.
Answer:
Optical Character Reader/Recognition.
Question 8.
Expand the term MICR.
Answer:
Magnetic Ink Character Reader/Recognition.

Question 9.
Expand the term BCR.
Answer:
Bar Code Reader/Recognition.

Question 10

What is a scanner?
Answer:
Scanner is an input device that converts the document image into digital form
so that it can be fed into the computer.

Question 11.
Define track and sector.
Answer:
Tracks are concentric circles, and sectors are pie-shaped blocks on a track.

Question 12.
What is a plotter device?
Answer:
Plotters are printers that are used to print graphical output on paper. They use
a single color or multicolor pens to draw pictures such as blueprints, graphs,
drawings, charts, maps, etc.

2 Marks

Question 13.
What are output devices? Name any two commonly used output devices.
Answer:
The devices that bring information OUT of a computer system are called
output devices.

Visual Display Unit and Printer

Question 14.
What do you mean by soft copy and hard copy?
Answer:
A soft copy is an electronic copy of data viewed on a computer‟s display
screen or transmitted as an e-mail attachment.

A hard copy is a physical reproduction or representation of the data, such as a


printed page or photograph.

Question 15.
Mention any two impact printers.
Answer:
Daisy wheel printer and dot matrix printer.

Question 16.
List any two non-impact printers.
Answer:
Ink-jet printer and Laser printer.

Question 17.
Give the different types of computer monitors.
Answer:
The different types of computer monitors are CRT(Cathode Ray Tube.)
monitors, LCD (Liquid Crystal Display/Diode.)monitors, TFT (Thin Film
Transistor.) monitors and LED (Light Emitting Diode) monitors.

Question 18.
Expand PROM.
Answer:
Programmable Read-Only Memory

Expand EPROM.
Answer:
Erasable Programmable Read-Only Memory.

Expand EEPROM.
Answer:
Electrically Erasable Programmable Read-Only Memory.

Question 19.
What is cache memory?
Answer:
It is a small, fast memory location that exists between the main memory and
the CPU.
Question 20.
How is data stored in the hard disk? Define track and sector
Answer:
Data is stored on the surface of a platter in sectors and tracks.

Tracks are concentric circles, and sectors are pie-shaped blocks on a track.

3 Mark

Question 21.
Write a note on a computer keyboard.
Answer:
The keyboard is a standard input device. It is used to input data and programs
to the computer. It has alphabets, numeric and symbol keys. It has special keys
including function keys, control keys, and arrow keys. Today most users use
the QWERTY style keyboards. Keyboards are connected to the computer
through cables or wireless. The ergonomic keyboard, virtual keyboard, and
compact keyboard are a few other special types of keyboards.

Question 22.
Write a note on a mouse.
Answer:
The mouse is an input device used to point to a particular place on the screen
and select it in order to perform one or more actions. It can be used to select
menu commands, size windows, start programs, etc. The most common kind
of mouse has left and right buttons on top. The left mouse button is normally
used to select the items on the screen. The different types of are mechanical
mouse, optomechanical mouse, and optical mouse.

Question 23.

Write a short note on OMR and where is it used?


Answer:
Optical Mark Reader:
It is an input device that can detect marks made in predetermined positions
on a pre-printed paper called OMR sheets. An optical mark reader shines a
light beam onto the input document and is able to detect the marks made on
it because less light is reflected back from them than from the unmarked
paper. It is used to grade test papers.
Question 24.
Write a short note on OCR and where is it used?
Answer:
Optical Character. Recognition (OCR) is an input device that is used to scan the
printed/ handwritten text materials into computer-readable text making it easy
to edit and store. It is used to read the cheque numbers in the banks and
millions of magazines and letters are sorted every day by OCR machines.

Question 25.
Write a short note on MICR and where is it found?
Answer:
Magnetic Ink Character Reader enables special characters printed in magnetic
ink to be read and input rapidly to a computer. MICR is used extensively in
banking because magnetic-ink characters are difficult to forge and are
therefore ideal for marking and identifying cheques.

Question 26.
Write a note on BCR.
Answer:
Barcodes are a set of black lines of different thicknesses with spaces between
them representing numeric characters. Bar code readers are used to input data
from bar codes. Most products in departmental stores/ bookshops have bar
codes on them. Bar code readers work by shining a beam of light on the lines
that make up the bar code and detecting the amount of light that is reflected
back.

Question 27.
What are the differences between main or primary memory and secondary
memory?
Answer:
Primary Memory:

 Primary memory is smaller in storage capacity.


 Primary memory is costly but very fast in read/write data.
 It is accessible by the CPU only.

Secondary Memory:

 They can store a very large volume of data.


 They are relatively cheaper but slower in read/write data.
 They are accessible to the user.
Question 28.
Compare volatile and non-volatile memories.
Answer:
1. Volatile memory:
In volatile memory, information written on it can be accessed as long as the
power is on. As soon as the power is off, it can not be accessed because
data is erased automatically and made empty.

 2. Non-volatile memory:
The information stored in it is not lost even if the power supply goes off.
It‟s used for the permanent storage of information.

Question 29

Write the differences between static RAM and dynamic RAM.


Answer:
Static RAM:

 SRAM uses six transistors for each memory cell.


 SRAM doesn‟t need a refresher circuit.
 SRAM is costlier and used for the smaller and faster cache memory.

Dynamic RAM:

 DRAM uses a single capacitor and a transistor for each memory cell
 DRAM requires to be refreshed periodically.

Question 30.
Compare the characteristics of impact printers and non-impact printers.
Answer:

Non-impact printer Impact printer


Produces text and images when tiny wire pins on print
Produces text and graphics on paper without actually
head strike the ink ribbon by physically making contact
striking the paper
with the paper

Reasonably fast Low printing speed

High quality of output, capable of printing fine and


Print quality poor in some types on low Print quality
smooth details
Uses ink spray or toner powder Uses ink ribbon

More expensive Less expensive

Generally much quieter than impact printers because


Generally noisy, because of the striking activity
there is no striking mechanism

Can handle graphics and often a wider variety of fonts


Poor graphics or almost none at all
than impact printers

Print is possible on transparencies Print is not possible on transparencies

Measured in DPI Measured in CPS

 DRAM is cheaper and slower and is used for the large main memory.

Question 31.
Explain different types of printers.
Answer:
1. Dot-matrix printer:
Dot-matrix printer is an impact printer that prints text and graphics on the
paper by using tiny dots to form the shapes. It uses a set of metal pins known
as print head to strike an inked printer ribbon and produce dots on the paper.
These combinations of dots give the desired shape on the paper. Generally,
they print with a speed of 50 to 500 characters per second as per the quality of
the printing is desired. The quality of the print is determined by the number of
pins used (varying from 9 to 24).

2. Line printers:
It is a high-speed printer capable of printing an entire line at one time. A fast
line printer can print as many as 3,000 lines per minute. The disadvantages of
line printers are that they cannot print graphics, the print quality is low, and
they are very noisy.

3. Inkjet printers:
Ink-jet printers are non-impact line printers. The ink is stored in disposable ink
cartridges, often a separate cartridge is used for each of the major colors. It
prints by spraying small, electrically charged droplets of ink from nozzles
through holes in a matrix at high speed onto paper. Ink-jet printers can print
in color and are noiseless and cheaper than a color laser printer. However,
they are slower and the print resolution is between 300 and -1200 dpi.

4. Laser printers:
The laser printer uses a laser to draw the image onto the printer‟s drum, which
carries an electric charge. The parts of the drum hold the electrical charge are
able to pick up the dry powder type of ink, also called toner, from within the
printer. This ink is then fused to the paper, using heat, as the paper rolls over
the drum. After the document is printed, the electrical charge is removed from
the drum and the excess toner is collected. Laser printers produce good
quality prints with resolutions ranging from 300 dpi to 1200 dpi.

5. Thermal printers:
A thermal printer is a printer which uses heated elements to print. Direct
thermal and thermal wax transfer are the two types of thermal printers. These
printers are relatively efficient and quiet, and they come in a number of sizes
and styles for different printing needs. A thermal printer has a print head
containing many small resistive heating pins that on contact, melt wax-based
ink onto ordinary paper or burn dots onto a specially coated paper.

Question 32.
Write a short note on RAM.
Answer:
RAM (random access memory) is a primary memory in a computer where the
operating system, application programs, and data currently in use are kept so
that they can be quickly accessed by the CPU. RAM is much faster to read
from and write to than the other kinds of storage in a computer. It is a volatile
memory which that means data can be stored ones as long as the computer is
on. There are different types of RAM.

1. Static RAM:
SRAM is one type of RAM and it is a volatile memory. In an SRAM, each bit
that stores data is made up of four or six transistors that make up a flip-flop.
There are additional transistors that are used to control read and write
accesses of storage cells. Each SRAM cell can be in three different states called
to read, write and standby. A cell is in the reading state when data has been
requested and it is in writing state when the data in the cell is modified. The
cell is in the standby state when it is idling.

2. Dynamic RAM:
DRAM is also a volatile memory that uses separate capacitors to store each bit.
Capacitors, when not charged, represent the value 0 of a bit and when
charged represent the value 1. Since the capacitors discharge with time, they
need to be refreshed periodically to maintain the values stored in them. Each
memory cell in a DRAM consists of a capacitor and a transistor and these cells
are arranged in a square array.
3. SDRAM Synchronous Dynamic Random Access Memory:
SDRAM is a type of main memory that synchronizes itself with the computer‟s
system clock. This type of memory synchronizes its input and output signals
with the incoming clock that is used in the system board. Its speed rating is
given in MHz to easily compare it to system board bus speeds.

By doing so, data transactions can continually take place with each successive
rising edge of the clock. The clock is used as the main determining factor for
memory data operation. The memory array is composed of two banks that can
be accessed independently.

4. EDO RAM:
EDO is short for Extended Data Out-and is a type of memory that was first
used with Pentium computers. EDO allows a CPU to access memory 10 to 15
percent faster than the compatible Fast Page memory.

5. DDR RAM:
DDR (Double Data Rate DRAM) is similar to SDRAM. The transfer of data for
DDR components can be performed at both edges of the clock signal. This
allows a double rate of transmission speed enabling the device to operate at
speeds twice that of typical SDRAM devices.

6. DDR2 RAM:
The main benefit is speed runs its bus at twice the speed of the memory cells
it contains. This enables faster bus speeds than older DDR memory. It also
consumes less power than DDR.

Question 33.
Explain a hard disk in detail.
Answer:
Hard disk is a secondary storage device. It is a disk pack consisting of several
metal platters coated with a magnetic material, rotating at high speed (7200
revolutions per second). Each surface has a read/write head mounted on an
arm. The heads can only move in one radial direction. Both sides of a platter
are used. Each surface is divided into concentric circles or tracks, typically 1000
tracks per platter.

Each track is divided into about 100 sectors, separated by gaps. To access data
in a specific location, the arm has to be positioned over the proper track, this
takes about 10-20 ms (1 ms = 1 millisecond = 0.001 s). The head waits until
the desired sector is under it; this takes about 6 ms. Once the sector is found,
the data can be read at a rate of 4 Mb/s.
Hard Disk Components:
A number of disks on which data is stored (the more disks, the greater the
drive‟s capacity).

A motor to rotate the disks

Ahead to read and write data (The heads “fly” over the surface of a disk
supported by a few molecules of air)

An actuator to move the heads over the disks

Each disk is segmented radially into tracks. Tracks are about 300 millionths of
an inch apart. Each track is divided into sectors. A sector is the smallest
addressable unit on a direct access storage device.

A cylinder is made up of all the tracks that are at the same location of each
platter in the device.
The storage capacity of the hard disk ranging from several GigaBytes (250GB)
to several Terra Bytes (2 TB). There are internal hard disk and external hard
disks.

Question 34.
Write a note on Magnetic Tape.
Answer:
The Magnetic Tapes is the Type of Secondary Storage device and is used for
taking backup of data. They contain some magnetic fields and are used to
convert data into sequential form and load into the tape. They contain a
ribbon which is coated with the magnetic material only on one side. There is
ahead which accesses and reads the data which is recorded on the tape. While
accessing/reading data it is possible to move along to different locations
either forward. On backward to get the required information.

The only hitch is one cannot directly land on a location, but has to wind
forward on rewind as the case may be to get to the required data. Tape drives
are used for inserting and winding/new winding to tapes mag. Tapes are
prone to get damaged easily due to human errors. A very large amount of
data can be stored, in the tap.
Advantages:

The cheapest form of storage per megabyte of storage.


Can store large amounts of data in terabytes per tape cartridge.

It can be used to do the back up overnight or over the weekend.

Disadvantages:

Slow due to serial access technique

Need a special piece of equipment to record and read the data.

The data may get corrupted if the tape is placed near a strong magnetic field.

PROBLEM SOLVING METHODOLOG


Define problem-solving.
Answer:
It is the process of expressing the solution of a specific problem, in terms of
simple operations that can be understood by the computer.

What are the steps involved in problem analysis?


Answer:
The steps involved in problem analysis are:

a. Data we need to provide (input) and


b. Information we want the program to produce (the output).
c. Write the tools used in the design of a solution.
Answer:
The algorithm and flowchart tools are used in the design of a solution.

Define an algorithm.
Answer:
An algorithm is a “step by step procedure to solve a given problem infinite
number of steps”.

Define the flowchart.


Answer:
A flowchart is a pictorial or graphical representation of a solution to any
problem.
What is a pseudo code?
Answer:
Pseudo code is structured English that consists of short, English phrases used
to explain specific tasks within a program‟s algorithm.

Define coding.
Answer:
The process of translating the algorithmic solution or flowchart solution into a
set of instructions in a programming language is called as coding.

What is testing?
Answer:
It is the process of checking the program logic, by providing selected sample
data and observing the output for correctness.

What do you mean by debugging?


Answer:
The process of detecting the errors and correcting the errors in a program is
called as debugging.

What is the function of compiler?


Answer:
It is a translator software which converts source program into its equivalent
machine language object program.

Define object program.


Answer:
A machine language program generated by the compiler is called object
program.

What is syntax error?


Answer:
It refers to an error in the syntax of a sequence of characters or tokens that is
intended to be written in a particular programming language.

What are semantic errors?


Answer:
An error, which occurs due to the incorrect logic and a solution is called a
semantic error.
What are run time errors?
Answer:
The errors that may occur during execution of the program are called run time
errors.

What is top-down design?


Answer:
It is the process of dividing a problem into subproblems and further dividing
the subproblems into smaller subproblems and finally to problems that can be
implemented as program statements.

What is bottom-up design?


Answer:
It is the process of beginning design at the lowest level modules or
subsystems and progressing upwards to the design of the main module.

What is structured programming?


Answer:
It is an easy and efficient method of representing a solution to a given
problem using sequence, selection and iteration control.

What is the use of the assignment statement? Give an example.


Answer:
The assignment statement is used to store a value in a variable. For example,
let A = 25

What is unconditional looping? Give an example.


Answer:
If a set of statements are repeatedly executed for a specified number of times,
is called unconditional looping. For example, for a conditional statements.

What is the difference between a program flowchart and system flowchart?


Answer:
A program flowchart details the flow through a single program. Each box in
the flowchart will represent a single instruction or a process within the
program.
A system flowchart will show the flow through a system. Each box will
represent a program or a process made up of multiple programs.

Give the characteristics of a good program.


Answer:
Modification and portability are the two important characteristics of a good
program.

Give the list of statements that can be used in structured programming.


Answer:

 Sequence of sequentially executed statements.


 Conditional execution of statements.
 Iteration execution statements.

Give the list of statements that cannot be used in structured programming.


Answer:

a. go to statement
b. break or continue statement
c. multiple exit points.

3/5 Marks

Explain the stages of problem-solving methodology.


Answer:
The stages of problem-solving methodology are
1. Problem definition:
The problem should be clearly understood by the solution provider. One has
to analyze what must be done rather than how to do it and then is requires to
developing the exact specification of the problem.

2. Problem Analysis:
In problem analysis, we try to understand what are the inputs to be specified
and what are the required outputs.

3. Design of a solution using design tools:


The design of a solution includes a sequence of well-defined steps that will
produce the desired result (output). Algorithms and flowcharts are used as
design tools and represent the solution to a problem.

4. Coding:
The process of writing program instructions for i.e., it is the process of
transforming algorithm/flowchart into a program code using programming
language instructions.
5. Debugging:
It is the process of detecting and correcting the errors in the program. This
stage is also referred to as verification.

6. Program Documentation:
It is a reference material that contains details about a program and functions
of different programs of software. Documentation helps other users to
understand the program and use it conveniently more effectively.

Explain the characteristics of the algorithm.


Answer:
Characteristics of the algorithm

a. It must be simple.
b. Every step should perform a single task.
c. There should not be any confusion at any stage.
d. It must involve a finite number of instructions.
e. It should produce at least one output.
f. It must give a unique solution to the problem.
g. The algorithm must terminate and must not enter into infinity.

What are the advantages and disadvantages of an algorithm?


Answer:
Advantages:

a. Easy to understand since it is written in universally a spoken language


like English.
b. It consists of a finite number of steps to produce the result.
c. Easy to first develop the algorithm.
d. It is independent of any programming language, (universal).
e. Easy program maintenance.

Disadvantages:

a. It is time-consuming and difficult to understand for larger and complex


problems.
b. Understanding complex logic through algorithms would be difficult.
Write the steps involved in developing a flowchart.
Answer:
Steps involved in developing a flowcharts

1. Understand the problem statement clearly before developing the


flowchart.
2. Study the outputs to be generated and the required inputs to solve the
problem.
3. Design the process in such a way that it produces the desired result.
4. Test the flowchart by giving test data.
5. Verify the result for correctness. Make suitable changes, if required, and
repeat the process.

What are the advantages and disadvantages of a flowchart?


Answer:
Advantages:

 It is a means of communication and easy to understand.


 Easy to convert into a program code.
 Independent of programming language, i.e., A flowchart can be used to
write programs using different programming languages.
 Easy to test the program for errors and easy removal of such errors.

Disadvantages:

 It is time consuming process as it makes use of a number of symbols.


 It is difficult to show the complex logic using a flowchart.
 Any changes in the flowchart needs redrawing the flowchart again.

Write a note on program errors.


Answer:
The different program errors are as follows;
1. Syntax error:
An error occurs when there is a violation of the grammatical rules of a
programming language‟s instructions. It happens at the time of compilation.
Such errors need to be rectified before proceeding further.

2. Semantic errors:
An error, which occurs due to the incorrect logic in a solution is called
semantic error. It also occurs due to the wrong use of grammar in the
program.

3. Runtime Errors:
occur at run-time. Such an error causes a program to end abruptly or even
cause system shut-down. Such errors are hard to detect and are known as
„Bugs‟.

4. Logical Error:
It may happen that a program contains no syntax or run-time errors but still, it
doesn‟t produce the correct output. It is because the developer has not
understood the problem statement properly. These errors are hard to detect
as well. It may need the algorithm to be modified in the design phase and
changing sources code.

Write a short note on flowchart symbols.


Answer:
Symbols used in flowcharts
Explain the top-down approach in brief.
Answer:
Top-Down Approach:
It is based on a concept called divide and conquer. A given problem is solved
by breaking it down into smaller manageable parts called modules. Hence it is
also called as stepwise refinement. The subprograms are further divided into
still smaller subproblems. Finally, the subproblems are solved individually, and
all these give the solution to the overall problem.

Properties of Top-Down Analysis:

1. Understandability: The individual modules are organized to execute in a


particular sequence.
2. This helps to understand the program behaviour more easily.
3. Clear Identification of tasks.
4. Easy program maintenance.
5. Removes duplication or repetition of coding in a problem.
6. Enhances the feature of code reusability.
OBJECT ORIENTED CONCEPTS

What is Structured programming?


Structured programming approach was a disciplined approach which limits the branching to a small
set of well-behaved construction (ex: if, if-else, while etc).
What is OOP’s?
Object oriented programming (OOP) is a concept that combines both the data and the functions that
operate on that data into a single unit called the object.
Explain the characteristics of OOP’s.

1. Modularity:  Module is a logically self contained unit that can be tested and executed
independently.  Modularity is a technique adopted to divide a complex problem into a number of self
contained independent programming fragments or modules.
2. Abstraction:  Abstraction is an act which represents the essential features of an entity without
including explanations or any background details about it.
3. Data Encapsulation:  Wrapping of data and functions into a single unit is called data
encapsulation.  The concept of insulating the data from direct access by the program is called data
hiding.
4. Inheritance:  Inheritance is the process by which objects of one class acquires the properties of the
objects of another class. (Or)  The process of deriving a new class from the existing class is called
inheritance.
5. Polymorphism:  Polymorphism is the ability for a message to be processed in more than one
form.  The process of making an operator to exhibit different behaviors in different instances is
known as operator overloading.  Using a single function name to perform different types of tasks is
known as function overloading.
6. Dynamic Binding:  Binding means linking of a procedure call to the code to be executed when it is
called.  Dynamic binding means binding the procedure call during program run rime.
7. Message Passing:  Passing message objects and invoking the function by the object by sending a
message is known as message passing.

Mention the advantages of OOP’s


OOPs Benefits:
1. OOPs model the real world entity very well.
2. Inheritance eliminates the redundancy (repetition) of code and hence supports code reusability.
3. Data hiding helps to build secured programs.
4. Multiple instances (objects) can be created.
5. Work can be divided easily.
6. OOPs can be easily upgraded from small to large systems.
7. Complexity can be easily managed. 8. Message passing concept helps the objects to communicate
and share data.

Mention the disadvantages of OOP’s


OOPs disadvantages:
1. OOPs use tricky method to do the programming.
2. Special skills such as thinking in terms of design skills, programming skills and object is required
for a programmer.
3. Proper planning and design is required before programming using OOPs technique.

Mention the various applications of OOP


OOPs Applications:
1. Object oriented databases.
2. Hypermedia, expert text and hypertext.
3. Artificial intelligence and expert systems.
4. Decision support systems and office automation systems.
5. Parallel programming and neural networks.
6. CAD, CAM, CIM systems.
7. Simulation and modeling.

INTRODUCTION TO C++

Explain Characteristics of C++


Object-Oriented Programming: It allows the programmer to design applications like a
communication between object rather than on a structured sequence of code. It allows a
greater reusability of code in a more logical and productive way.
 Portability: We can compile the same C++ code in almost any type of computer &
operating system without making any changes.
 Modular Programming: An application’s body in C++ can be made up of several source
code files that are compiled separately and then linked together saving time.
 C Compatibility: Any code written in C can easily be included in a C++ program without
making any changes.
 Speed: The resulting code from a C++ compilation is very efficient due to its duality as
high-level and low-level language.
 Machine independent: It is a Machine Independent Language.
 Flexibility: It is highly flexible language and versatility.
 Wide range of library functions: It has huge library functions; it reduces the code
development time and also reduces cost of software development.
 System Software Development: It can be used for developing System Software Viz.,
Operating system, Compilers, Editors and Database
.
Mention any 4 tokens of c++
1. Identifiers:
 Identifiers is a name given to programming elements such as variables, functions,
arrays, objects, classes, etc.
 It contains letters, digits and underscore.
 C++ is a case sensitive; it treats uppercase and lowercase characters differently.
 The following are some valid identifiers: Pen time580 s2e2r3 _dos _HJI3_JK
2. Keywords:
Keyword is a predefined word that gives special meaning to the complier. The
programmer is not allowed to change its meaning.
 These are reserve for special purpose and must not be used as identifier name.
 Example: for, if, else, this, do, float, while, switch etc.
3. Constants:
 A constant are identifiers whose value does not change during program execution.
 Constants are sometimes referred to as literal
 A constant or literal my be any one of the following:
o Integer Constant
o Floating Constant
o Character Constant
o String Constant
4. Punctuators:
Punctuators in C++ have syntactic and semantic meaning to the compiler.
 Some punctuators can be either alone or in combination.
Ex: # % + - =

Explain the rules for naming a variable


o Identifiers are a sequence of characters which should begin with the alphabet either from
A-Z (uppercase) or a-z (lowercase) or _ (underscore).
o C++ treats uppercase and lowercase characters differently. For example, DATA is not same
as data.
o No Special character is allowed except underscore “_”.
o Identifier should be single words i.e. blank spaces cannot be included in identifier.
o Reserved Keywords should not be used as identifiers. o Identifiers should be of reasonable
length.
Explain about c++ operators
An operator is a symbol that tells the compiler to perform specific mathematical or logical
manipulations.
o Arithmetic Operator o Relational Operator
o Logical Operator o Unary Operator
o Conditional Operator o Bitwise Operator
o Assignment Operator o Other Operator
Unary Binary Ternary
Unary operators operate on The binary operator The ternary operator
only one operand operates on two operands operates on three operands
Ex: ++, -- =,+,-,*,%,/ ?:
Unary Operators
 Unary operators have only one operand; they are evaluated before any other operation
containing them gets evaluated.

Binary Operators
Arithmetic Operator
Arithmetic operators are used to performing the basic arithmetic operations such as
arithmetic, subtraction, multiplication, division and modulo division (remainder after
division).
Operator Description Example( a=10, b=20)
+ Adds two operand a + b = 30
- Subtracts second operand from the first a - b = -10
* Multiply both operand a * b = 200
/ Divide numerator by denominators b/a=2
% Modulus operators and remainder of b%a=0
after an integer division
Relational Operator
 Relational Operator is used to comparing two operands given in expressions.
 They define the relationship that exists between two constants.
 For example, we may compare the age of two persons or the price of two
items….these comparisons can be done with the help of relational operators.
 The result in either TRUE(1) or FALSE(0).Some of the relational operators are:
Operator Description Example( a=10, b=20)
< Checks if the value of left operand is a < b returns false(0)
less than the value of right operand
<= Checks if the value of left operand is a <= b returns false(0)
less than or equal to the value of right
operand
> Checks if the value of left operand is a > b returns true(1)
greater than the value of right operand
>= Checks if the value of left operand is a >= b returns false(0)
greater than or equal to the value of
right operand
== Checks if the value of two operands is a = = b returns false(0)
equal or not
!= Checks if the value of two operands is a != b returns true(1)
equal or not
Logical Operators
 Logical operators are used to testing more than one condition and make decisions.
Some of the logical operators are
Operator Meaning Description Example
&& Logical AND If both the operands are non- If a=10 and b=5
zero then condition becomes then, ((a==10) &&
true. (b>5)) returns
false.
|| Logical OR If any of the two operands is If a=10 and b=5
non- zero then condition then, ((a==10) ||
becomes true (b>5)) returns true.
! Logical NOT If a condition is true then the If a=10 then,
Logical NOT operator will make !(a==10) returns
false. false.
Bitwise Operators
 A bitwise operator works on bits and performs bit by bit operation.
 Bitwise operators are used in bit level programming
Operators Meaning of operators
& Bitwise AND
| Bitwise OR
^ Bitwise exclusive OR
~ Bitwise complement

The truth table for bitwise AND ( & ), Bitwise OR( | ), Bitwise XOR ( ^ ) are as follows:
A B A&B (Bitwise A|B (Bitwise A^B (Bitwise
AND) OR) NOT)

0 0 0 0 0
0 1 0 1 1
1 0 0 1 1
1 1 1 1 0

Assignment Operators
 The most common assignment operator is =.
This operator assigns the value on the right side to the left side.
 Example:
var = 5 //5 is assigned to var
a = b; //value of b is assigned to a
5 = b; // Error! 5 is a constant.

Conditional Operator:
 A ternary operator pair ”? :” is available in C++ to construct conditional expressions
of the form: exp1? exp2: exp3, where exp1,exp2, and exp3 are expressions,
 The operator “?:” works as follows: exp1 is evaluated first. If it is true, then the
expression exp 2 is evaluated and becomes the value of the expression. If exp1 is
false, exp3 is evaluated and its value becomes the value of the expression.
 Example: a=10; b=5; x = (a>b) ?a:b;

Special Operator:
Operators Meaning of operators
Ssizeof() It is a unary operator which is used in
finding the size of the data type.
Example: sizeof(a)
Comma (,) Comma operators are used to linking
related expressions together. Example:
int a=10, b=5
. (dot) and -> (arrow) Member Operator used to reference
individual members of classes, structure
and unions.

Cast Casting Operator convert one data type


to another.
& Address Operator & returns the address
of the variable
* Pointer Operator * is pointer to a
variable.

Explain the types of conversions in C++


Type Conversion:
 Converting an expression of a given type into another type is known as type-casting or
type conversion.
 Type conversions are of two types, they are:
o Implicit Conversion
o Explicit Conversion
Implicit Conversion:
 Implicit Conversions do not require any operator.
 They are automatically performed when a value is copied to a compatible type.
 The C++ compiler will implicitly convert or promote values if it can be done safely.  If not
it will generate a warning or an error depending on the conversion required.
 For Example: short a = 2000; int b; b = a;
Explicit Conversion:
 C++ is a strong-typed language. Many coversions, eqpecially those that imply a different
interpretation of the value, require an explicit conversion.
 For Example:
short a = 2000;
int b; b = (int) a; //c-like cast notation
b = int (a) // functional notation
 Implicit Conversions do not require any operator.

Explain the structure in detail


General Structure of C++ Program:
General Syntax Example Program
/* General Structure */ /* A Simple Program to display a Message * /
Pre-processor Directives #include <iostream.h>
main ( ) void main( )
{ {
Variable Declarations; cout<<”This is my first c++ program”;
Executable Statements; }
}
Comments or Documentation Section:
 Comments are the pieces of code that compiler ignores to compile. There are two types of
comments in C++.
1. Single line comment: The comments that begin with // are single line comments. The
Compiler simply ignores everything following // in the same line.
2. Multiline comment: The multiline comment begin with /* and end with */ . This means
everything that falls between /* and */ is consider a comment even though it is spread
across many lines.
Pre-processor Directives (Linker Section):
 The linker section begins with a hash (#) symbol. #include …… is a preprocessor directive.
 It is a signal for preprocessor which runs the compiler.
 The statement directs the compiler to include the header file from the C++ Standard
library.
 Example:
# include <iostream.h>
#include<conio.h>
Definition:
 In this section, we can define constants, expressions, structures, functions, classes and
objects.
 After the linker section gets executed, the definition section is executed by the compiler
and this section is optional.
 Example: # define PI 3.14
Global Declaration
 We can declare variables here and those variables which are declared before the main
function or any other function then the life or scope of such variables remain throughout
function and can be used by other functions of the program.
main( ) Function:
 As the name itself indicates, this is the main function of every C++ program.
 Execution of a C++ program starts with main ( ).
 No C++ program is executed without the main () function.
 The function main () should be written in the lowercase letter and shouldn’t be terminated
with a semicolon.
 It calls other library functions and user-defined functions.
 There must be one and only main ( ) in every C++ program
Braces { }:
{
…………..;
…………..;
}
 The statements inside any function including the main ( ) function is enclosed with the
opening and the closing braces.  Declarations:
 The declaration is the part of the C++ program where all the variables, arrays, and
functions are declared with their basic data types.
 This helps the compiler to allocate the memory space inside the computer memory.
 Example: int sum, x, y;  Statements:
 These are instructions to the computer to perform some specific operations.
 These statements can be expressions, input-output functions, conditional statements,
looping statements, function call and so on. They also include comments.
 Every statement end with semicolon “;” except control statements.
Semicolon “;” also known as Terminator.
 Example:
cout<<:This is my first c++ program”;

Explain any 4 library functions.


They include mathematical functions, character functions, string functions, and console
input-output
 C++ provides many built-in functions that save the programming time.
Library Function:
C++ provides many built-in functions that save the programming time.
They include mathematical functions, character functions, string functions, and console
input-output functions.

 Mathematical Function:
Some of the important mathematical functions in header file math.h are
Function Meaning
sqrt(x) Square Root of X
pow(x, y) x raised to the power y
sin(x) Sine of an angle x(measured in radians)
cos(x) Cosine of an angle x (measured in radians)
tan(x) Tangent of an angle x (measured in radians)
asin(x) Sin-1(x) where x (measured in radians)
acos(x) Cos-1(x) where x (measured in radians)
exp(x) Exponential function of x (ex)
log(x) Logarithm of x
log 10(x) Logarithm of number x to base 10
abs(x) Absolute value of integer number x
fabs(x) Absolute value of real number x

Character Function:
Some of the important mathematical functions in header file ctype.h are
Function Meaning
isalpha(c) It returns True if C is an uppercase letter and false if c is lowercase.
isdigit(c) It returns True if c is a digit (0 to 9) otherwise false
isalnum(c) It returns True if c is digit from 0 through 9 or an alphabetic
character
(either uppercase or lowercase) otherwise false
islower(c) It returns True if c is a lowercase letter otherwise False
isupper(c) It returns True if c is a uppercase letter otherwise False
toupper(c) It converts c to uppercase letter
tolower(c) It converts c to lowercase letter.

String Function:
Some of the important mathematical functions in header file string.h are
Function Meaning
strlen(s) It gives the no. of characters including spaces present in a
strings.
strcat(s1, s2) It concatenates the string s2 onto the end of the string s1. The
string s1 must have enough locations to hold s2.
strcpy(s1, s2) It copies character string s2 to string s1. The s1 must have
enough
storage locations to hold s2
strcmp((s1,s2)==0) It compares s1 and s2 and find out whether s1 equal s2, greater
strcmp((s1,s2)>0) than s2 or s1 less than s2.
strcmp((s1,s2)<0)
strcmpi((s1,s2)==0) It compares s1 and s2 ignoring case and find out whether s1
strcmpi((s1,s2)>0) equal
strcmpi((s1,s2)<0) s2, greater than s2 or s1 less than s2.
strrev(s) It converts a string into its reverse.
strupr(s) It converts a string s into upper case.
strlwr(s) It converts a string into lower case.

Console I/O Function:


Some of the important mathematical functions in header file stdio.h are
Function Meaning
getchar() It returns a single character from a standard input device (keyboard). It
takes
no parameter and the returned value is the input character.
putchar() It takes one argument, which is the character to be sent to the output
device.
It also returns this character as a result.
gets() It gets a string terminated by a newline character from the standard input
stream stdlin.
puts() It takes a string which is to be sent to output device.
General Purpose standard Library Function:
Some of the important mathematical functions in header file stdio.h are
Function Meaning
randomize() It initialize/seeds the random number generator with a random
number.
random(n) It generates a random number between 0 to n-1.
atoi(s) It converts string s into a numerical representation.
itoa(n) It converts a number to a string.

Some more Function:


getch( ) and getche( ) functions
The genral form of the getch( ) and getche( ) is
ch = getche( );
ch1 = getch( );
ch and ch1 are the variables of type character. They take no argument and require the
conio.h header
file.
On execution, the cursor blinks, the user must type a character and press enter key.
The value of the character returned from getche( ) is assigned to ch.
The getche( ) function echoes the character on the screen.
Another function, getch( ), is similar to getche( ) but does not echo character to the screen.

DATA TYPES
Define datatype.
A variable is an object or element and it is allowed change during the execution of the program.
Give the syntax of declaring and initialization of variable.
The syntax for declaring a variable is:
datatype variable_name;

 The variable_name is an identifier. These variables are used to denote constants, arrays, function,
structures, classes and files.

 The variables are named storage location whose values can be manipulated during program run.
Ex:
int a;

 Examples: Some valid variables are:


reg_no, marks, name, student1, dob;
Some invalid variables are:
Double - keyword cannot be name of the variable.
Total marks - empty spaces are not allowed between variables names
2student - variable name should be begin with an alphabet
?result - variable should begin with alphabet or underscore only.
Explain classification of data types
C++ data types can be classified as:
1. The fundamental data type(built-in data)
2. Derived Data type
3. User-defined data type
 The simple or fundamental data types are the primary data types which are not composed of any
other data types.

 The simple data types/fundamental data types include int, char, float, double and void.

The int type:

 The int type is used to store integers.

 Integers are whole numbers without any fractional parts

 This includes number such as 1, 45 and -9 are integers. An integer is allocated 2 bytes (16 bits) of
memory space.

 The possible operations include addition, subtraction, multiplication, division, remainder etc.
The char type:

 It is character data type to store any character from the basic character set.

 Characters are enclosed in single quotation marks (‘). ‘A’, ‘a’, ‘b’, ‘9’, ‘+’ etc. are character
constants.

 When a variable of type char is declared, the compiler converts the character to its equivalent ASCII
code.

 A character is allocated only 1 byte (8 bits) of memory space.

 A character is represented in a program by the keyboard char.

The float type:


 This represents the number with fractional part i.e. real numbers.

 The float type is used to store real numbers.

 Number such as 1.8, 4.5, 12e-5 and -9.66 are all floating point numbers.

 It can also be both positive and negative. The range of numbers we can store from -34e-38 to
3.4e38.

 Float is allocated 4 bytes (32 bits) of memory space.

The double type:

 The double and float are very similar. The float type allows you to store single precision floating
point numbers, while the double keyword allows you to store double precision floating point numbers.
 Its size is typically 8 bytes of memory space.

 The range of numbers we can store are from -1.7e308 to 1.7e308.


The void type:

 The void data type has no values and no operations.

 In other words both the set of values and set of operations are empty.

The bool type:

 The bool type has logical value true or false. The identifier true has the value 1, and the identifier
false has the value 0.

TYPE SIZE IN RANGE EXAMPLE


BYTES
int 2 -32768 to 32767 8, 100, -39

char 1 -128 to 127 ‘d’, ‘6’, ‘#’


float 4 3.4 x 10-38 to 3.4 x 1038 -1 45.345, 0.134, 3.142

double 8 1.7 x 10-308 to 1.7 x 10308 -1 3.14156778888888888

Explain enumerated data types with suitable example.


AN enumeration is a user defined type consisting of a set of named constants called enumerators.

 enum is a keyword that assigns values 0, 1, 2…… automatically.

 This helps in providing an alternative means for creating symbolic constants.

 The syntax for enum is as follows: enum [tag] { enum – list} ; //for definition for enumerated type
enumtaddeclarator; //for declaration of variable type tag

 Example 1:
enum choice { very_bad, bad, satisfactory, good, very_good}; choice mychoice;

 Example 2:
enum MyEnumType { ALPHA, BETA, GAMMA }; Here, ALPHA takes the value 0, BETA takes
the value of 1, GAMMA takes the value of 2.

 Example 3:
enum footsize { small = 5, medium = 7, large = 10};
DATA TYPES
Define datatype.
A variable is an object or element and it is allowed change during the execution of the program.
Give the syntax of declaring and initialization of variable.
The syntax for declaring a variable is:
datatype variable_name;

 The variable_name is an identifier. These variables are used to denote constants, arrays, function,
structures, classes and files.

 The variables are named storage location whose values can be manipulated during program run.
Ex:
int a;

 Examples: Some valid variables are:


reg_no, marks, name, student1, dob;
Some invalid variables are:
Double - keyword cannot be name of the variable.
Total marks - empty spaces are not allowed between variables names
2student - variable name should be begin with an alphabet
?result - variable should begin with alphabet or underscore only.
Explain classification of data types
C++ data types can be classified as:
1. The fundamental data type(built-in data)
2. Derived Data type
3. User-defined data type
 The simple or fundamental data types are the primary data types which are not composed of any
other data types.

 The simple data types/fundamental data types include int, char, float, double and void.
The int type:

 The int type is used to store integers.

 Integers are whole numbers without any fractional parts

 This includes number such as 1, 45 and -9 are integers. An integer is allocated 2 bytes (16 bits) of
memory space.

 The possible operations include addition, subtraction, multiplication, division, remainder etc.
The char type:

 It is character data type to store any character from the basic character set.
 Characters are enclosed in single quotation marks (‘). ‘A’, ‘a’, ‘b’, ‘9’, ‘+’ etc. are character
constants.

 When a variable of type char is declared, the compiler converts the character to its equivalent ASCII
code.

 A character is allocated only 1 byte (8 bits) of memory space.

 A character is represented in a program by the keyboard char.


The float type:

 This represents the number with fractional part i.e. real numbers.

 The float type is used to store real numbers.

 Number such as 1.8, 4.5, 12e-5 and -9.66 are all floating point numbers.

 It can also be both positive and negative. The range of numbers we can store from -34e-38 to
3.4e38.

 Float is allocated 4 bytes (32 bits) of memory space.


The double type:

 The double and float are very similar. The float type allows you to store single precision floating
point numbers, while the double keyword allows you to store double precision floating point numbers.

 Its size is typically 8 bytes of memory space.

 The range of numbers we can store are from -1.7e308 to 1.7e308.

The void type:

 The void data type has no values and no operations.

 In other words both the set of values and set of operations are empty.

The bool type:

 The bool type has logical value true or false. The identifier true has the value 1, and the identifier
false has the value 0.

TYPE SIZE IN RANGE EXAMPLE


BYTES
int 2 -32768 to 32767 8, 100, -39

char 1 -128 to 127 ‘d’, ‘6’, ‘#’


float 4 3.4 x 10-38 to 3.4 x 1038 -1 45.345, 0.134, 3.142

double 8 1.7 x 10-308 to 1.7 x 10308 -1 3.14156778888888888

Explain enumerated data types with suitable example.


AN enumeration is a user defined type consisting of a set of named constants called enumerators.

 enum is a keyword that assigns values 0, 1, 2…… automatically.

 This helps in providing an alternative means for creating symbolic constants.

 The syntax for enum is as follows: enum [tag] { enum – list} ; //for definition for enumerated type
enumtaddeclarator; //for declaration of variable type tag

 Example 1:
enum choice { very_bad, bad, satisfactory, good, very_good}; choice mychoice;

 Example 2:
enum MyEnumType { ALPHA, BETA, GAMMA }; Here, ALPHA takes the value 0, BETA takes
the value of 1, GAMMA takes the value of 2.

 Example 3:
enum footsize { small = 5, medium = 7, large = 10};

Spreadsheets
Define an electronic spreadsheet.
Answer:
An Electronic spreadsheet is an application software and the spreadsheet is
divided into rows and columns to store items like student is marks, stocks,
income and expenses, debits and credits.

Define a workbook.
Answer:
A workbook is a set of electronic spreadsheets.

Define a cell.
Answer:
The intersection of a row and a column in a spreadsheet is called a cell.

What is the cell address?


Answer:
A cell address is a unique ID given to a cell represented by column name and
row name.

What is the default extension name for an excel file?


Answer:
The default extension name of an excel file is *.xls or *.xlsx
What is the size of a worksheet?
Answer:
There are 256 columns and 65536 rows in a worksheet.

What is the use of the autofill option?


Answer:
The autofill option can be used to insert a series of values in a range of cells
easily.

How is a formula entered in a spreadsheet?


Answer:
A formula is entered by beginning it with the = symbol. For example, =a1+ a2

What is the use of sum() function?


Answer:
The sum function is used to compute addition of a range of cell values.

Define a chart.
Answer:
A chart is a pictorial representation of some data.

Name any two types of charts.


Answer:
Bar graph and pie chart are two types of charts.

Give the short cut keys to select the entire worksheet.


Answer:
The short cut keys to select entire worksheet is Ctrl+Z.

What are the purposes of spreadsheets?


Answer:
Spreadsheets make it easy to display information, and formulas can be
inserted to work with the data. Information can also be sorted and filtered.
Data can be used be create charts.

Write the different spreadsheet software.


Answer:
The different spreadsheet software are

1. IBM Lotus 1-2-3 for Windows and


2. Apple Works and Numbers for Mac OS X.
What are the different applications of the spreadsheet?
Answer:

1. They are used in accounting to prepare balance sheet, auditing, etc.,


2. They are organizations where data can be represented using charts and
graphs.
3. They are used for statistical calculations

What is the difference between „save‟ and „save as‟ options?


Answer:
The „save‟ option saves the file under the current file name given by the user,
and „save as‟ option allows for change in the filename and location saves the
file.

Write any three mathematical functions.


Answer:
The sum() and product() and power() functions are three mathematical
functions.

Write any three statistical functions.


Answer:
The average(), max() and min() functions are three statistical functions.

Write any three date and time functions.


Answer:
The now(), today(), and year() functions are a few date and time functions.

Write any three financial functions.


Answer:
The PMT(), FV() and NPER() are three financial functions.

Write any three logical functions.


Answer:
The AND(), IF(), OR() are three logical functions.

Write any three text functions.


Answer:
The Concatenate(), len() and trim() are three text functions.

Mention the steps to add rows and columns in a worksheet.


Answer:
1. The steps to add rows:
Click on the row at the left extreme cell and on the insert menu insert a row.

2. The steps to add columns:


Click on the column insert columns.

Explain the steps used to change the row size and columns width in a
worksheet.
Answer:
Select cell, a format, a row height a height in numbers. Select cell, a format, a
column width a width in numbers.

Explain the steps of using the auto-format options.


Answer:
The steps of using the auto-format options are follows Govt format, a
autoformat, a Select the range of cells, a select the format from the list.

Give the steps to insert a chart in a worksheet.


Answer:
The steps to insert chart is a select range of cells, insert a chart, a chart type.

5 Mark

Write a short note on the spreadsheet.


Answer:
A spreadsheet is a document which is divided into rows and columns to record
such things as items in inventory, income, and expenses, debits and credits,
etc.

 In a spreadsheet, the COLUMN is defined as the vertical space. Letters


are used to name each COLUMN‟S location and the ROW is the
horizontal space. Numbers are used to assign each ROW‟S location.
 In a spreadsheet, the CELL is the space where a specified row and
column intersect. Each CELL is assigned a name according to its
COLUMN letter and ROW number.
Example: C3 is cell in column C row 3.

Explain the uses of spreadsheets.


Answer:
The different uses of spreadsheets are as follows;

1. Performing basic mathematical operations such as adding columns and


rows of figures.
2. Finding values such as profit or loss.
3. Calculating repayment plans for loans or mortgages.
4. Finding the average, maximum, or minimum values in a specified range
of data.
5. Graphing or charting data, to assist users in identifying data trends.
6. Sorting and filtering data to find specific information.
7. Creation of simple lists and tables of alphabetic or numerical data.
8. Creation and manipulation of simple (flat-file) databases.
9. Establish relationships between sets of numerical data.
10. Applies arithmetical, mathematical or statistical functions to numerical
datasets.
11. Represents datasets in graphical or chart form.

Explain the steps involved in drawing a chart in excel.


Answer:
A chart is a pictorial representation of data. The data is first entered in a
worksheet in a table format. The table shall contain a heading followed by the
numerical values. The steps in creating a chart are as follows;
Step 1:
Data is entered in the cells of an Excel spreadsheet.

Step 2:
Mouse is used to highlight the block of cells containing data, and then insert
chart is clicked on.

Step 3:
When the chart wizard comes up, column or bar graph and a subtype as
clustered or stacked type is chosen as per requirement.
Step 4:
If the user wants to switch what appears on the X and Y axis, right-clicking on
the bar graph, then on „Select Data,‟ and finally on „Switch Row/Column‟.

Step 5:
Labels and legends of the chart embedded if needed. User can click on the bar
graph, and then click the „Layout‟ tab. Here you can choose what layout you
prefer for the chart title, axis titles, and legend.

You might also like