GE6151 - CP 2 MARK AND 16 MARK - 2013 - Regulation
GE6151 - CP 2 MARK AND 16 MARK - 2013 - Regulation
PREPARED BY
C.KARPAGAVALLI,AP/CSE
www.studentsfocus.com
GE6151 Computer Programming Question Bank
UNIT I – INTRODUCTION
PART A (2 MARKS)
1. Define computers?
A computer is a programmable machine or device that performs pre-defined or programmed
computations or controls operations that are expressible in numerical or logical terms at high speed and
with great accuracy.
(Or)
Computer is a fast operating electronic device, which automatically accepts and store input data,
processes them and produces results under the direction of step by step program.
It stores data.
Accuracy.
Automation.
Endurance.
Versatility.
Storage.
Cost Reduction.
www.studentsfocus.com
GE6151 Computer Programming Question Bank
Mini Computer
Mainframe computer and
Super Computer
Light Pen.
Digitizer.
Touchpad.
Speakers.
Printer.
Headphone
www.studentsfocus.com
GE6151 Computer Programming Question Bank
Volatile memory: also known as volatile storage is computer memory that requires power to maintain the
stored information, unlike non-volatile memory which does not require a maintained power supply. It has
been less popularly known as temporary memory.
Non-volatile memory: nonvolatile memory, NVM or non-volatile storage, is computer memory that can
retain the stored information even when not powered.
13. Write the binary and octal equivalent of hexadecimal number 7BD? (APR2009)
Binary Equivalent of 7BD = (0111 1011 1101)2
Octal Equivalent of 7BD = (011 110 111 101) = (3675)8
14. Convert binary number 100110 into its octal equivalent? (JAN2009)
Octal equivalent of 100110 = (100 110) = (46)8
www.studentsfocus.com
GE6151 Computer Programming Question Bank
For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is
also placed in a register.
Analog computers are not precise Digital computers are more precise
The algorithm is expressed in a precise notation. This notation is known as “Computer Program”.
The instruction in the program executes one after another and outputs the expected result.
www.studentsfocus.com
GE6151 Computer Programming Question Bank
www.studentsfocus.com
UNIT-II
2 MARKS
Linking refers to the creation of a single executable file from multiple object files. In this step, it is
common that the linker will complain about undefined functions (commonly, main itself). During
compilation, if the compiler could not find the definition for a particular function, it would just assume
that the function was defined in another file. If this isn't the case, there's no way the compiler would know
it doesn't look at the contents of more than one file at a time. The linker, on the other hand, may look at
multiple files and try to find references for the functions that weren't mentioned.
The constants refer to fixed values that the program may not alter during its execution. These fixed values
are also called literals.
Constants can be of any of the basic data types like an integer constant, a floating constant, a character
constant, or a string literal. There are also enumeration constants as well.
The constants are treated just like regular variables except that their values cannot be modified after their
definition.
www.studentsfocus.com
GE6151 Computer Programming Question Bank
4. double
Enumerated data type variables can only assume values which have been previously declared.
Example :
enum month { jan = 1, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec };
Can be chosen by programmer in a meaningful way so as to reflect its function in the program.
Local
These variables only exist inside the specific function that creates them. They are unknown to other
functions and to the main program. As such, they are normally implemented using a stack. Local
variables cease to exist once the function that created them is completed. They are recreated each time a
function is executed or called.
www.studentsfocus.com
GE6151 Computer Programming Question Bank
Global
These variables can be accessed (ie known) by any function comprising the program. They are
implemented by associating memory locations with variable names. They do not get recreated if the
function is recalled.
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.
C language is rich in built-in operators and provides following type of operators:
Arithmetic Operators
Relational Operators
Logical Operators
Bitwise Operators
Assignment Operators
Misc Operators
www.studentsfocus.com
GE6151 Computer Programming Question Bank
a=5;
x=a++; /* assign x=5*/ y=a;
/*now y assigns y=6*/
x=++a; /*assigns x=7*/
While DO..while
(i) Executes the statements within the while block (i) Executes the statements within thwhile block at
if only the condition is true. least once.
(ii) The condition is checked at the starting of the (ii) The condition is checked at the end of the loop
loop
nested if statements You can use one if or else if statement inside another if or else
if statement(s).
nested switch statements You can use one swicth statement inside another
switch statement(s).
www.studentsfocus.com
GE6151 Computer Programming Question Bank
17.Define Looping in C .
A loop statement allows us to execute a statement or group of statements multiple times and
following is the general from of a loop statement in most of the programming languages:
C programming language provides following types of loop to handle looping requirements. Click
the following links to check their detail.
10
www.studentsfocus.com
GE6151 Computer Programming Question Bank
for loop Execute a sequence of statements multiple times and abbreviates the
code that manages the loop variable.
do...while loop Like a while statement, except that it tests the condition at the end of the
loop body
nested loops You can use one or more loop inside any another while, for
or do..while loop.
20. Write short notes about main ( ) function in ‟C‟ program. (MAY 2009)
The program execution starts from the opening brace „{„ and ends with closing brace „}‟,
within which executable part of the program exists.
Delimiters Use
: Colon
; Semicolon
( ) Parenthesis
[ ] Square Bracket
{ } Curly Brace
# Hash
, Comma
11
www.studentsfocus.com
GE6151 Computer Programming Question Bank
In scanf() when there is a blank was typed, the scanf() assumes that it is an end. gets() assumes the enter
key as end. That is gets() gets a new line (\n) terminated string of characters from the keyboard and
replaces the „\n‟ with „\0‟.
\r - Carriage return
\a - Alert
\” - Double quotes
12
www.studentsfocus.com
GE6151 Computer Programming Question Bank
If While
(ii) If the condition is true, it executes (ii) Executes the statements within the
(iii) If the condition is false then it stops (iii) If the condition is false the control is
the execution the statements. transferred to the next statement of the loop.
27.Differentiate between formatted and unformatted you input and output functions?
There are several standard library functions available under this category-those that can
deal with a string of characters. Unformatted Input/Output is the most basic form of
input/output. Unformatted input/output transfers the internal binary representation of the
data directly between memory and the file.
13
www.studentsfocus.com
GE6151 Computer Programming Question Bank
UNIT –III
2 MARKS
1. What is an array?
An array is a group of similar data types stored under a common name. An array is used to store a
collection of data, but it is often more useful to think of an array as a collection of variables of the same
type.
Example:
int a[10];
Type and
Size
You can initialize array in C either one by one or using a single statement as follows:
The number of values between braces { } cannot be larger than the number of elements that we
declare for the array between square brackets [ ]. Following is an example to assign a single
element of the array:
14
www.studentsfocus.com
GE6151 Computer Programming Question Bank
4.Size of(array name) gives the 4.Sezeof(pointer name) returns the number of bytes used
to store the pointer variable.
number of bytes occupied by the array.
All elements of an array share the same name, and they are distinguished form one another with help
of an element number. Any particular element of an array can be modified separately without
disturbing other elements.
8. Define Strings.
Strings:
The group of characters, digit and symbols enclosed within quotes is called as Stirng (or) character
Arrays. Strings are always terminated with „\0‟ (NULL) character. The compiler automatically adds „\0‟
at the end of the strings.
Example:
char name[]={„C‟,‟O‟,‟L‟,‟L‟,‟E‟,‟G‟,‟E‟,‟E‟,‟\0‟};
15
www.studentsfocus.com
GE6151 Computer Programming Question Bank
x = atoi(string)
16
www.studentsfocus.com
GE6151 Computer Programming Question Bank
Example:
typedef int hours: hours hrs;/* Now, hours can be used as new datatype */
Sorting refers to ordering data in an increasing or decreasing fashion according to some linear relationship
among the data items. Sorting can be done on names, numbers and records.
Insertion sort.
Merge Sort.
Quick Sort.
Radix Sort.
Heap Sort
Selection sort
Bubble sort
A sorting algorithm that works by first organizing the data to be sorted into a special type of
binary tree called a heap. The heap itself has, by definition, the largest value at the top of the
tree, so the heap sort algorithm must also reverse the order. It does this with the following steps:
1. Remove the topmost item (the largest) and replace it with the rightmost leaf. The topmost item
is stored in an array.
3. Repeat steps 1 and 2 until there are no more items left in the heap.
17
www.studentsfocus.com
GE6151 Computer Programming Question Bank
Searching for data is one of the fundamental fields of computing. Often, the difference between a fast
program and a slow one is the use of a good algorithm for the data set. Naturally, the use of a hash table
or binary search tree will result in more efficient searching, but more often than not an array or linked list
will be used. It is necessary to understand good ways of searching data structures not designed to support
efficient search.
Binary search
18
www.studentsfocus.com
GE6151 Computer Programming Question Bank
UNIT IV
2 MARKS
A function is a group of statements that together perform a task. Every C program has at least one
function which is main(), and all the most trivial programs can define additional functions.
Defining a Function:
A function definition in C programming language consists of a function header and a function body. Here
are all the of a function:
Return Type
Function Name
Parameters
Function Body
3. What are the steps in writing a function in a program?
b) Function Callings:
The user-defined functions can be called inside any functions like main(),user-defined function, etc.
c) Function Definition:
19
www.studentsfocus.com
GE6151 Computer Programming Question Bank
The function main () invokes other functions within it. It is the first function to be called when the
program starts execution.
Macros are more efficient (and faster) than function, because their corresponding code is inserted directly
at the point where the macro is called. There is no overhead involved in using a macro like there is in
placing a call to a function.
However, macros are generally small and cannot handle large, complex coding constructs. In cases where
large, complex constructs are to handled, functions are more suited, additionally; macros are expanded
inline, which means that the code is replicated for each occurrence of a macro.
a) In call by value, the value of actual agreements a) In call by reference, the address of actual
is passed to the formal arguments and the operation argurment values is passed to formal argument
is done on formal arguments. values.
b) Formal arguments values are photocopies of b) Formal arguments values are pointers to the
actual arguments values. actual argument values.
c) Changes made in formal arguments valued do c) Since Address is passed, the changes made in the
not affect the actual arguments values. both arguments values are permanent
20
www.studentsfocus.com
GE6151 Computer Programming Question Bank
void recursion()
{
recursion(); /* function calls itself */
}
int main()
{
recursion();
}
Following is an example which calculates factorial for a given number using a recursive
function:
#include <stdio.h>
When the above code is compiled and executed, it produces the following result:
Factorial of 15 is 2004310016
21
www.studentsfocus.com
GE6151 Computer Programming Question Bank
11. What is a Pointer? How a variable is declared to the pointer? (MAY 2009)
Pointer Declaration:
datatype *variable-name;
Example:
int *x, c=5;
x=&a;
12. What are the uses of Pointers?
Pointers are used to return more than one value to the function
22
www.studentsfocus.com
GE6151 Computer Programming Question Bank
In C, a pointer may be used to hold the address of dynamically allocated memory. After this memory is
freed with the free() function, the pointer itself will still contain the address of the released block. This is
referred to as a dangling pointer. Using the pointer in this state is a serious programming error. Pointer
should be assigned NULL after freeing memory to avoid this bug.
int main()
{
recursion();
}
Following is an example which calculates factorial for a given number using a recursive
function:
#include <stdio.h>
23
www.studentsfocus.com
GE6151 Computer Programming Question Bank
When the above code is compiled and executed, it produces the following result:
Factorial of 15 is 2004310016
24
www.studentsfocus.com
GE6151 Computer Programming Question Bank
UNIT V
2 MARKS
1. Compare arrays and structures.
Comparison of arrays and structures is as follows.
Arrays Structures
An array is a collection of data items of same data A structure is a collection of data items of different
type.Arrays can only be declared. data types. Structures can be declared and defined.
An array name represents the address of the starting A structrure name is known as tag. It is a
element.
Shorthand notation of the declaration.
An array cannot have bit fields. A structure may contain bit fields.
Structure Union
Every member has its own memory. All members use the same memory.
All members occupy separate memory location, Different interpretations for the same memory
hence different interpretations of the same memory location are possible.
location are not possible.
Conservation of memory is possible
Consumes more space compared to union.
25
www.studentsfocus.com
GE6151 Computer Programming Question Bank
3. Define Structure in C.
C Structure is a collection of different data types which are grouped together and each element in a
C structure is called member.
Many structure variables can be declared for same structure and memory will be allocated for
each separately.
It is a best practice to initialize a structure to null while declaring, if we don‟t assign any values to
structure members.
A structure type is usually defined near to the start of a file using a typedef statement. typedef defines and
names a new type, allowing its use throughout the program. typedefs usually occur just after the #define
and #include statements in a file.
This defines a new type student variables of type student can be declared as follows.
student st_rec;
26
www.studentsfocus.com
GE6151 Computer Programming Question Bank
struct tag_name
{
type attribute;
type attribute2;
/* ... */
};
member definition;
member definition;
...
member definition;
} [one or more union variables];
27
www.studentsfocus.com
GE6151 Computer Programming Question Bank
Macro Inclusion
Conditional Inclusion
File Inclusion
auto
register
static
extern
Register is used to define local variables that should be stored in a register instead of RAM. This means
that the variable has a maximum size equal to the register size (usually one word) and cant have the unary
'&' operator applied to it (as it does not have a memory location).
{
register int Miles;
}
28
www.studentsfocus.com
GE6151 Computer Programming Question Bank
Static is the default storage class for global variables. The two variables below (count and road) both
have a static storage class.
static int
Count; int Road;
{
printf("%d\n", Road);
}
{
int Count; auto
int Month;
}
The example above defines two variables with the same storage class. auto can only be used within
functions, i.e. local variables.
The C Preprocessor is not part of the compiler, but is a separate step in the compilation process. In
simplistic terms, a C Preprocessor is just a text substitution tool. We'll refer to the C Preprocessor as the
CPP.
Example:
#define Substitutes a preprocessor macro
#include Inserts a particular header from another file
29
www.studentsfocus.com
GE6151 Computer Programming Question Bank
A macro definition is independent of block structure, and is in effect from the #define directive
that defines it until either a corresponding #undef directive or the end of the compilation unit is
encountered.
Its format is: #define identifier replacement
Example:
#define TABLE_SIZE 100
int table1[TABLE_SIZE];
int table2[TABLE_SIZE];
These directives allow including or discarding part of the code of a program if a certain condition is met.
#ifdef allows a section of a program to be compiled only if the macro that is specified as the parameter
has been defined, no matter which its value is.
For example:
1 #ifdef TABLE_SIZE
2 int table[TABLE_SIZE];
3 #endif
1 #include "file"
2 #include <file>
30
www.studentsfocus.com
GE6151 Computer Programming Question Bank
The #line directive allows us to control both things, the line numbers within the code files as well as
the file name that we want that appears when an error takes place. Its format is:
Where number is the new line number that will be assigned to the next code line. The line numbers of
successive lines will be increased one by one from this point on.
31
www.studentsfocus.com
32
www.studentsfocus.com
scad Engineering college
UNIT – I – 16 MARKS
Characteristics of Computers
· Speed
· Accuracy.
· Automation.
· Endurance.
· Versatility.
· Storage.
· Cost Reduction.
A number system is a set of rules and symbols used to represent a number. There are several
different number systems. Some examples of number systems are as follows:
· Binary (base 2)
· Octal (base 8)
Decimal and Hexadecimal numbers can each be represented using binary values. This enables
decimal, hexadecimal, and other number systems to be represented on a computer which is based
around binary (0 or 1 / off or on). The base (or radix) of a number system is the number of units
that is equivalent to a single unit in the next higher counting space. In the decimal number
system, the symbols 0-9 are used in combination to represent a number of any sizes.
www.studentsfocus.com
scad Engineering college
scad Engineering college
For example, the number 423 can be viewed as the following string of calculations: (4 x 100) +
(2 x 10) + (3 x 1) = 400 + 20 + 3 = 423
· Abacus
· Astrolabe
· Pascaline
· Stepped Reckoner
· Difference Engine
· Analytical Engine
· Punch Cards
Generation of Computers
Main Features:
www.studentsfocus.com
scad Engineering college
scad Engineering college
Limitations:
1) These computers were very big in size. The ENIAC machine was 30 x 50 feet in size and
30 tons in weight. So, these machines required very large space for their workings.
3) These computers had slow operating speed and small computing capacity.
4) Commercial applications were developed during this period. Eighty percent of these
computers were used in business and industries.
· The third generation computers replaced transistors with Integrated Circuits . These
· The size of main memory was increased and reached about 4 megabytes.
· Magnetic disk technology had been improved and drive having capacity upto 100
· The CPU becomes more powerful with the capacity of carrying out 1 million instructions per
second.
· The application area also increased in this generation. The computers were used in other areas
like education, small businesses survey, analysis along with their previous usage areas.
www.studentsfocus.com
scad Engineering college
scad Engineering college
i.The fourth generation computers replaced small scale integrated circuits and medium scale
integrated circuits with the microprocessors chip.
iii. The hard-disks are available of the sizes upto 200 GB. The RAID technology
(Redundant Array of Inexpensive Disks) gives storage upto thousands of GB. iv. Computer cost
came down rapidly in this generation.
Mankind along with the advancement in science and technology is working hard to bring the Vth
Generation of computer. These computers will have the capability of thinking on their own like
an man with the help of Artificial Intelligence (AI). the 21st century will be better, faster, smaller
and smarter computers.
A computer can process data, pictures, sound and graphics. They can solve highly complicated
problems quickly and accurately.
Input Unit:
Computers need to receive data and instruction in order to solve any problem. Therefore we need
to input the data and instructions into the computers. The input unit consists of one or more input
devices. Keyboard is the one of the most commonly used input device. Other commonly used
input devices are the mouse, floppy disk drive, magnetic tape, etc. All the input devices perform
the following functions.
· Supply the converted data to the computer system for further processing.
www.studentsfocus.com
scad Engineering college
scad Engineering college
Storage Unit:
The storage unit of the computer holds data and instructions that are entered through the input
unit, before they are processed. It preserves the intermediate and final results before these are
sent to the output devices. It also saves the data for the later use.
1. Primary Storage:
2. This memory is generally used to hold the program being currently executed in the computer,
the data being received from the input unit, the intermediate and final results of the program.
3. The primary memory is temporary in nature. The data is lost, when the computer is switched
off.
4. In order to store the data permanently, the data has to be transferred to the secondary memory.
The cost of the primary storage is more compared to the secondary storage.
2. Secondary Storage:
2. The programs that run on the computer are first transferred to the primary memory before it is
actually run.
3. Whenever the results are saved, again they get stored in the secondary memory.
4. The secondary memory is slower and cheaper than the primary memory. Some of the
commonly used secondary memory devices are Hard disk, CD, etc.,
www.studentsfocus.com
scad Engineering college
scad Engineering college
Memory Size:
All digital computers use the binary system, i.e. 0 s and 1 s. Each character or a number is
represented by an 8 bit code. The set of 8 bits is called a byte. A Character occupies 1 byte space.
A numeric occupies 2 byte space. Byte is the space occupied in the memory. The size of the
primary storage is specified in KB (Kilobytes) or MB (Megabyte). One KB is equal to 1024
bytes and one MB is equal to 1000KB. The size of the primary storage in a typical PC usually
starts at 16MB. PCs having 32 MB, 48MB, 128 MB, 256MB memory are quite common.
Output Unit:
The output unit of a computer provides the information and results of a computation to
outside world. Printers, Visual Display Unit (VDU) are the commonly used output devices.
Other commonly used output devices are floppy disk drive, hard disk drive, and magnetic tape
drive. Arithmetic Logical Unit:
All calculations are performed in the Arithmetic Logic Unit (ALU) of the computer. It also does
comparison and takes decision. The ALU can perform basic operations such as addition,
subtraction, multiplication, division, etc and does logic operations viz, >, <, =, „etc. Whenever
calculations are required, the control unit transfers the data from storage unit to ALU once the
computations are done, the results are transferred to the storage unit by the control unit and then
it is send to the output unit for displaying results.
Control Unit:
It controls all other units in the computer. The control unit instructs the input unit, where to store
the data after receiving it from the user. It controls the flow of data and instructions from the
storage unit to ALU. It also controls the flow of results from the ALU to the storage unit. The
control unit is generally referred as the central nervous system of the computer that control and
synchronizes its working.
The control unit and ALU of the computer are together known as the Central Processing Unit
A PC may have CPU-IC such as Intel 8088, 80286, 80386, 80486, Celeron, Pentium, Pentium
Pro, Pentium II, Pentium III, Pentium IV, Dual Core, and AMD etc.
www.studentsfocus.com
scad Engineering college
scad Engineering college
Personal Computers:
CLASSIFICATION OF COMPUTERS
A personal computer (PC) is a self-contained computer capable of input, processing, output, and
storage. A personal computer is designed to be a single-user computer and must have at least one
input device, one output device, a processor, and memory. The three major groups of PCs are
desktop computers, portable computers, and handheld computers. Desktop Computers: A
desktop computer is a PC designed to allow the system unit, input devices, output devices, and
other connected devices to fit on top of, beside, or under a user s desk or table. This type of
computer may be used in the home, a home office, a library, or a corporate setting.
Portable Computers:
A portable computer is a PC small enough to be moved around easily. As the name suggests, a
laptop computer fits comfortably on the lap. As laptop computers have decreased in size, this
type of computer is now more commonly referred to as a notebook computer. Manufacturers
recently began introducing a new type of computer called the tablet PC, which has a liquid
crystal display (LCD) screen on which the user can write using a special-purpose pen, or stylus.
Tablet PCs rely on digital ink technology that allows the user to write on the screen. Another
type of portable computer, called a wearable computer, is worn somewhere on the body, thereby
providing a user with access to mobile computing capabilities and information via the Internet.
Handheld Computers:
An even smaller type of personal computer that can fit into the hand is known as a handheld
computer (also called simply handheld, pocket PC, or Palmtop). In recent years, a type of
handheld computer called a personal digital assistant (PDA) has become widely used for
performing calculations, keeping track of schedules, making appointments, and writing memos.
Some handheld computers are Internet-enabled, meaning they can access the Internet without
wire connections. For example, a smart phone is a cell phone that connects to the Internet to
allow users to transmit and receive e-mail messages, send text messages and pictures, and
browse through Web sites on the phone display screen.
Workstations:
www.studentsfocus.com
scad Engineering college
scad Engineering college
Linked computers and terminals are typically connected to a larger and more powerful
computer called a network server, sometimes referred to as a host computer. Although the size
and capacity of network servers vary considerably, most are midrange rather than large
mainframe computers.
(ii) Terminal – a device consisting of only a monitor and keyboard, with no processing
capability of its own.
Mainframe Computers:
Larger, more powerful, and more expensive than midrange servers, a mainframe computer is
capable of accommodating hundreds of network users performing different computing tasks.
These computers are useful for dealing with large, ever-changing collections of data that can be
accessed by many users simultaneously. Government agencies, banks, universities, and insurance
companies use mainframes to handle millions of transactions each day.
Supercomputers:
A supercomputer is the fastest, most powerful, and most expensive of all computers. Many
Secondary storage devices, as indicated by the name, save data after it has been saved by the
primary storage device, usually referred to as RAM (Random Access Memory). From the
moment we start typing a letter in Microsoft Word, for example, and until we click on "Save,"
your entire work is stored in RAM. However, once you power off your machine, that work is
completely erased, and the only copy remaining is on the secondary storage device where we
saved it, such as internal or external hard disk drive, optical drives for CDs or DVDs, or USB
flash drive.
The internal hard disk drive is the main secondary storage device that stores all of your data
www.studentsfocus.com
scad Engineering college
scad Engineering college
magnetically, including operating system files and folders, documents, music and video. The
hard disk drive is a stack of disks mounted one on top of the other and placed in a sturdy case.
They are spinning at high speeds to provide easy and fast access to stored data anywhere on a
disk.
External hard disk drives are used when the internal drive does not have any free space and
you need to store more data. In addition, it is recommended to always back up all of our data and
an external hard drive can be very useful, as they can safely store large amounts of information.
They can be connected by either USB connection to a computer and can even be connected with
each other in case you need several additional hard drives at the same time.
Optical Drive
An optical drive uses lasers to store and read data on CDs and DVDs. It basically burns a series
of bumps and dips on a disc, which are associated with ones and zeros. Then, this same drive can
interpret the series of ones and zeros into data that can be displayed on your monitors. There are
a few different types of both CD and DVD disks, but the main two types include R and RW,
which stand for Recordable (but you can write information on it just once) and Rewritable
(meaning you can record data on it over and over again).
USB flash memory storage device is also portable and can be carried around on a key chain. This
type of a secondary storage device has become incredibly popular due to the very small size of
device compared to the amount of data it can store (in most cases, more than CDs or DVDs).
Data can be easily read using the USB (Universal Serial Bus) interface that now comes standard
with most of the computers.
(or)
2009)
The term "memory" applies to any electronic component capable of temporarily storing data.
There are two main categories of memories:
www.studentsfocus.com
scad Engineering college
scad Engineering college
Internal memory that temporarily memorizes data while programs are running. Internal
memory uses micro conductors, i.e. fast specialized electronic circuits. Internal memory
corresponds to what we call random access memory (RAM).
Auxiliary memory (also called physical memory or external memory) that stores information
over the long term, including after the computer is turned off. Auxiliary memory corresponds to
magnetic storage devices such as the hard drive, optical storage devices such as CD-ROMs and
DVD-ROMs, as well as read-only memories.
Technical Characteristics
(a) Capacity, representing the global volume of information (in bits) that the memory can store
(b) Access time, corresponding to the time interval between the read/write request and the
availability of the data
(c) Cycle time, representing the minimum time interval between two successive accesses
(d) Throughput, which defines the volume of information exchanged per unit of time, expressed
in bits per second
(e) Non-volatility, which characterizes the ability of a memory to store data when it is not being
supplied with electricity
The ideal memory has a large capacity with restricted access time and cycle time, a high
throughput and is non-volatile.
However, fast memories are also the most expensive. This is why memories that use different
technologies are used in a computer, interfaced with each other and organised hierarchically.
The fastest memories are located in small numbers close to the processor. Auxiliary memories,
which are not as fast, are used to store information permanently.
Types of Memories
Random access memory, generally called RAM is the system's main memory, i.e. it is a space
that allows you to temporarily store data when a program is running.
www.studentsfocus.com
scad Engineering college
scad Engineering college
Unlike data storage on an auxiliary memory such as a hard drive, RAM is volatile, meaning that
it only stores data as long as it supplied with electricity. Thus, each time the computer is turned
off, all the data in the memory are irremediably erased.
Read-Only Memory
Read-only memory, called ROM, is a type of memory that allows you to keep the information
contained on it even when the memory is no longer receiving electricity. Basically, this type of
memory only has read-only access. However, it is possible to save information in some types of
ROM memory.
Flash Memory
Flash memory is a compromise between RAM-type memories and ROM memories. Flash
memory possesses the non-volatility of ROM memories while providing both read and writes
access However, the access times of flash memories are longer than the access times of RAM.
Input/Output devices are required for users to communicate with the computer. In simple terms,
input devices bring information INTO the computer and output devices bring information OUT
of a computer system. These input/output devices are also known as peripherals since they
surround the CPU and memory of a computer system.
(a) Keyboard
It is a text base input device that allows the user to input alphabets, numbers and
www.studentsfocus.com
scad Engineering college
scad Engineering college
Alphanumeric Keypad
It consists of keys for English alphabets, 0 to 9 numbers, and special characters like + − / * ( )
etc.
Function Keys
There are twelve function keys labeled F1, F2, F3… F12. The functions assigned to these keys
differ from one software package to another. These keys are also user programmable keys.
Special-function Keys
These keys have special functions assigned to them and can be used only for those specific
purposes. Functions of some of the important keys are defined below.
Enter
It is similar to the „return key of the typewriter and is used to execute a command or program.
Spacebar
Backspace
This key is used to move the cursor one position to the left and also delete the character in that
position.
Delete
Insert
Insert key is used to toggle between insert and overwrite mode during data entry.
Shift
This key is used to type capital letters when pressed along with an alphabet key. Also used to
type the special characters located on the upper-side of a key that has two characters defined on
the same key.
Caps Lock
www.studentsfocus.com
scad Engineering college
scad Engineering college
Cap Lock is used to toggle between the capital lock features. When „on , it locks the
alphanumeric keypad for capital letters input only.
Tab
Tab is used to move the cursor to the next tab position defined in the document. Also, it is used
to insert indentation into a document.
Ctrl
Control key is used in conjunction with other keys to provide additional functionality on the
keyboard.
Alt
Also like the control key, Alt key is always used in combination with other keys to perform
specific tasks.
Esc
This key is usually used to negate a command. Also used to cancel or abort executing programs.
Numeric Keypad
Numeric keypad is located on the right side of the keyboard and consists of keys having numbers
(0 to 9) and mathematical operators (+ − * /) defined on them. This keypad is provided to support
quick entry for numeric data.
These are arrow keys and are used to move the cursor in the direction indicated by the arrow (up,
down, left, right).
(b) Mouse
The mouse is a small device used to point to a particular place on the screen and select in order
to perform one or more actions. It can be used to select menu commands, size windows, start
programs etc. The most conventional kind of mouse has two buttons on top: the left one being
used most frequently.
Mouse Actions
www.studentsfocus.com
scad Engineering college
scad Engineering college
Drag and Drop : It allows you to select and move an item from one location to another. To
achieve this place the cursor over an item on the screen, click the left
mouse button and while holding the button down move the cursor to where you want to place the
item, and then release it.
(c) Joystick
The joystick is a vertical stick which moves the graphic cursor in a direction the stick is moved.
It typically has a button on top that is used to select the option pointed by the cursor. Joystick is
used as an input device primarily used with video games, training simulators and controlling
robots
(d)Scanner
www.studentsfocus.com
scad Engineering college
scad Engineering college
Scanner is an input device used for direct data entry from the source document into the computer
system. It converts the document image into digital form so that it can be fed into the computer.
Capturing
information like this reduces the possibility of errors typically experienced during large data
entry.
Hand-held scanners are commonly seen in big stores to scan codes and price information for
each of the items. They are also termed the bar code readers.
A bar code is a set of lines of different thicknesses that represent a number. Bar Code Readers
are used to input data from bar codes. Most products in shops 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
It is a pen shaped device used to select objects on a display screen. It is quite like the mouse (in
its functionality) but uses a light pen to move the pointer and select any object on the screen by
pointing to the object. Users of Computer Aided Design (CAD) applications commonly use the
light pens to directly draw on screen.
www.studentsfocus.com
scad Engineering college
scad Engineering college
It allows the user to operate/make selections by simply touching the display screen. Common
examples of touch screen include information kiosks, and bank ATMs. (h)Digital camera
A digital camera can store many more pictures than an ordinary camera. Pictures taken using a
digital camera are stored inside its memory and can be transferred to a computer by connecting
the camera to it. A digital camera takes pictures by converting the light passing through the lens
at the front into a digital image.
Output Devices
(a) Monitor
Monitor is an output device that resembles the television screen and uses a Cathode Ray Tube
(CRT) to display information. The monitor is associated with a keyboard for manual input of
characters and displays the information as it is keyed in. It also displays the program or
application output. Like the television, monitors are also available in different sizes.
www.studentsfocus.com
scad Engineering college
scad Engineering college
LCD was introduced in the 1970s and is now applied to display terminals also. Its advantages
like low energy consumption, smaller and lighter have paved its way for usage in portable
computers (laptops).
(c) Printer
Printers are used to produce paper (commonly known as hardcopy) output. Based on the
technology used, they can be classified as Impact or Non-impact printers. Impact
printers use the typewriting printing mechanism wherein a hammer strikes the paper through a
ribbon in order to produce output. Dot-matrix and Character printers fall under this category.
Non-impact printers do not touch the paper while printing. They use chemical, heat or electrical
signals to etch the symbols on paper. Inkjet, Deskjet, Laser, Thermal printers fall under this
category of printers.
When we talk about printers we refer to two basic qualities associated with printers: resolution,
and speed. Print resolution is measured in terms of number of dots per inch (dpi). Print speed is
measured in terms of number of characters printed in a unit of time and is represented as
characters-per-second (cps), lines-per-minute (lpm), or pages-per-minute (ppm).
www.studentsfocus.com
scad Engineering college