COMPUTER FUNDAMENTALS

Transcription

COMPUTER FUNDAMENTALS
Institute for Competitive Exams
Contents
Computer Fundamentals......................................................................................................................... 2
What is a computer? ........................................................................................................................................ 2
Evolution Of Computers ................................................................................................................................... 2
GENERATIONS OF COMPUTERS................................................................................................................................................. 3
Classification Of Computers ............................................................................................................................. 5
CLASSIFICATION ON THE BASES OF TYPE .................................................................................................................................. 5
CLASSIFICATION ON THE BASES OF PURPOSE ........................................................................................................................... 5
CLASSIFICATION ON THE BASES OF CAPACITY .......................................................................................................................... 5
Binary Number System..................................................................................................................................... 6
Octal Number System ...................................................................................................................................... 8
Hexa-Decimal System....................................................................................................................................... 8
Computer Hardware ........................................................................................................................................ 9
Computer Software........................................................................................................................................ 10
Operating Systems (OS) ........................................................................................................................................................... 10
WINDOWS OPERATING SYSTEM.............................................................................................................................................. 13
Some useful utilities: ............................................................................................................................................................... 16
The World Wide Web ..................................................................................................................................... 19
Computer Security ......................................................................................................................................... 21
Internet and Web Designing ................................................................................................................. 30
Data Communications and Computer Networking ................................................................................. 43
Business Systems .................................................................................................................................. 61
Database Management System and Oracle Queries .............................................................................. 69
Computer Organization ........................................................................................................................ 81
Operating System ................................................................................................................................. 98
Systems Analysis, Design and MIS ....................................................................................................... 125
Programming with C ........................................................................................................................... 138
Data Structures through C .................................................................................................................. 150
Programming with C++ Language ....................................................................................................... 163
JAVA Programming ............................................................................................................................ 176
Visual Basic Programming .................................................................................................................. 187
Unix and Shell Programming............................................................................................................... 197
Computer Science and Engineering ..................................................................................................... 210
Microprocessors ................................................................................................................................. 218
Artificial Intelligence........................................................................................................................... 228
100 Sample Questions for Computer Exam .......................................................................................... 245
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 1
Institute for Competitive Exams
Computer Fundamentals
What is a computer?
A computer is a tool or instrument that helps in computation. Computation includes addition,
subtraction, multiplication, division, comparison of numbers, manipulation of texts, logical
decisions etc. A computer can store a series of instructions and huge information and data in its
memory and process a complete job.
Efficiency of the computer depends on the set of instructions given to it. It exactly does what it
has been told to do. Precise, clear and correct instructions should be given to the computer to
enable it to carry out the operations correctly. When the instructions are faulty and not clear, the
results produced by the computer will also be faulty and not clear. This phenomenon of wrong
output of data due to wrong input of instructions/data is termed as Garbage in Garbage out
(GIGO).
What are the advantages of computer?
 Very high speed processing
 Large capacity for storage and retrieval of data
 Perfect accuracy
 Automatic working capability
 Diligence
 Versatility
What are the limitations of computer?
 Can not think on its own
 Can not learn by experience
 Can not take independent decisions.
 Requires human intervention for each any every step
Evolution Of Computers
Increasing need for numerical calculations, storage of data and information etc. with minimum of
mental and manual efforts led to invention of computers.
 ABACUS, used for calculations, was the earliest devise that qualifies as a computer widely
used 6000 years ago. The ABACUS was built using the idea of place values.
 John Napier developed Logarithm, a tabular system of numbers through which many
arithmetical calculations were simplified, in 1617.
 Napier also invented a set of rods which were carved from bones and used for multiplication.
These were called Napier Bones.
 Slide Rule, based on the principle of logarithm, a calculating device was invented by William in
1620.
 Blaise Pascal, a Frenchman, invented a mechanical unit in 1642 that could add and subtract,
using a set of toothed wheels. This ‘calculator’ was the first digital machine.
 Pascal’s machine was further improved by a German mathematician Gottfried that could add,
subtract, multiply, divide and extract roots.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 2
Institute for Competitive Exams
 In 1822, Charles Babbage built the ‘Difference Engine’. This could do only one kind of
calculations.
 In 1833, Charles Babbage designed and worked on Analytical Engine. It was a general
purpose computer designed to solve almost any type of problem. It contained most of the elements
we find in modern digital computer systems. Hence, Charles Babbage is considered as Father
of modern computer.
 Joseph Jacquard invented punch cards in 1801. Punch card had holes punched in it. These
were used by him to produce weaving pattern on the cloths.
 In 1880, Dr. Herman Hollerith used punched cards for data processing by building a tabulating
machine that could punch holes in cards and read them as well. This machine worked on electricity
and had mechanical parts and could handle 50 to 75 cards per minute. The system was very slow
and card jams and data destruction were common problems. Punching machine, Verifying
machine, Interpreter, Sorter, Collators, Tabulator were some of the machines used in this system.
 In 1944, Howard Alken built MARK1, the first digital computer, at Harvard University. It
lacked speed but had the ability to continuously perform complex arithmetic functions without
frequent human intervention. It was partly electronic and partly mechanical machine.
 In 1936, Alan Turing from Cambridge University submitted his brilliant logical analysis on
‘artificial intelligence’. His contribution on the development of electronic computers remains the
single biggest contribution ever made to the science.
 In 1930, Germans developed a mechanical machine called as ‘ENIGMA’ for coding military
messages.
 In 1939, Britain initiated to build machines that could decipher Enigma’s codes. The world’s
first giant computer using values was built called the ‘Colossus’.
 In 1942, USA started to develop an electronic computer. In 1946, it could put to operation
‘ENIAC’ (Electronic Numerical Integrator and Calculator), made in University of Pennsylvania.
John Mauchly and J. Presper Eckert were the two people involved in its development. This
computer was made of 18,000 vacuum tubes. ENIAC could process the data at great speeds
(though not comparable to today’s computers).
 UNIVAC-1 was the first business oriented computer developed in 1952 used by US Bureau of
Census.
GENERATIONS OF COMPUTERS
A generation is a rough period of time over which there are no major changes or development in
that particular field. Every change in technology has been treated as a new ‘generation’ of
computers. Each generation has its own advantages and disadvantages.
First Generation Computers:
 Used vacuum tube technology. (Vacuum tube is a fragile glass device that can control and
amplify electronic signals.)
 Computers were very large in size and generated lot of heat.
 Speed was measured in milli-seconds.
 Developed many problems and required frequent maintenance.
 Performed at low speed, occupied large space, consumed more power and needed air
conditioning.
 Example: ENIAC(Electronic Numerical Integrator and Calculator) computer developed by
USA.
 EDSAC (Electronic Delayed Storage Automatic Computer) was another major development;
developed at Cambridge University of England; first introduced in May, 1946.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 3
Institute for Competitive Exams
 Advantages: Vacuum tube technology made possible the advent of electronic digital
computers and these were the fastest calculating devices of that time.
 Disadvantages: Very bulky and non portable; lot of heat generated and so air-conditioning
compulsory; frequent hardware failures and maintenance.
Second Generation computers:
 Developed in late 1950’s.
 Used transistors in place of vacuum tubes. Transistors were smaller, less expensive and
generated less heat compared to vacuum tubes.
 Speed measured in micro-seconds.
 Magnetic tapes could be used as medium for storage of data.
 Example: UNIVAC (Universal Automatic computer) was the first commercial business
computer
 Example: IBM 1401, IBM 1410
 Advantages: Flaws of first generation computers removed; smaller in size; Faster and more
reliable; commercial production easier and cheaper.
 Disadvantages: Air conditioning required; Manufacturing process involved manual assembly
Third Generation computers:
 Developed in mid 1960’s. (1965-71)
 Used LSIC (Large Scale Integrated Circuits) in place of transistors. IC was small and one IC
could do the job of hundreds of transistors.
 Computers became smaller and faster
 Speed measured in nano-seconds.
 Magnetic drums used as medium of storage of information.
 Led to development of software (called Operating System) for efficient use of computer.
 Example: IBM-360 series introduced in 1964`
 Advantages: Smaller in size; more reliable and portable; low maintenance cost, lesser power
required.
 Disadvantages: Required highly sophisticated technology for manufacturing ICs.
Fourth Generation Computers:
 Introduced in 1970’s
 Used VLSI (Very Large Scale Integrated) Circuits containing thousands of transistors, diodes
and registers.
 Roughly more than 30,000 components could be accommodated on one chip of the size of a
postal stamp.
 Concept of micro-processors evolved. It is a chip of silicon known as microprocessor chip.
 Could be easily placed on small table
 Price reduced and affordable and became a common equipment in small business
establishments.
 Advantages: Size reduced substantially; air conditioning not required; operations much
faster; more general purpose; cheapest amongst all previous generations; desktops made available
for business/personal use.
Fifth Generation and next generation computers
 Based on ULSI (Ultra large scale integration) technology.
 Will have tremendous processing power and speed.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 4
Institute for Competitive Exams
 Support high degree of artificial intelligence (computers will be able to think and learn and act
on their own to some extent)
 Interact with humans in ordinary languages
Advantages: More user-friendly; reduced size; easy to operate; economical and faster;
programming much easier and simpler; emphasis shifted to networks and client server technology.
Classification Of Computers
Computers are classified into 3 broad categories basing on – type, purpose, capacity.
CLASSIFICATION ON THE BASES OF TYPE
Analog computers: These are measuring devices that work on volatile data. Eg. Heat, pressure,
humidity, speed etc. Eg. Thermometers, barometers, speedometers. These are sensitive to slightest
changes.
Digital computers: Deal with numbers; can be used to manipulate data with great accuracy.
Take input and give out put. Can store large quantities of data. Eg. All electronic computers,
calculators, quartz watches etc.
Hybrid computers: Mixture of analog and digital computers. Input is generally in the form of
analog form like heat/pressure etc., measured by analog part of computer and then used by digital
part for further operations. Eg. Computers used in factories for controlling manufacturing
processes, launching a rocket etc.
CLASSIFICATION ON THE BASES OF PURPOSE
General Purpose computers: Capable of handling many kinds of operations. Used for both
business and scientific applications with equal efficiency. Can be used at any place like offices,
banks, schools etc.
Special Purpose computers: Designed to perform specific task and can not be used for other
purposes. Eg. Monitor patient’s health in hospitals, in airports to monitor arrival/departure of
flights etc.,
CLASSIFICATION ON THE BASES OF CAPACITY
Super computers: Very large in size with very high processing speeds having more number of
processing units. These are generally used for complex scientific computations / purposes.
Main Frame Computers: These are large computer systems having capability to support more
powerful peripheral devices and terminals.
Micro computers: Micro computer is the smallest category of computers consisting of microprocessor and associated storage and input/output devices.
Mini Computers: Relatively fast but small and inexpensive as compared to Main frame
computers. A mini computer can support 10 to 12 terminals.
Personal computers: Designed for personal use. Several models are available in the market.
These are very widely used and seen everywhere. Today these are available with very high
processing speed and large storage capacity at affordable prices.
Write about concepts of Number Systems and the data representation in computers.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 5
Institute for Competitive Exams
As the computer is an electronic device, it works on the presence/absence of electronic signals.
Electrical energy is used only to carry information.
Computer uses a number system which is different from our usual decimal system for storing
data. It can just recognize two states – ON or OFF and numbers are represented by using these two
states i.e., by using the ON position to represent ‘1’ and the OFF position to represent ‘0’.
Therefore, a number can be simulated easily within the computer under a number system which
uses two digits only i.e, ‘0’ and ‘1’. This system is called Binary system.
In decimal system we use 10 digits from 0 to 9. Each decimal ‘digit’ takes one of these ten values.
The value depends on the ‘position’ of the number system i.e, units, tens, hundreds, thousands and
so on.
Binary Number System
The binary digits (0 and 1) are used to represent data in a computer. In computer terminology, the
binary digit is called as a ‘bit’. As the computer works on electricity, the number 1 represents power
on and 0 represents power off. Computers do not understand letters of decimal numbers. They
only understand 1s and 0s. This is called the binary system. All the letters of the alphabet, all
numbers and all signs like +, -, = etc are converted into 0s and 1s if the computer has to work with
them. The positional value of each digit has to be the power of 2 i.e., 24 23 22 21 20 etc. (i.e., 16, 8, 4,
2, 1 etc.). The base of decimal system is 10 where as the base of binary system is 2. So this is also
called ‘BASE2’ number system. The base of numbering system is called ‘Radix’. Therefore, the
Radix of decimal system is 10 and that of binary system is 2.
Decimal to binary conversion: The decimal number is successively by 2 (base of binary
system) until division is no longer possible. At the end of each of successive division, the
remainder is written in the next column. The binary equivalent of decimal number is obtained by
writing the remainder from the bottom to the top.
Example: Find the binary equivalent of Decimal Number 30.
Base=2
Number=30
Remainder
2
30
2
15
0
2
7
1
2
3
1
2
1
1
0
1
Binary equivalent of 30 = 11110 (Write Remainders in reverse order)
Binary to decimal conversion: Write down the place value of binary numbers, multiply the
place value with the number and add the result so obtained to get the value in decimal system.
Example: Convert the binary number 1110010 to decimal.
a)
2 6 2 5 24 2 3 2 2 2 1 2 0
Binary base 2 place value
b)
64 32 16 8 4 2 1
Place value in decimal system
c)
1110010
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 6
Institute for Competitive Exams
Binary number given in the example
d)
64 32 16 0 0 2 0
Multiply (b) & (c) = b X c to get place values
e)
64 + 32 + 16 + 0 + 0 + 2 + 0
Add the place values to get decimal equivalent
Answer: 114 in decimal number system
We can also perform addition, subtraction, multiplication and division functions in binary system.
The following examples illustrate them:
Addition: Basic rule is – when we add two1’s the result is 0 with a carry digit.
10101
+10101
1000001
+100001
111110
+11111
10101
100000
111110
+10101
+100001
+011111
101010
1000001
1011101
Subtraction: This can be performed by using the process of addition by adding the complement
of the number to be subtracted to the number from which subtraction is to be made. The
complement is obtained by either using 1’s complement or 2’s complement.
By using 1’s complement: 1’s complement is obtained by changing all the 0’s to 1’s and vice
versa. Eg. 1’s complement of 10001 is 01110. The left most digit is treated as sign bit i.e, ‘0’ is +ve
and ‘1’ is –ve.
Procedure:
a) Obtain the 1’s complement of the number which is to be subtracted
b) Add the numbers and add the carry bit in the result.
Example: Subtract 01000 (8 in decimal system) from 01100 (12 in decimal system)
1’s complement of 01000: 10111
Now add 01100+10111: 1 00011 (1 placed at distance is carry bit)
Add carry bit: 1
------00100 (4 in decimal system)
====
As the left most bit is ‘0’, the answer is ‘+ 4’
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 7
Institute for Competitive Exams
By using 2’s complement: 2’s complement is obtained by adding ‘1’ to the 1’s complement. Eg.
2’s complement of 10001 is 01111 (01110+1=01111)
Procedure: a) Obtain 2’s complement of the number to be subtracted
b) Add the numbers and neglect the carry bit.
Example: Subtract 01000 (8 in decimal system) from 01100 (12 in decimal system)
2’s complement of 01000 is 10111+1 = 11000
Add 01100+11000 = 1 00100 (carry bit ‘1’ is neglected)
As the left most digit is ‘0’, the answer is ‘+ 4’ (00100 = 4 in decimal system)
Similarly, we can perform multiplication and division operations in binary system.
Octal Number System
The number system is based on 8 digits i.e., from 0 to 7. Therefore, it is called as Base-8 number
system. This system is used by computer designers/engineers. We can get the octal equivalent of a
decimal number by dividing the decimal number successively and remainders written from bottom
to top. Eg. Octal equivalent of decimal number 135 = 207.
Hexa-Decimal System
This number system is based on 16 elements. The first 10 digits form from 0 to 9 and the 11th to
16th elements are represented by A,B,C,D,E,F. Therefore 10 in decimal system is equal to A in hexadecimal, 11 is B, 12 is C and so on. This systems is also known as Base-16 number system. This
system is used by system designers.The equivalents of some decimal numbers in hexa decimal
syster are as under:
Decimal Hexa-decimal
26
1A
27
1B
28
1C
29
1D
30
1E
31
1F
32
20
Bits & Bytes:
Each 1 or 0 that a computer understands is called a bit. A group of 8 bits is
called a byte. All letters, digits and signs are stored in the computer as bytes. The standard by
which all characters (numerals, alphabets, symbols) are represented by a combination of 1s and 0s
is called ASCII (American Standard Code for Information Interchange). Computers all over the
world understand characters written in ASCII format. A combination 8 bits is used for
representing any single character in this system. Thus the system could provide a total of 28 = 256
unique combinations. Thus a table of 256 codes was prepared and the code was assigned to each
character. The codes were numbered from 0 to 255. Earlier computers used the 8 bit word. Today’s
computers use 16-bit to 64-bit words.
Binary Coded Decimal (BCD): Each decimal digit in a binary code is assigned a four-digit
binary code to avoid the task of converting the numbers as a whole into binary. This code is known
as BCD. This occupies more storage space than in pure binary system.
Memory Storage: This is measured in bytes.

1 kilobyte (KB) is equal to 1024 bytes
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 8
Institute for Competitive Exams


1 Megabyte (MB) is equal to 1024 KB (10,48,576 bytes)
1 Gigabyte (GB) is equal to 1024 MB (107,37,41,824 bytes)
Computer Hardware
Hardware is the term given to the physical components of the computer system and various
individual pieces of equipment. Thus the key board, monitor, mouse, printers etc., all come under
the category of hardware. Therefore, different parts of a computer can be termed as hardware. The
functions of hardware are:
-
to accept and store the input data in the system.
To process the data accepted by the system.
To give the processed results as output to the user.
Parts of a computer: The parts of the computer can be grouped into Input devices, the
Processor and the Output devices.
a) Input devices: Key board, mouse, joystick, scanner, bar code reader etc. are called input
devices. Data and instructions need to be entered into the memory of the computer to perform
various tasks. . The input devices enable the users to input the data into the system which is
processed in the processor and delivers the output.
b) Output devices: These are the devices through which the computer can provide the results to
the user. Printers, Monitor etc. are output devices.
c) Central Processing unit (CPU): All the computing in a computer is done by the Central
Processing Unit and the Main Memory of the computer. This is the brain of the computer. The
4input from the input devices is fed into the CPU for processing. The CPU uses software to process
this input and sends the output to the output devices. CPU consists of two parts viz.,
(i)
Arithmetic and Logic Unit (ALU) and
(ii)
Control Unit
Arithmetic and Logic Unit (ALU): It is the part of the CPU that does all the arithmetic and
logical operations like addition, subtraction, multiplication, division operations such as X > Y etc.
Control Unit: It coordinates all the operations of the computer. It controls the input and output
devices, the ALU and the memory. It also ensures that instructions in the software are carried out.
Memory Storage
The memory storage is of two types.
(1) Primary Memory and
(2) Secondary Memory
Primary Memory: This is the main memory of the computer and is linked to the CPU and is part
of the base unit. RAM and ROM are different divisions of the primary memory.
a)
Read Only Memory (ROM): This is meant for information that is permanently required to
run the computer and will remain, even if the computer is switched off. This is important because
it contains all the information that the computer requires to start up.
b)
Random Access Memory (RAM): This is used for temporary storage. All the data and
programs required for running a process are stored here, until the process is over. More RAM
storage space can make the computer work faster. All the data o the RAM is lost when the power is
turned off.
Secondary Memory: All the data and programs which are not running on the CPU are stored in
the secondary memory. They are copied into the RAM whenever they are required. The commonly
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 9
Institute for Competitive Exams
used secondary memory storage devices are disks and tapes. There are three types of disks- Hard
Disk, Floppy Disk and Compact Disk. Hard disks are fitted into the computer whereas the floppy
disks, compact disks can be taken out and kept outside. A floppy can hold only 1.44 MB of
information whereas compact disks can hold about 600 MB of data. The floppy drive is referred to
as 'A' drive. If there is a second floppy drive on the computer it is referred to as 'B' drive and the
hard disk is termed as 'C' drive. The alphabets D,E, F etc., are reserved for additional hard drives
that the computer may have.
Some storage devices:
1. Floppy disk: 3 ½ inch diameter (previously we had 5 ¼ inch floppy disks also): It is divided
into concentric circles called tracks and the tracks are further divided into sectors. There is a small
hole on the disk called index hole which denotes the starting point of the first sector. The 3 ½ inch
floppy disks can store 1.44 MB or 2.88 MB of information.
2. Hard Disk: The disk consists of a disk pack containing hard disks/platters stacked onto one
another. A single hard disk is made of metal and coated on both sides with metallic oxide. Hard
disks can store large volumes of data as compared to floppy disks. Today we can see hard disks of
capacity of 40 GB to 200 GB and even more. Portable (external) hard disks are also available now.
3. Digital Audio Tape (DAT): This is widely used in our Bank for taking backups particularly
in Bankmaster branches. It looks like an audio cassette and can store large volume of data ranging
from 2 GB to 20 GB and even more.
4. CD ROM: These are also widely used now-a-days for data storage, storing music, video
(cinemas) etc. Compact Disk (CD) can store up to 700 MB of data on it. Rewritable CDs are also
available. This is a form of optical storage.
5. DVD (Digital Versatile Disk): DVDs also look like CDs but can store much more data than
that in CD. They can store 4.7 GB data on it. Dual layer DVDs can store almost double the data that
can be stored on a normal DVD (single layer) i.e., up to 8.5 GB. Data recording is accomplished by
burning the laser beam on CDs and DVDs.
6. Pen Drives / Flash Drives: These are also storage media ranging from 256 MB to 8 GB and
more. These are very small and portable and easy to carry volume of data.
Computer Software
Software: Computer can not work on its own. It must be given instructions in sequence to work.
Such instructions in any computer language is called a computer Program. Software refers to
the set of programs that control the activity of processing by the computer. The computer software
is classified into two broad categories
a) Application software: Also known as application packages. This is a set of one or more
programs that are developed or written to do a specific job. Eg. An application package of a
company to process its sales data and to generate various sales reports.
b) System software: Set of one or programs which are developed to control the operation of the
computer system. These programs do not solve specific problems but they are general programs
which help the user in the use of the computer system.
Hardware and software of a computer are interdependent on each other. They are like the two
sides of the same coin. The hardware cannot work on its own and the software cannot be used
without the hardware.
Operating Systems (OS)
We need a 'system' (a software program) which helps us to use the computer effectively and
efficiently. Such a software program is called "Operating System" (OS) software. Operating System
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 10
Institute for Competitive Exams
falls under the category of system software. A computer cannot function without an operating
system. The OS is the means by which a user can communicate with the computer. All input and
output devices, all actions and processes inside the computer are controlled by the OS. The OS
communicates the user's instructions to all the parts of the computer.
An operating system is a set of programs designed to manage the entire operations of a computer
system. It does not do any specific work but it is a general program which assists the user by doing
the following operations.
 controlling all of the operations including input/output operations, arithmetic operations and
internal movement of information.
 Communicating with peripheral devices (printers, disk and tape devices).
 Supporting the running of other software.
There are many operating systems like Unix, Linux, Mac, MS-DOS, Windows etc.
‘Microsoft Disk Operating System’ (MS-DOS)
MS-DOS is one of the most popular operating systems. Let us now have a look at some important
MS-DOS commands.
The command prompt: When you first turn on the computer, you will see some cryptic
information flash by. When the information stops scrolling past, you will see the following:
C:\>
This is called command prompt. The flashing underscore next to the command prompt is called
the cursor. The cursor shows where the command you type will appear. DOS commands can be
entered and executed one at a time from the DOS prompt. The commands can be typed either in
lower case or upper case. You must press 'enter' key after every command you type.
DOS commands are basically two types. They are
A) Internal Commands: These are a few special commands that are automtically loaded into
the computer memory when the system is booted. Some important internal commands are listed
below:
B) External commands: These are some of the DOS commands that are stored as files on the
DOS system disk.
Some important and commonly used commands are briefly explained below:
1. DIR (Directory): Displays a list of the files and subdirectories that are in the directory you
specify. When used without parameters or swithces it gives the particulars such as file extension,
file size in bytes, date and time the file was last modified, total number of files listed, their
cumulative size and free space remaining on the disk.
2. MD or MK DIR (MAKE DIRECTORY): Used to create another directory in the drive in which
we are working presently.
3. CD (CHANGE DIRECTORY): We can switch over in to another directory from the present
directory with the help of this command.
4. TYPE: With the help of this command we can view the contents of a file.
5. REN (RENAME): Used to change the name of a file.
6. DEL (DELETE) & ERASE: to delete unwanted files from the directories this command is
used. This command can be used in the following way.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 11
Institute for Competitive Exams
7. RD or RMDIR (REMOVE DIRECTORY): Used to remove the directory permanently from the
computer. Syntax at the prompt is: RD <directory name>. However, before removing the
directory, all the files in the directory have to be deleted by using del or erase command. Then only
the RD command works and removes the directory from the computer.
8. COPY: This is one of the most useful commands. To copy a file from one place to another place
this command is used. Also used to store files on to floppy disks.
9. DATE and TIME: These commands are used to see the current date and time. The date and
time can also be changed using these commands if necessary.
10. FORMAT: Creates new root directory and file allocation table for the disk. It can also check
for bad areas on the disk and it can delete all data on the disk.
11. UNFORMAT: Restores a disk that was erased by using ‘Format’ command.
12. DISKCOPY: Copies the entire contents of one floppy disk to another floppy disk. Diskcopy
writes over the existing contents of the destination disk as it copies the new information to it.
13. XCOPY: Copies directories, their subdirectories and files except hidden and system files. With
this command, you can copy all the files in a directory including the files in the subdirectories of
that directory. XCOPY source [destination]
14. SORT: Reads input, sorts data and writes the results to the screen, a file or another device.
SORT acts as a filter reading characters in a specified column and rearranging them in ascending
or descending order.
15. TREE: Graphically displays the structure of a directory.
16. EDIT: Starts MS-DOS editor, a text editor which is useful to create and edit ASCII text files.
MS-DOS editor is a full screen editor that allows you to create, edit, save and print ASCII text files.
17. DELTREE: Deletes a directory and all its files and subdirectories.
18.FIND: Searches for a specific string of text in a file or files.
19. HELP: Starts MS-DOS help.
20. MOVE: Moves one or more files to the location you specify. Can also be used to rename
files and directories.
21. PATH: Indicates which directories MS-DOS should search for executable files (programs).
22. PRINT: Prints a text file.
23. SCANDISK: Checks disks for damage and repairs them, if needed.
24. DEFRAG: Recognises the files on a disk to optimise disk performance. (This command
shall not be used while you are running Windows .)
25. CLS: Clears the screen.
WILDCARDS
A wildcard is a character that can represent one or more characters in a file name. If you want to
carry out a task for a group of files whose names have some thing common, you need not use the
same command repeatedly for each file name in the group. Wildcards can be used to specify
groups of files. Two wildcards are used in MS-DOS. They are `*’ (asterisk) and `?’ (question mark).
The `*’ represents one or more characters that a group of files has in common whereas the
`?’represents a single character that a group of files has in common.
Eg. *.txt - represents all files having a “.txt” extension.
letter.*- all files named “letter” with any extension
R*.* - all files beginning with letter ‘R’ regardless of their extension
????.* - all files having four-letter names with any or no extension.
If `*’ is used, when you specify a file name, MS-DOS ignores letters that come after the `*’ up to
the dot (.). Eg. *m.exe would have the same result as *.exe has. Similarly, if the `*’ is used in the
extension, DOS ignores the letters that apper afterward. Eg. Letter.*xt would have the same result
as letter.*.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 12
Institute for Competitive Exams
WINDOWS OPERATING SYSTEM
This is a simple Operating System to learn and use. The user need not memorise or type many
commands. We find small pictures called icons on the screen which can be used to run programs.
This is called GUI (Graphic User Interface). Microsoft Inc. of USA developed the Windows
Operating System. It has undergone many versions such as Windows 95, Windows 98, Windows
ME, Windows 2000, Windows XP and the latest version is Windows Vista.
When we switch on the computer, the OS is the first software program that is loaded. This is called
booting. After the process of booting first the Windows opening screen and then another screen
called Windows Desktop appears. The small pictures on the desktop are called icons. The icons
represent application software that are stored in the computer. The name of the program is written
below the icon.
At the bottom of the desktop we find a grey coloured strip called task bar. On the left of the task
bar is a button named Start. The right side of the task bar shows the time. The task bar shows all
the programs that are currently running on the computer.
Mouse: We find an arrow shaped pointer on the screen, the movement of which is controlled by
moving the mouse. The mouse has two buttons on it. Clicking the left button once indicates a
choice or selection. Clicking the left button twice in rapid succession causes the selected
application or command to run or begin operation.
When we click on the start button on the task bar, a box with a list of options opens up. This is
called a Menu. As you move the mouse over the choices in the menu, the item below the pointer is
highlighted.
Window: A window is the part of the desktop that is used by an application software. All
application programs that we use will have a window.
A window has six important parts.
 Border
 Title Bar - contains minimize, maximize, close buttons
 Menu Bar - contains menus with options for different tools
 Tool Bar - contains icons of the tools of application which are frequently used.
 Large empty white portion - actual working area
 Status Bar - at the bottom of the window.
Files & Folders: When you draw a picture or write a letter using a computer, this picture or letter
is stored in digital form as a file. A file is a unit of stored data or programs. It has a file name and a
type for identifying it. The names may contain file extensions.
A collection of files kept together is called a folder. It can contain files of many types. Just as files,
folders also have names. Folders do not have extensions. A folder can have sub-folders inside it.
(Sub-folders are folders within folders.)
Windows Explorer: Windows explorer is an application in Windows 98 which is very useful
for finding, storing and working on files and folders stored on the computer. You can directly open
files and folders, create, copy, rename and delete files.
To open Windows explorer,
Click on the Start button.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 13
Institute for Competitive Exams
Click on programs Windows Explorer
The explorer window opens. It has a title bar, a menu bar and a tool bar. Below these, the window
is divided in to two halves with a status bar at the bottom.
The left pane shows the different disk drives and folders starting from the desktop. The view seen
in the left pane is called a file structure and can be compared to an inverted tree. If you consider
the desktop icon as the base of the tree, then all the other folders and drives are the branches.
Clicking on any of these drives or folders will open the folder and shows its contents in the right
pane. The right pane shows the content of the drive (sub-folders and files) or folder you have
selected in the left pane.
In the left pane, you can see tiny boxes joined vertically containing a plus (+) sign or a minus (-)
sign. Each of these tiny boxes has a horizontal branch with a folder or drive icon attached to it. A
plus sign indicates that there are more branches or sub-folders, while a minus sign indicates that
there are no more sub-folders. If you click on any plus sign, the smaller branches or sub-folders
under that folder or drive can be seen. If you click on a minus sign, all the smaller branches or subfolders are hidden again.
Creating a new folder: Creating a new folder to save your files is very easy using Explorer. Click
on File on the menu bar, select New and click on Folder. A new folder is created now and is seen
at the bottom of the list showing the contents of the drive C. The name of the folder is New
Folder and it is highlighted in a different colour. Click on the highlighted name and enter (type)
the required folder name (eg. SBI) and click once outside the folder. A new folder named SBI is
created.
When you click on any of the icons in the folder box, the right screen displays the contents of all
the folders and files stored inside the icon you clicked. To oen any folder or file, move the mouse
pointer to the right screen and double click on the selected icon.
The view option: You can change the way the files and folders appear o the main display screen
of Windows Explorer. Explorer gives you four options.
Click on the View menu. It has four options.
 Large icons displays the icons in large size.
 Small icons shows the icons in small size on the display. This is useful when there are a large
number of items to be seen.
 List option shows the icons as a list.
 Details option shows the icons as list with details of each file or folder name, size, type and
when it was last opened or modified.
Working with files and folders:
Explorer allows you to manage your files and folders with ease.
Selecting files and folders: You can select a file or folder by simply clicking on it. You can
select more than one file if you wish. To select adjacent files, click on the first file. Hold the Shift
key down and click on the last file you want to select. All the files between the first and the last one
you picked will be selected. If you want to select more than one file and they are not adjacent to
each other, click on the first file. Hold the Ctrl key and pick out the other files you want one by
one.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 14
Institute for Competitive Exams
Copy or moving files and folders: Windows allows you several ways of copying or moving
folders. You can copy or move files by:
 Dragging and dropping them
 Using the menu option
 Using the icons on the tool bar
 Using key board shortcuts
 Using the shortcut menus that pop up when you right-click on the mouse.
Drag and Drop: Select the file or folder you want to move. Keep the left mouse button pressed.
Without removing your finger from the left button, drag the icon and position it over the folder you
want this file to be dragged into. Release the button. The file or folder will be placed in the new
location.
Cut and paste: Select the file or folder. Click on the Edit menu and click cut. Open the folder or
disk where you want to put this file or folder. Click paste on the edit menu. The file or folder that
you cut has been pasted in the folder in the new location.
You can also use the icons on the tool bar to do this. After selecting the file or folder to be cut, click
on the Cut icon. Similarly, select the destination and click on the paste icon to copy the cut file.
Copy and paste: Select the file or folder that you want to copy. Click on the Edit menu and click
copy. Open the folder or disk where you want to put this file or folder. Click paste on the edit
menu. The file or folder that you copied has been pasted in the folder in the new location. You can
as well use the Copy and Paste icons for this purpose as is done in Cut and Paste process.
Finding files and folders: The hard disk contains hundreds of folders with many files inside
each folder. Windows has a program that will help in locating such files.
Move the mouse pointer over the start button and right click. A small shortcut menu appears.
Click on Find… A window opens where the required information is to be typed.
This utility helps you to find files in three ways:
i)
ii)
iii)
Using the name and location of the file.
Using the date on which it was last modified.
Using some text that appears in the file.
The Name & Location option assumes that you remember at least some part of the file name.
Type the portion you remember in the file name in the box titled Named:. Choose [C:] in the
Look in box. Click Find Now button. All the files and folders containing the portion of the file
name you typed will be displayed for you to find the file you want.
The Date modified option is useful when you remember the approximate date on which you
created or modified the file you are searching for. Choose this option and ifll in the dates between
which you remember working on those files Clicking on Find Now will list all the files created or
modified between the dates you have specified.
The Advanced option can be used when you remember the file size or some line of text contained
in the file that you are looking for. The Find option is also available as part of the Tools menu in
Windows Explorer.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 15
Institute for Competitive Exams
Some useful utilities:
Computer needs maintenance to work well. The main storage area of the computer is hard disk.
Over a period of time, there is a possibility that physical and logical errors can occur in the hard
disk. Files in the memory will also require rearranging periodically. Some of these problems can be
corrected by a few applications that help keep the memory of the computer in order. The two most
useful of these applications are the scan disk and Disk Defragmenter
SCANDISK: ScanDisk is used to check the hard disk for logical and physical errors. Wherever
possible, the damaged areas re repaired. Areas that can not be repaired are identified as bad
sectors and are not used for storage. To start ScanDisk click
StartProgramsAccessoriesSystem ToolsScanDisk
The scandisk window opens. Click on the check box Automatically fix errors so that ScanDisk
automatically tries to repair any errors that are detected.
ScanDisk works in two ways. It checks all files and folders and make any corrections, if required.
This is called Standard scan. This is the option that is selected by default. It can also scan the
surface of the hard disk, repair and check for bad sectors, in addition to checking files and folders.
This is Thorough scan. You can select the drive you want to check, click on the type of scan you
want to be done on the drive and click Start. The scanning starts and on completion, the results
are displayed on the screen. Click on Close to return to the ScanDisk Screen. Close ScanDisk. It is
advisable to run ScanDisk on the computer at least once a month.
DISK DEFRAGMENTER: This application can be used to rearrange the files, remove gaps and
make clear space available on the hard disk for file storage. This will improve the performance of
the computer. To start this application
StartProgramsAccessoriesSystem ToolsDisk Defragmenter
The “Select Drive Window” opens. Select the drive you want to defragment and click on OK.
Defragmentation usually takes a few hours. It is advisable to run this application at least once in a
quarter.
COMPRESSING FILES: Files in computers occupy larger space and it becomes difficult to copy
them on to a floppy due to their size particularly when the file size is more than the space available
on a floppy. Also file handling will be difficult due to their larger size. Hence, compression of a file
(also known as Zipping a file) facilitates file handling and copying of files easier. There are several
programs available that compress files so that they occupy less bytes.
Zipped files occupy less space on any storage device. Hence copying files from one device or drive
to another is much faster. Another advantage is that we can group related files into a single folder
and then zip it.
Zipping a file: Files can be zipped in two ways. One method is by using Windows Explorer and
the other one is by directly using the WinZip program.
Zipping through Windows Explorer: The following steps are to be followed:
a)
Open the explorer window
b)
Select the file to be zipped
c)
Right click on your selection
d)
A shortcut menu opens and click on Add to <filename>.zip
With this the file will be zipped which occupies considerably lesser space than the original one
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 16
Institute for Competitive Exams
To open a zipped file, you have to first unzip it. For this, select the file first and then right click. A
shortcut menu appears wherein select either of the two options – Extract to or Extract to
Folder. In Extract to option, you have to choose the folder in which you want to save the
unzipped file. The Extract to Folder option creates a new folder with the same name as the
zipped file and saves the unzipped file in the new folder.
To zip or unzip a group of files, select all the required files and follow the above procedure.
WORDPAD: Windows 98 contains a word processor called WordPad which appears on your
ProgramsAccessories menu. WordPad contains many formatting features and can accept
documents created in several word processing programs. WordPad edits, loads and saves
documents in the following formats: Word for Windows, text documents, Rich Text Format (RTF)
documents.
WordPad contains a tool bar that you can display to help you access common commands more
easily. WordPad also supports the uses of Ruler and format bar that help you work with WordPad's
advanced editing features. It automatically wraps the text to the next line without pressing 'enter'
key at the end of each line. The text (matter typed) can be made bold, italised and underlined with
the help of B I U letters on the format bar.
You can also change the font (a type style) as well as its size by clicking the drop-down lists and
selecting the required font from the list. Different options are available on menu bar and tool bar
for opening a file, saving, editing, printing etc.
Under the Edit menu you have the options like cut, copy, paste which are useful to move text /
copy text from one place to another place. To execute this task, you have to select the text first and
the open Edit menu and click on 'cut' or 'copy' as the case may be. Click the mouse outside the
highlighted area. Move cursor to the required place where the cut/copied text has to be inserted.
Click 'paste' in the edit menu. You will find the text you have 'cut' or 'copied' inserted at this point..
NOTEPAD: NotePad also appears in the Accessories menu group but is a scaled-down version of
WordPad and offers very few of the formatting capabilities that WordPad offers.
CALCULATOR: Another useful accessory is Calculator which is very useful for carrying out
calculations without searching for a calculator in your desk. Standard and Scientific calculations
can be done through this.
Explain about computer languages / software languages.
Computer processes information under instructions from the user which are given to the computer
by way of input. These instructions can be written in one of various languages evolved over years.
The categories are –
Low level languages: As the computer can understand only binary digits 0 and 1, the instructions
in earlier years were directly written in binary codes known as machine language or low level
language. It involved a lot of effort and difficult to produce error-free programming. The machine
languages are machine/architecture dependent which is best known to the manufacturer. The
machine language is also called the First Generation Language.
Assembly language is also a low level language where short English words were used instead of
binary codes for defining various operations. Eg. ‘Add’ is used to perform adding numbers. These
languages are Second Generation Languages. The Bankmaster Software was originally developed
using Assembly Language.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 17
Institute for Competitive Exams
These languages allow programming flexibility but involve a lot of time and effort.
Middle level languages: These languages offer flexibility of low level language and ease of
programming of high level languages. ‘BASIC’ and ‘C” are the examples.
High level languages: These belong to third generation. They use English words for giving
instruction to the computer and can be learnt and used by any person having some knowledge of
writing programs. Each high level language uses its own set of vocabulary and punctuation rules
called ‘syntax’. Some high level languages are:
a)
BASIC: Beginners’ All Purpose Symbolic Instruction Code. Easy to learn.
b)
FORTRAN: FORmula TRANslation was the first computer language developed by IBM in
1957. Used in engineering and scientific applications. Syntax is very rigid in FORTRAN.
c)
PASCAL: Designed for teaching computer science and used on small computers and is
better structured than BASIC.
d)
COBOL: Common Business Oriented Language is the most popular business language for
data processing. We use this language even today for developing programs.
e)
C: It is a middle level general purpose language. It is used both with Unix and DOS.
Developed in Bell Laboratories in early 1970s. C++ is Cs object oriented version.
Fourth Generation Languages: These are user friendly and easy to learn and use. These are
generally software packages. If any error occurs guiding messages are flashed on the screen to
enable the user to correct the error. SQL (Structured Query Language), Oracle, Ingress, Sybase
etc., come under this.
In addition to the languages, we have translators, interpreters, assemblers, compilers, linkers etc.,
which are special programs used to execute the instructions given in a computer language.
Explain about internet.
Computers in an office are networked using LAN (Local Area Network). Computers in different
locations are connected by WAN (Wide Area Network). Both these network systems are not for
public use and have limited usage. The Internet is a network of thousands of networks. Millions of
computer networks are connected to the Internet network and are available to the public.
Internet was invented by American Department of Defence in 1969. Even computers that use
different hardware and software can be connected to the Internet.
Minimum requirements for internet:
 A computer
 A telephone line
 A Modem
 An account with an Internet Service Provider (ISP)
The simplest way to connect the computer to the Internet is by using a telephone line. A modem
(Modulator-Demodulator) converts the digital signals from the computer into analog signals that
the telephone lines use. The signals are transmitted over the telephone line and are received by the
modem at the other end. These signals are then reconverted into digital signals that the receiving
computer can understand.
The computer should be connected to an Internet Service Provider. VSNL, MTNL, Tata
Telecom and Satyam Online etc. are some important ISPs available. The ISP provides username,
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 18
Institute for Competitive Exams
password, dial-up numbers from the ISP. Usually the ISP gives an auto-dialler which can be used
for connecting to Internet.
The World Wide Web
(Popularly known as Web): The web is organised like a library. It has websites and each web site
has a title and a number to identify it. The title of a web site is called a URL (Uniform Resource
Locator). It is easy to remember the URL of the web site than its number. The URL of a web site is
also called its address.
When you open a web site, you see the contents of that window. This is a web page. The first web
page of a web site is called the home page of that web site. A web page cvan contain text, pictures,
audio visuals etc., These are called links. Links are usually underlined or in a different colour.
When you move your mouse pointer over a link, the arrow changes to a picture of a small hand.
Using these links from the home page you can select and view the other web pages containing the
topic you want.
A browser is an application software that helps you search, view and read web sites on the web.
Internet Explorer (IE) and Netscape Navigator are the most commonly used browsers. To
see the web site of your choice, you will have to type the address of that web site in the browser.
This address is the URL of that web site.
Search Engines: These are web sites available on the internet that provide information on any
topic that you want. Search Engines contain a program that collects information from other web
sites. This information is then stored according to the category it belongs to. Eg. Web sites about
music will be stored in a category named Fine Arts. Examples of popular search engines are Yahoo,
Alta Vista and Google. To view a site of your choice, click on the Address box and type the URL of
that site and click on Go or press <Enter>.
The information required from the internet can be copied on to your document. This is called
downloading. You can also copy and paste text from a web page into your document after
highlighting it.
Explain E-Mail (Electronic Mail)
E-mail is the most widely used means of communication today. Messages, pictures and even music
can be sent as e-mail over any length of distance to reach their destination computers within
minutes at a very lesser cost.
E-mail addresses are different from normal mailing addresses. An e-mail address normally has
four parts. The first part is the name of the user. The second part is the '@ 'sign. The third part
comes after the @ sign and is the name of the service provider. The final part is the name of the
domain (eg. .com, .net etc.).
Eg. sarbjit@gjtutorial.com
In this, sarbjit is the name of the user, the second part is @, the third part ‘gjtutorial.com’ is the
name of the service provider and the domain is '.in'.
Sending e-mail: To send e-mail we have to use e-mail application software on your computer.
The most popular e-mail software is the Outlook Express. When you click on outlook express on
your desk top the outlook express window opens.
In the lower part of the window you find 'Folders' pane at the left side. It has a set of folders named
Inbox, Out box, Sent items, Drafts and Deleted Items. The inbox is used to store incoming
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 19
Institute for Competitive Exams
mail; the outbox is used to store outgoing mail before it is transmitted; the sent items to store mail
that has already been sent and the deleted times for deleted mail. The drafts folder is used to store
mail that is not yet complete.
To the right of the 'folders' pane, you find two panes. The upper pane contains the list of mails in
the folder you have chosen. The lower pane shows you the contents of the mail selected in the
upper pane.
To compose a new letter, click on the New Mail icon on the tool bar. A new window opens for you
to type your letter.
Type the e-mail address of the person to whom you want to send a mail in the To: box. Click inside
the Subject: box. Type a few words about the subject of the letter you want to write. Do not leave
the subject box empty. Click on the blank text area and type your letter.
After completing the letter, click on the Send icon on the tool bar. Within a few seconds your mail
will reach its destination if your are connected to the Internet. If you are not connected to the
Internet, the mail will be stored in your Outbox and will be sent as and when the internet is
connected.
Receiving the mail: Receiving e-mail is also very easy. After connecting to the internet, open
Outlook Express. Look for the Send/Recieve button on the tool bar and click on it. A new
window opens and informs you about the incoming messages. After the messages are received
fully, this window disappears and you see a number next to the Inbox folder in the left pane,
indicating the number of messages received. Clicking on the Inbox folder will show a list of all the
mails you have received in the right upper pane. Double-clicking on any mail on this list will show
you the full mail in a new window.
Sending reply: You can send your reply using the same window. The incoming mail window's
tool bar contains an icon named Reply. Click on Reply icon. A new window opens with the e-mail
address of the person you are replying to along with your e-mail address. The Subject box will
have the same subject, but with the words Re: before it. You can change the subject if you want by
clicking on it and retyping a new subject. Click on the text part of the window and type your reply.
A copy of the original message is also available. You can either retain it or delete it. To send the
mail click on the Send icon on the tool bar. The mail will be sent as described earlier.
Sending attachments: You can attach documents, pictures etc. to your e-mail. These are called
attachments. To send an attachment click on Attach button (paperclip icon) on the tool bar of
your letter window. A new window opens which contains the folders in your computer. Search for
the file you want to attach, select it and click the Attach button. This window closes and you go
back to your mail window. You can see the name of the attachment and file size on a separate
Attachment box in the window.
Receiving attachments: If there are any attachments in your incoming mail, you will see a
paper clip icon in the list of mails in your Inbox. When you open your mail you will also see a
separate Attachment box with the name and file size of the attachment. Double clicking on this
attachment will open a new window for you to save this attachment in your folder you want. You
will also have an option to view the attachment without saving it. If you choose the Save it to disk
option and then click on OK, the attachment will be saved in the folder that you want.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 20
Institute for Competitive Exams
Sending copies of the mail: There will be occasions where you have to send copies of the same
letter to different functionaries situated at different places. This is just like sending carbon copies
of original letter endorsed to others.
To send copies of your mail, look at the New Mail window where you are typing your mail. Below
the To: text box, there is another text box titled Cc: (Carbon copy). Type the e-mail addresses of
the other recipients in this box, each address separated by a comma. When you complete the mail
and click on send button, the mail will automatically be sent to all the recipients. In this case, all
the recipients will know who the other recipients are.
If you do not want them to know who else have received copies, you can type the addresses in the
Bcc: (Blind carbon copy) text box. In this case, only you (the sender) will know the identity of all
the recipients of mail.
Computer Security
Computer security day (CSD) is observed on 30th November every year. Security ensures
effective functionality of the computer systems and has bearing on the cost effectiveness of the
company. As the data stored in the computer systems is of utmost importance, its security is also
gains importance.
The risks with computers are – destruction, disruption/dislocation, disclosure and modification
i.e., destruction due to natural calamities, disruption/dislocation due to improper installation,
improper placement, virus attacks, access and disclosure to/by unauthorized persons and
modification of data by unscrupulous/unauthorized persons.
Our bank has already established comprehensive Information Systems Security Policies Standards
& Procedures on all important aspects of computer security, including Acceptable Usage Policy. A
few of the important policy prescriptions are mentioned below:
 Ensuring password secrecy
 Using Secure Configuration in systems
 Using Anti-Virus
 Ensuring Physical Security
 Guarding against Social Engineering (attempts by tricksters to obtain sensitive information by
gaining an employee’s trust or inadvertent disclosure by employees)
We are providing core banking solutions, and multi-channel services to our customers, both in the
domestic and foreign branches, and undertaking business process reengineering to improve
operational efficiency and enhance customer satisfaction. Therefore, it is so important for all of us,
at all levels, to resolve to adopt safe end-user practices and take precautions to protect our
computer systems.
Steps to minimise losses:
 Access to computer room restricted, computer access also restricted and user-defined, needbased access with password protection should be given.
 Planning of proper computer site
 Not in vulnerable places like basements
 Fire protection
 Proper backup procedures for programs & data
 Backup arrangement for alternate site
 Screening of personnel
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 21
Institute for Competitive Exams

Educate them on importance of security
Write about data structures.
Data: Basic facts about the activities of a business. It is generally in the form of names and
numbers, time and date, weights, prices, product names, roll numbers, account numbers,
customer numbers etc.
Information: It is the set of data which has been converted or organized into a more useful or
intelligible form.
Data Processing: The term used for process of collecting all items of data together to produce
meaningful information. It is mostly associated with business and commercial work such as banks,
insurance companies, schools and so on. It involves scientific data processing. Can be done in
many ways viz., manually, semi-manual, mechanically and electronically.
Electronic Data Processing: Data is basically of two types – qualitative data and quantitative
data. Qualitative data denotes the qualities as colour, state, length etc., Both types of data need to
be recorded before they are processed to get meaningful and required output.
Fields: Raw Data exists in the form of ‘fields’. Field is the smallest unit of data which usually
represents/refers to a single property of an entity. Eg. Salary of an employee, roll number of a
student etc.
Records: Group of fields pertaining to single item of reference such as marks in various subjects
secured by a student. It is the collection of related elementary terms. A record can be given a name
by which the entire collection can be referred to. Eg. Bio-data of an employee.
File: It is a systematized self-contained collection of records or information. The files can be
termed as master files which hold data of semi-permanent nature, transaction files which are
purely temporary and are being updated continuously.
Elements of a computer file: A file consists of a number of records. Each record is made up of
a number of fields and each field consists of a number of characters.
Database: Database is a single organized collection of instructed data stored with a minimum of
duplication of data items. This is common to all users of the system but is independent of
programs which use the data. It requires being stored on large-capacity direct-access devices. The
customer data of bank is a database, the accounts details of the customers of a bank is a database.
Database management is an important task of an organization. The processed data through
database management systems provide more valuable and reliable information to top management
that enables decision making in framing policies and adoption various strategies and approaches
in business development. Thus database serves multiple applications and users.
Database management systems / Relational Database Management Systems etc., evolved for the
purpose of managing data. DBMS is a set of programs that allow users to access and modify a
collection of inter-related files. It provides user with an abstract view of the data. The programs are
used to define, construct and manipulate a database. A database in DBMS is a collection of
interrelated data stored together which allows multiple users to access it simultaneously
maintaining its consistency and integrity. The use of DBMS reduces data redundancy and allows
adhoc or unplanned querying on data.
Relational data model is one of the models in DBMS. In this model the database can be
represented in a simple collection of two dimensional tables otherwise known as the Relational
Database Management System (RDBMS). Today RDBMS is popular worldwide. It represents and
processes data in the form of tables called relations. The columns of the table are called attributes
and rows are called tuples. RDBMS uses SQL (Structured Query Language) for data manipulation.
Oracle we use in our Bank is an RDBMS. The data is basically arranged in rows and columns which
is easier to manipulate and process. Data is retrieved efficiently and fast through the use of
indexes. It is very flexible.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 22
Institute for Competitive Exams
Introduction to MS-Word.
The Word Processors are software packages used to enter and correct data. WordStar, Word
Perfect, MS Word etc., are examples of word processors.
MS Word is an advanced Windows-based word processing product by Microsoft. It has a number
of special features that make it a widely used package. Some of them are –
 One can easily enter, correct and save and make a copy (print) the text.
 Automatic spell and grammar check to identify and correct spelling / grammar mistakes while
entering/typing the text.
 Find and replace option available to make global replacements in the document
 Text can be cut/copy and paste/move within / another document.
 Insertion of drawings, pictures, tables possible.
 Paragraph borders, page borders can be easily created.
 Most useful mail merge facility available by which the same letter can be sent to many people.]
Starting MS Word:
This can be done in the following ways:
 By double clicking on the Word icon on the desktop
 By Clicking Start -> Programs -> Microsoft Word
COMPONENTS OF THE MS WORD SCREEN
A)
Title Bar: Displays the name of the document that is open. The maximize/restore, minimize
and close buttons are used to resize or close the word window.
B)
Vertical scroll bar: Allows moving forward and backward in the document. Up arrow and
down arrow keys can be used to scroll only one line.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 23
Institute for Competitive Exams
C)
Horizontal scroll bar: Used if the page is too wide to fit on the screen. The buttons of normal
view, web layout view, print layout view, outline view are placed alongside the horizontal scroll bar
to facilitate change the view of the page.
D)
Menu Bar: The bar where all the options are available to work with the document. To select
an item from a menu, click it and choose the appropriate option by highlighting and clicking on it.
If the menu items are in grey colour, the items are currently unavailable.
E)
Standard Tool Bar: Most frequently used options are placed as icons
F)
Formatting tool bar: The options used for performing the actions in the menu bar are placed
in this so that the user can invoke the action by clicking on the tool button.
G)
Drawing tool bar: Contains various options available for drawing.
H)
Status bar: Displays information about the position of the cursor on the document, shows
page number, section, line and column, language being used etc.
I)
Work Area: Actual space available for typing, editing etc.,
Options available in various menus and their functionality:
File Menu: Open a new document, an existing document, close the existing document, Save
options, page set up, print preview, print, properties etc., are available. This is useful to open a new
document, an existing document, close an existing document. After the work is over, the file can be
saved. Page set up option is used to define page length, margins,
Edit Menu: Cut, copy, paste, paste special, office clipboard, clear, select all, find, replace, go to
options, links etc. options are available. All edit functions/options are available in this menu.
View Menu: Normal, web layout, print layout, outline views, task pane, ruler, header and footer,
full screen, zoom options are available. Tool bar option enables to get the required tool bars on the
desk top.
Insert Menu: Insertion of break, page numbers, date and time, picture, symbol, diagram, text
box, file etc., are available in this menu.
Format Menu: Formatting of font, paragraph, bullets and numbering, columns, tabs, text
direction, back ground etc., options are available.
Tools Menu: Spelling and grammar, speech, options, track changes, letters and mailing (mail
merge) etc. options available.
Table Menu: Creation of table is possible through this menu. Drawing a table, insertion, deletion
of rows, columns etc. done through this menu.
Window Menu: New window, window split etc. options are available.
Help Menu: Word help is available in this menu.
Shortcuts are available for various operations which enables the user avoid operation through
mouse each time. Shortcuts are combinations of two or three keys in the key board. It has shortcut
menus, auto correct options, online help, wizards, templates, macros etc.,
Introduction to MS-Excel
It is a Windows based spreadsheet developed by Microsoft Corporation. It includes all features of a
spreadsheet package like recalculation, graphs and functions. It provides many statistical, financial
and scientific functions. It is used in many scientific and engineering environments for analyzing
data.
Important features:
 Workbooks are the files in which worksheets related to a project are held.
 Like other applications, Excel has toolbars, shortcut menus, auto correct, online help and
wizards.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 24
Institute for Competitive Exams
 Excel can maintain large volume of data. A worksheet can contain 65,536 rows and 256
columns and a single cell can contain a maximum of 255 characters and one workbook can contain
a maximum of 255 worksheets.
Contents of a worksheet:
Worksheets are used to list and analyse data. Data can be entered and edited on several
worksheets simultaneously and perform calculations based on data from multiple worksheets.
 Rows, columns and cells: Rows are numbered from top to bottom and columns are labeled with
letters from left to right. A cell is the intersection of a row and a column and is referred by the
column name and row number combination. Eg. first cell is referred to as A1 which means column
A and row 1 etc.,
 Menus and toolbars: Like in MS Word, Excel also has Menus and various options or tasks one
can use to perform. Toolbars are usually shortcuts for menu items.
 Sheets: Excel has multiple pages labeled as Sheet1, Sheet2 and so on. These are the worksheets
where the user performs the operations. These can be renamed as per the requirement of the user.
 Formulas: An ‘=’ sign is entered before a formula and without this sign, the entry is treated as
text label. Many arithmetic, scientific, logical operations can be performed using formulas.
 The data entered in the cells can be edited, altered, deleted. Similarly, rows and columns can
also be added, deleted. Data can be cut/copied and pasted within the work sheet/book or another
workbook.
 The data in the excel worksheet can be represented in graphical form such as bar charts, pie
diagrams etc.
 Filter option is available to filter the data according to the column labels and contents of
similarity in the columns.
 Auto fill, auto sum options available.
Data types used in Excel
Text data type is a combination of letters of alphabet, special characters like !, ? and numbers
Number data type consists of digits 0 to 9 and decimal point. Calculations can be done with
numeric data.
Date & time data type. These are taken as numbers in Excel. Dates can be entered in different
formats and calculations possible.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 25
Institute for Competitive Exams
Computer Fundamentals and Microsoft Office
I. Multiple Choice Questions
1. The difference between main memory and storage is that main memory is _____ and storage
is.______
a. temporary, permanent
b. permanent, temporary
c. Slow, fast
d. None of these
2. Which of the following holds the ROM, microprocessor, RAM and expansion cards?
a. Hard disk
b. Floppy disk
c. Mother board
d. None of these
3. The language that the computer can understand and execute is called:
a. Machine language
b. Application software
c. System program
d. None of these
4. A floppy disk contains:
a. Circular tracks only
b. Sectors only
c. Both circular tracks and sectors
d. None of these
5. CD-ROM is a
a. Semiconductor memory
b. Memory register
c. Magnetic memory
d. None of these
6. Which of the following is used as a primary storage device?
a. Magnetic tape
b. RAM
c. Pen drive
d. None of these
7. Information retrieval is fastest from
a. Floppy disk
b. Magnetic tape
c. Hard disk
d. CD-ROM
8. The binary number system has a base
a. 2
b. 4
c. 8
d. 16
9. If even parity mechanism is being used, for data transfer, correctly received data byte is
a. 1101011
b. 1111011
c. 1111111
d. None of these
10. The widely used code in data communication is
a. 8-bit ASCII
b. EBCDIC
c. 7-bit ASCII
d. None of these
II. Fill in the Blanks out of the following:
a. security
b. pointing
c. input devices
d. Computer
e. 1101
f. direct
g. binary
h. CPU
i brain
j. main
k. Secondary
l. 1011
1. CD-ROM is an example of _________ access of storage.
2. Mouse is a _________ input device.
3. _________ is a general purpose machine that manipulates facts according to a set of
instructions.
4. The CPU is the _________ of a computer system.
5. Hard disk is an example of _________ memory.
6. Symbols 0 and 1 represent _________ states of a computer.
7. Data and instructions are entered into a computer through _________
8. Both data integrity and system _________ are required to protect a person's right to privacy.
9. Primary function of _________ is to execute programs.
10. Binary equivalent of 13 is _________..
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 26
Institute for Competitive Exams
Answers Set I
I.
1. a
II.
1. f
2. c
3. a
4. c
5. d
6. b
7. c
8. a
9. b
10. c
2. b
3. d
4. i
5. k
6. 8
7. c
8. a
9. h
10. e
SET 2
I. Multiple Choice Questions
1. Which of the following devices can be used to input printed text?
a. OCR
b. OMR
c. MICR
d. All of the above
2. CPU reads the information from secondary memory
a. Directly
b. First, information is transferred to main memory and from there, the CPU reads
c. Through registers
d. None of these
3. Add, Subtract, Divide, Multiply and Logic operations are performed by
a. Registers
b. Control unit
c. ALU
d. None of these
4. Main memory stores
a. Data only
b. Program only
c. Data, program and results or any other kind of information
d. None of these
5. A smart terminal is one which
a. Looks very attractive
b. Has inbuilt processing capability
c. Must convert input on CRT screen
d. None of these
6. A Laser printer uses
a. White paper
b. Camera lens
c. Heat sensitive paper
d. None of these
7. A plotter is
a. An input device to produce good quality graphics
b. An output device to produce drawings and graphics
c. A fast output device using camera lenses
d. None of these
8. In a hard disk, the 0 track is
a. the outermost track
b. the innermost track
c. totally machine dependent
d. none of these
9. Interpretation of instructions in a computer is done by
a. Registers
b. Control unit
c. ALU
d. None of these
10. A CD-ROM is
a. An optical ROM
b. A magnetic ROM
c. An erasable ROM
d. None of these
II. Fill in the Blanks out of the following:
a. ink jet
b. central nervous system c. scanner
d. Main Memory
e. sectors
f. tracks
g. photo diode h. register
i. to store
j. primary
k. hard
l. output
1. Final results of processing, before releasing to output unit are held in _____ unit.
2. A printer is an _____ device.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 27
Institute for Competitive Exams
3. A control unit acts as _____ for all components of a computer.
4. A general purpose _____ holds data and intermediate result during the execution of a program.
5. The function of the memory is _____ data.
6. The _____ memory is directly addressed by the CPU.
7. Magnetic ink character reader is one type of _____.
8. Some plotters employ _____ in place of ink pens.
9. CD-ROM is read through use of _____.
10. Invisible concentric circles on disk are called _____.
Answers I
1. d 2. b 3. c
Answers II
1. d 2. l
3. b
4. c
5. b
6. a
7. b
8. a
9. b
10. a
4. h
5. i
6. j
7. c
8. a
9. g
10. f
SET 3
I. Multiple Choice Questions
1. LILO is used for
a. creation of boot diskette
b. managing Linux network
c. stack
d. Linux configuration
2. A _____ is a collection of buttons which represent various operations that can be carried out
within an application.
a. Buttons
b. Menu
c. Toolbar
d. None
3. The topmost bar in any application window is the _____. It displays the name of the document
or application.
a. Menu bar
b. Toolbar
c. Status bar
d. Title bar
4. The ATTRIB command in DOS will
a. set or remove the read-only, archive, system and hidden attributes.
b. instruct DOS to route disk drive references from one disk drive to another.
c. define the data file search path that DOS will use each time it fails to locate a file in the current
directory.
d. None of these.
5. The purpose of the MOVE command in DOS is to
a. move one or more files to location
b. rename directories.
c. both (a) and (b) above
d. None of these.
6. An application in Windows based package can be opened through shortcut on desktop by
a. Double clicking on its shortcut.
b. Right clicking and choosing "Open" option.
c. Selecting the icon and pressing Enter key
d. All of the above
7. One of the following statements of DOS Internal commands is not true:
a. Internal commands are those that have been built into Microsoft OS.
b. At the time of booting, Internal commands are automatically loaded into memory.
c. Internal commands are executed instantly without referring to the disk.
d. None of these.
8. Explorer is a file management program in Windows OS that you can use to:
a. view and change the folder/file structures of your disks.
b. view and change the contents of your folder and files.
c. move, copy, rename create and delete folders and files.
d. all of the above
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 28
Institute for Competitive Exams
9. GUI is used as an interface between
a. hardware and software
b. man and machine
c. software and user
d. None of these
10. Linux components include
a. kernel
b. file system
c. shell
d. all of the above
II. Fill in the Blanks out of the following:
a. Edit
b. Alt + Delete
c. Move
d. Recycle Bin
e. cls
f. Desktop
g. operating system h. Task Bar
i. Folder
j. Attrib
k. My Computer
l. Recover
1. DOS command _____ can be used to transfer files from one directory to another.
2. _____ is represented by a computer icon in Windows OS and it contains information regarding
your computer system.
3. The name of the text Editor included in DOS is _____.
4. Device drivers control the interaction between the I/O devices and _____
5. DOS command _____ is normally used to recover readable information from bad or defective
disks.
6. A _____ can contain files as well as sub folders.
7. DOS command _____ clears the screen.
8. The screen that you see once Windows OS is loaded is called the _____.
9. DOS command _____ displays or changes the file attributes.
10. The _____ allows you to easily recover deleted files and folders in Windows.
Answers I
1. c
2. c 3. d 4. a 5. c
6. d 7. d 8. d 9. c 10. d
Answers II
1. c
2. k 3. a 4. g 5. 1
6. i
7. e
8. f
9. j
10. D
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 29
Institute for Competitive Exams
Internet and Web Designing
1. What do you understand by the term DNS? List the domain extensions used by
different types of organizations.
Ans. Domain Name System (DNS) is the standard for resolving names to Internet addresses.
However, the hosts file still plays a role in name resolution during the booting of a system and as a
means to provide LAN resolution when DNS is down. In a nutshell, DNS is a distributed
database whose structure looks like the UNIX file system. DNS is a client/server system in which
the resolvers query the named servers to find an address record for a domain name. The query
process begins with the root name servers and continues until a name server responds with the
address for the domain name.
Three-letter
Type of Organization
Examples
DNS
com
Commercial
yahoo.com
edu
Educational
smu.edu
gov
Government
indianrail.gov.in
int
International Organizations
nato.int
mil
Military operations
army.mil
net
Networking organizations
nsf.net
org
Non commercial organizations
fidonet.org
de
Germany (Deutschland)
it
Italy
us
United States
in
India
2. Write short notes on the following:
Ans.
(a) Web Cookies (technically called Persistent Client State HTTP Cookies) allow a Web site to
store information about you as well as to track your visits to it over a prolonged period of time. To
accomplish this, the Web site stores information in a file in your PC's Web browser. This
information can then be checked by the Web site when you make future visits to the site. In this
manner, cookies provide a level of audience tracking to the Web. Cookies store only basic text
information, such as:
the date/time of your last visit
your browser type and version
any information you may have submitted to the site via a Web form
(b) Internet Security
Maintaining security becomes more important when we use Internet for a commercial transaction.
We need to make sure that messages are private and financial transactions are secure. Methods of
Internet security are:

Authentication: Authentication is the process of determining the identity of a user who is
attempting to access our system. Also for security purpose, the verification of the identity of a
person or process is necessary.

Authorization: Authorization is the process of determining how an authenticated user is
permitted to use specific resources. An authorization mechanism automatically enforces a
management policy regarding resource use.

Auditing: Auditing is the process of data collection and analysis that allows administrators
and others, such as IT auditors, to verify that the users and authorization rules are producing the
intended results as defined in a company's business and security policy.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 30
Institute for Competitive Exams
(c)
SLIP
This is the standard protocol developed for UNIX environment and that supports TCP/IP
networking over serial transmission lines which are connected by a modem. It is an older serial
line protocol that does not support automatic negotiation of network configurations. It has been
replaced by PPP (Point to Point Protocol) because of the following reasons:

SLIP supports only TCP/IP and

SLIP requires the user to write script for automating logon process.

SLIP requires host's TCP/IP parameters configured manually.

Windows 2000 cannot accept connection from SLIP clients.
(d) PPP (Point to Point Protocol)
provides router-to-router and host-to-network connection over synchronous and asynchronous
circuits. It was designed to work with several network layer protocols such as IP, IPv6, IPX and
AppleTalk. PPP frames can be transmitted over a serial transmission line such as Old Telephone
Services, ISDN (Integrated Services Digital Network). It includes LCP (Link Control Protocol and
NCP (Network Control Protocol) for establishing and testing WAN connections, and performing
modification in network communication using each network protocol.
3. What is Microsoft Office Outlook? What are its uses?
Ans. Microsoft Office Outlook is the Microsoft's e-mail program that is included with Microsoft
Office 2000 version. Microsoft Office Outlook puts the world of online communication on your
computer's desktop. If you want to exchange e-mail with colleagues and friends or join newsgroups
to trade ideas and information, then you have to use the different tools of Outlook Express.
There are various uses of Microsoft Office Outlook to perform the various functions. These are as
under:
1.
Junk E-mail Filter
2.
Quick Flag Icon
3.
Create and Manage Alerts
4.
E-mail Messages with restricted Permission
5.
Side-by-side Calendars
6.
Distribution list in an E-mail message
7.
Address Book
8.
Send and receive secure messages
9.
Download newsgroup messages for offline reading
4. Write about Search engine. Give the three elements of a Search engine.
Ans. Search Engine is a software program that locates through a database of Web pages for
specific information. Since Web pages are a vast collection of information, it is difficult to find
specific information you actually need. Therefore, the Search feature in a Web browser such as the
Internet Explorer provides an easy access to a special facility called Search engine. Search engines
scan the Web pages for the words or topics you are looking for.
Different elements of Search engines
Search engines have three different elements to find specific information:

Directories: Search directories contain a list of Websites organized
hierarchically into categories and subcategories. These are created manually.

Spiders: A Spider or robot, explores the Web and helps to find Web pages.
Spiders have the ability to test databases against queries and order the resulting
matches.

Indexing: In Indexing, the Web documents are characterized by recall (ratio of the
number of relevant documents retrieved to the total number of documents retrieved). This
function can be performed either manually or automatically. But many of Websites render manual
indexing quite impractical.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 31
Institute for Competitive Exams
5. What are Usenet Newsgroups? Describe two common UseNet newsgroups.
Ans. Usenet Newsgroups are the individual discussion groups within Usenet. Usenet newsgroups
contain articles posted by Internet and Usenet subscribers. You participate in newsgroups by
reading the messages and responding to them. There are two types of newsgroups:
(a) Moderated Newsgroups: Each message goes to a human moderator. The moderator looks
at the messages who makes it sure that they are appropriate for the group. If so, the messages are
posted.
(b) Unmoderated Newsgroups: In an Unmoderated newsgroup, all the messages are
automatically posted. When messages are posted, Usenet servers distribute them to other sites that
carry the newsgroup.
6.
Write a short note on the following
Ans. (a) File Transfer Protocol (FTP)
One of the most popular uses of the Internet is to download files—that is, transfer files from a
computer on the Internet to your computer. Thousands of files are downloaded every day on the
Internet. Most of these files are downloaded using the Internet's File Transfer Protocol, commonly
referred to as FTP. This protocol can also be used to upload files from your computer to another
computer on the Internet.
Numerous FTP servers all over the world allow users anywhere on the Internet to log in and
download files placed on them. The main competitor for FTP is HTTP (Hyper Text Transfer
Protocol) and the day is not very far when sites would run HTTP servers instead of the FTP
servers. It is so because HTTP servers can do whatever FTP server can do and more efficiently.
(b) Hypertext is a system of organizing, navigating, distributing and publishing information
electronically. Hypertext information is organized into an interconnected Web of linked text and
image. Hypertext documents (called Web pages) contain navigational anchors (commonly known
as hyperlinks) that allow you to navigate to another part of the same document or different
document residing on another Website. It is also used for accessing information on the Internet.

Hypertext makes extremely large volumes of information from a wide variety
of sources available via a single medium (the Web).

Hypertext makes the information relatively easy to navigate using a universal
software application called a Web browser, such as Microsoft Internet Explorer and
Netscape Navigator.
7.
What are the different types of Lists available in HTML?
Ans. Using HTML, we can arrange items in lists in several ways. The two most commonly used
methods are:
(a) Bulleted: This is an unordered list. In this, each item(paragraph) is prefaced with a bullet.
The tags used for this are <UL> and </UL>.
(b) Numbered List: is a list with numbers in ascending or descending order. In this, each item
(paragraph) is prefaced with a number. The tags used for this are <OL> </OL>
8.
What do you mean by a Web browser?
Ans. A Web browser is the software package you use to view pages on and navigate the World
Wide Web. Web browsers are sometimes referred to as Web clients or with other fancy names like
"Internet navigation tools", but Web browser is the most commonly used term.
9.
What are the main factors you would keep in mind while designing a Web site.
Ans. We should remember that we have about fifty seconds to grab the attention of our Website
viewers. If we follow the under mentioned tips, we will be able to grab the attention of our viewers
or else we may miss the opportunity.

Make the title of the Web site catchy, descriptive and accurate.

Provide clues at the top of the page about what the page contains.

If your page is more than three "screen fulls", then break it into two pages.

Use text and link colours that complement and do not clash.

Make links descriptive but not like "Click Here!"
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 32
Institute for Competitive Exams

Keep file names short and consistent.

Create a link to the e-mail address of the Web Master.
10.
What is e-mail?
Ans. E-mail is a method of sending messages, voice, video and graphics over digital
communication link such as the Internet anywhere in the world at very cost effective rate.
Technically, e-mail is a type of client/server application that provides a routed, stored message
service between any two e-mail accounts. Because all modern computers can be connected to the
Internet, users can send e-mail over the Internet to any location that has telephone or wireless
digital service.
11.
What are the popular interactivity tools in the market?
Ans. Those tools which transform static web sites into dynamic are called interactivity tools.
Interactivity tools allow Web designers to add functionality to Web pages that otherwise could not
be gained with HTML. For example, these tools create interactive forms or make text turn colours
when a mouse moves over it. Most popular Interactivity tools which are popular in market are:

CGIScript (Common Gateway Interface Script)

JavaScript

VBScript (Visual Basic Script)
12. Write a short note on the following:
Ans.
(1) VRML
Recently developed language VRML lets people create 3D worlds to describe the geometry of a
scene. VRML files are also much smaller than graphic files. VRML files are text files that contain
instruction(s) for drawing the VRML world. These files end in a .WRL extension. After a file is
created, it is posted on a Web server.
There are now two official versions of VRML. However, unlike HTML versions, there is no
backward compatibility. You need to make a choice of the version that you are going to use.

The version 1.0 was limited to creating static scenes.

The version 2.0 of VRML introduces programmable behaviours. It means the things are
really starting to live up to that virtual reality tag.
(2) Web Hosting
Depending on the software given by the Internet Service Provider (ISP), we are able to host our
Web site on the Internet. Before upload Web page we need to have the following:

Space on a Web server

Procedures for uploading Web files

The software needed for uploading Web files
Some Internet Service Providers give a definite amount of space as part of our monthly
subscription. We may get mega' bytes of Web storage space, which means we can create as many
Web pages as we want to for our own business, for clients, for who so ever needs it.
(3) FTP Servers: Similar to the Web servers, the Internet also has the installations of FTP
servers. Many organisations use FTP servers to handle the distribution of files. When a user links
to download something, the link actually redirects to FTP, instead of HTTP Some files in the FTP
servers may be accessible to the general public, while others are accessible only by the user. To
separate the general public from the more private users, FTP servers are divided into two parts:
 Anonymous server: Anonymous server is the most common use of FTP. FTP sites that allow
anonymous FTP do not require a password for access. You only have to login as anonymous and
enter your e-mail address as password (for their records).
 Non-anonymous server: If we use a non-anonymous server, then we will log in and have to
give your password.
13. What are the various applications that can be carried out using Internet?
Ans. Following are some of the applications that are performed with the help of Internet:
1.
To use electronic mail all over the globe for a very small price.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 33
Institute for Competitive Exams
2.
To participate in group discussions on topics of interest, through public news groups.
3.
To find educational tools, universities around the world, book stores, and libraries for
sharing online information.
4.
Commercial electronic store fronts are growing in number in the USA and Europe. One can
order different products over the Internet.
5.
To get technical support for products one is using. One can publish information such as
technical or marketing literature.
6.
To make available changes to reflect late breaking news that would be impossible for
printed publications. Changes can be done almost instantaneously.
7.
The Internet has become the first global venue for publish, ing information. This network
has enough users now and it is benefiting from the positive feedback loop: the more users it gets,
the more content it gets; and the more content it gets, the more users it gets, thus getting enriched
forever.
14.
Name five important header fields in an e-mail message and explain each one
of them.
Ans. The header of e-mail message is the upper-most section. It displays information regarding
the status of the messages. A header does the recording of the message information and provides it
to the recipient(s) of the message. Headers are present in both outgoing (sent) and incoming
(received) messages. The principal header fields related to message transported are listed below:
To: E-mail address/addresses of primary recipient(s).
Cc: E-mail address/addresses of secondary recipient(s) to whom copy needs to be sent. Bcc: Email address/addresses of secondary recipient(s) to whom copy needs to be sent but the primary
recipient should not know about the despatch of mail to these addressees.
From: The originator or the creator of the e-mail. Sender: E-mail address of the actual sender.
15.
What is Telnet?
Ans. Full form of Telnet is Telecommunication Network. It is a virtual terminal protocol allowing
a user logged on to a TCP/IP host to access other hosts on the network. For example, some hosts
might be UNIX-based systems, some might be Windows 2000 based computers and others might
be Macintosh. To make things easier, many hosts use a system that gives you access to their
resources. As and when you connect using Telnet, you will need to use terminal emulation. In this
way, you make sure your keyboard and monitor function as the host expects. The most common
terminal emulation is the VT-100 emulation. Thus, if you use Telnet software, then VT-100 is a
safe emulation to use.
16.
What is NetMeeting? What is the use of it?
Ans. NetMeeting is a conferencing program in Microsoft Windows operating system that you can
use to chat with other people over the Internet or on a local network. In NetMeeting you can:

Talk to another person, using keyboard or through speaker and microphone.

Meet face-to-face with another person, if both of you have cameras connected to your
computers.

Send and receive messages among many people, by typing messages in a Chat window.

Create a drawing on a whiteboard, and have others edit the drawing while you watch.

Share an application document, such as Microsoft Word or FrontPage Express, with other
people.
17. Write a short note ort Internet Service Provider (ISP)?
Ans. To reach the Internet, most desktop computers call an intermediary computer at a company
that serves as an Internet access provider, also known as ISP (Internet Service Provider). Internet
Service Providers support many types of Internet connections. For example, if you want to connect
an individual PC to the Internet, you can choose a national provider. If you want to connect several
geographically scattered sites, contact one of the major national and regional Internet providers.
To get connected to the Internet, you will need to register an account with an Internet Service
Provider. (In India, you need to get connected to VSNL, MTNL, etc.).
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 34
Institute for Competitive Exams
You can gain access to the Internet by a dial-up or a leased telephone line. There are two types of
dial-up accounts available - the Terminal and, the TCP/IP account. The leased lines are available at
various speeds. The procedure involved in getting either the terminal account or a TCP/IP account
is the same. There are two steps in obtaining the account. The first step is to get a modem for your
computer, which is approved by Department of Telecommunications (DOT) for use on telephone
lines. The next step is to contact the ISP's (say VSNL) customer relation section in your city and
complete the formalities to get an Internet connection. After that you will get the login name and
use a password.
18
What do you mean by the term protocol? What are the different types of
protocols used in Internet layer?
Ans. Protocols are the rules that determine the way in which the information is passed between
computers on the network. Protocol specifies the computer language used to transfer information.
Specifically, a protocol tells the browser where the information is located (for example, on a Web
server, or a local hard drive). It also tells the browser what to expect from th e document retrieval
process (for example, whether a logon is required, what information about the document will be
provided by the server, and so on). The various protocols in the Internet layer are:

IP (Internet Protocol)

ARP (Address Resolution Protocol)

RARP (Reverse Address Resolution Protocol)

BootP (Boot Program)

ICMP (Internet Control Message Protocol)
19.
Write short notes on the following pertaining to WWW.
Ans.
(a) Bookmarks
Bookmark is an option that lets you place a mark in an online document so that you can return to
it quickly and easily. Many Internet-access tools provide bookmarks so that you can identify and
return to a favourite site without having to remember exactly how you got there.
(b) History List
In a Web browser, a list of all the pages you have visited since you started your Web browsing
program is stored. The history list will actually show you only the pages you have visited in a
straight line from your starting point. Any time you retract the path and then follow a different
link, you will lose the original history path from that point forward.
20. What do you mean by chatting on the Net? What precautions should you
observe when chatting on the Internet?
Ans. Chatting is similar to talking on the phone. The difference being-on the phone you talk and
while chatting you type what you want to say and the message is instantly received by the person
you are chatting with. Moreover, you can chat with groups-i.e. many people can receive the
message you want to send simultaneously.
Following precautions must be observed to overcome the problems of chat which may cause
damages to you or your computer communication systems:
1.
The first and the foremost important rule of chatting is not to hurt anyone. One must not
tell other his/her identity or phone number as there are a number of naughty users on the net.
2.
Do not ever make the mistake of giving your username and password to anyone on the net.
2i Write some HTML tags.
Ans.
The tag<l> </l> displays text in italics face style.
The tag <U> </U> displays text as underline.
The tag <B> </B> displays text in bold face style.
Links are created in a Web page by using the <A> </A> tags.
Anything written between the <A> </A> tags becomes a hyperlink/hotspot. Clicking on the
hyperlink, navigation to a
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 35
Institute for Competitive Exams
different Web page or image takes place. The document to be navigated need to be specified. By
using the HREF attribute in the <A> tag, the next new navigable Web page or document can be
specified.
Links are made up of three parts. These are:
An anchor tag, <A>
An attribute, HREF = “ ”, which is located within the opening anchor tag, like
<A HREF = “http://www.gjtutorial.com” > < / A>
An address (called a URL), which tells the browser about the file to link to. URLs identify file
locations (addresses) on the Web or on your local hard drive. These addresses can be those of
HTML documents or elements referenced by documents, such as images, applets, scripts, and
other files. The URL is always enclosed in quotes, for example, “address.html”
22. Write short notes on the following:
Ans. (a) Uniform Resource Locators (URL)
URL is simply an address of a document on the Internet. Although a URL can look complex and
long, it is made up of four basic components. These components are shown below:

Protocol

Host Name

Folder name

File name
Each of these has a specific function to play. Depending on the application, a URL can include
additional information, to specify user names or input to a server-side script. URLs contain
information about both the access method to use and the resource itself. They are used by Web
browsers to connect you directly to a specific document or page on the WWW, and you do not have
to know where that resource is located physically. A sample URL might look like
http://bankpo.gjtutorial.com
(b) Smileys
When we talk to people face-to-face, the tone of our voice and our facial expressions or convey
great meaning to what we say. You can personalize your written messages by using smileys you
create with your keyboard. The main use of smileys is to indicate a joke when the text might not be
clear that the author is kidding.
(c)
Netiquette
Netiquette is a collection of rules, standards that distinct the Internet from traditional forms of
communications such as telephone conversion, face-to-face meetings, paper based letters. It helps
you to avoid misunderstanding that may arise during communication accomplished via any
Internet services especially e-mail, chat and mailing lists, etc.
23. Illustrate by example some of the crimes which are performed through the
Internet?
Ans. Internet helps us to connect with whole world for exchange of our views and material. With
the help of Internet, we can send e-mail messages, sell any items as well as purchase any items and
we can use video conferencing. However, these are some of the uses which are helpful for us, but
many crimes are also sneaking into the Internet. Here are some of the crime which are done using
the Internet:

Illegal or offensive material shown on Web sites

Computerised fraud

Disgusting e-mails

Viruses
24.
What do you mean by Hyperlinks?
Ans. A hyperlink, or link, is a navigational element in a hypertext document (such as Web page)
which provides access to another hypertext document or multimedia file that you may wish to visit.
Web browsers, distinguish text hyperlinks by blue colour or underlined text blocks.
When clicked with a mouse, a hyperlink downloads and displays:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 36
Institute for Competitive Exams

a different location in the current hypertext document; or

a different hypertext document.
25.
What are the four basic components necessary to make a Web connection
successful?
Ans. A typical Web connection consists of the following four basic parts:

The desktop or client computer or similar device.

The Internet Access Provider or Internet Service Provider (ISP).

The Host or server computer at the other end.

The communication networks that links the first three components.
26.
What is home page?
Ans. While browsing, it is easy to get lost wandering around the Web. Therefore, we should
designate one page as home page. Home page is the page you return to when you click the Home
button on the toolbar and it is also the page you open when you start Internet Explorer.
27
What do you mean by list server?
Ans. A list server is an automatic mailing system available on the Internet. Rather than sending email on a particular topic to a long list of people individually, you send it to a special e-mail
address, where a program automatically distributes the e-mail to all the people who subscribe to
the mailing list. A mailing list is one of the most exciting uses of e-mail. It connects a group of
people who are interested in the same topic, such as home schooling. When one person sends email to the mailing list, the same is sent to every one in the mailing list. When you want to
subscribe to a mailing list, you send a message to a computer instead of a person. That computer,
known as a list server reads your e-mail and automatically subscribes you to the list.
28. What is inline elements?
Ans. Inline elements are the HTML elements that can be used to add the description of the line in
a document. Some of these elements are Image, Quote, Subscript and Superscript elements.
29. Define the term Face attribute. Give different font characteristics you can
specify in the Face attributes.
Ans. The FACE attribute specifies a typeface that you would like to use for the text enclosed by the
font element. You can use a single typeface (such as Arial or Courier), or you can give a list of
typefaces separated by commas.
To specify font characteristics, follow these steps. You can set some or all of the following
characteristics:
(a)
Identify the text to format with the <FONT> tag.
(b)
Select a specific font using the FACE = attribute.
(c)
Change the font size using the SIZE = attribute. You set the size of text on a relative scale
from 1 to 7 with the default size being 3.
You may set the size absolutely with the number from 1 to 7 or relatively, with + or - to change the
size. Following example explains the above steps:
<P><BIG>Large Text</BIG></P> <P><BIG>
<FONT FACE = "Times New Roman, Times" SIZE = "+3">Larger Text</FONT>
</BIG></P>
(d)
Add a COLOR = attribute to set color, using a color name or a #RRGGBB value. For
example the following HTML statement produces a different colour along with the text.
<P><BIG> Large Text </BIG></P> <P><BIG>
<FONT FACE = "Times New Roman, Times" SIZE = "+2" COLOR = "#FF0000"> Larger
Text</FONT>
</BIG></P>
30. Write short notes on any two of the following Web publishing 'tools:
Ans.
(a)
Host Name
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 37
Institute for Competitive Exams
The hostname is the name of the server that holds HTML documents and related files. Each server
has a specific address and all documents stored in the server share the same host name. For
example, if your Internet service provider's server name is xyz, your host name would be
something like www.xyz.com
(b) Style Sheets
The basic idea of a style sheet in HTML is that users can separate appearance considerations from
the semantic structuring of a document. Using a style sheet, you should be able to set all the text
H3 headings to a certain colour, such as aqua. You will do this by using a named collection of
representation information called a style sheet. Your document could conform to remote style
sheets using the LINK element in the HEAD of the document.
Alternately, you can also import and then modify a style sheet like this:
<STYLE TYPE="text/css"> ©import url (http://www.houseofstyle.com/basic);
H3 {
color: aqua
} </STYLE>
31- What are the different kinds of Image files that HTML document accepts? How
can you specify the height and width of an image in a document using HTML?
Ans. HTML allows placing of static and animated images in a Web Page. HTML accepts picture
file formats .gif and .jpg.
Images can be loaded faster by specifying an image's height and width. As the browser loads the
page, it notes the height and width attributes and leaves that much space for the image. Next, it
lays out the remaining text, and then it goes back and fills in the image. If you do not include these
attributes, the browser has to load enough of the image to get the dimensions before it can lay out
the rest of the text, thereby slowing the display of text.
To specify image height and width, add the HEIGHT= and WIDTH= attributes in the <IMG> tag
as shown below: <IMG SRC="x:\gjlogo.gif" ALT="GJ Tutorial Logo" HEIGHT="200"
WIDTH="600">
32. What do you mean by special characters?
Ans. Some unusual characters that do not appear on the standard U.S. 101-keyboard, such as
fractions and accented characters are not supported by all browsers but some browsers display
special characters.
33. Write Short Notes On
Ans. (a) Common Gateway Interface (CGI) is an accepted standard for interfacing Web
servers and external applications. Web servers were originally designed to serve static HTML
documents along with other associated static files. A Web browser that communicates with a Web
server limits its functionality to serving static pages. It displays only documents whose contents
will not change between requests or during page visualization. However, CGI establishes a
standard for information to be exchanged between Web servers and browsers. CGI allows the
passing of information between a browser or server to an external program that performs some
actions. It then outputs its results back to the user's browser.
CGI Methods
A method is a way of invoking a CGI program. There are three main methods. These are:
(1) GET Method: In GET method, the CGI program receives the data in the QUERY_STRING
environment variable. The program must process the string in order to interpret the data and
execute the needed actions.
(2) POST method: When you use the POST method, the Web server transmits the data to the
CGI program through the stdin (standard input).
(3) HEAD method: The HEAD method is similar to the GET method, except that with the HEAD
method, only the HTTP headers (and not the data itself) are sent by the Web server to the browser.
(b) JavaScript: is one of a new breed of Web languages called scripting languages. Scripting
languages make it easy for non-programmers to improve a Web page. JavaScript was originally
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 38
Institute for Competitive Exams
developed by Netscape Corporation for use in its browser Netscape Navigator. It includes a
convenient syntax, flexible variable types, and easy access to the browser's features. It can run on
the browser without being compiled. The source code can be placed directly into a Web page. Some
characteristics of JavaScript are as follows:
1. The JavaScript language is interpreted rather than compiled. Changing a script is as simple as
changing an HTML page.
2. Rather than creating objects and classes, you can do quite a bit by simply accessing existing
objects in JavaScript.
3. Variables are loosely typed. You do not need to declare variables before their use, and most
conversions (such as numeric to string) are handled automatically.
4. Event handlers enable a JavaScript function to execute whenever an action is performed on
part of the HTML document.
(c) Active Server Pages (ASP) use an ISAPI (Internet Server Application Programming
Interface) Dynamic Link Library (DLL) as a scripting host to implement the VBScript and JScript
scripting languages on the server. ASP.DLL.ISAPI acts as a filter on the output stream to convert
.asp files into HTML as they are transmitted to the user. ASPs are actually a HTML pages that
contain script written in VBScript or JScript. The .asp extension is associated with
ASP.DLL.ISAPI application. When a Web browser requests a page with an .asp extension, IIS
(Internet Information Server) sends the .asp file to ASP.DLL and ASP.ISAPI for processing and
receives a result either in HTML code to be viewed by the client browser, before transmitting it to
the user.
(d) VBScript
Scripting languages such as VBScript are derived from the Visual Basic language. It extends the
capabilities of the Web much like an airplane extends the capabilities of man so he can travel
through the sky.
VBScript is a type of programming language used to provide control in another host environment.
It is interpreted rather than compiled. This means that a program built with a scripting language
must be run in the environment that contains the scripting language's interpreter and cannot be
run as a stand-alone application.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 39
Institute for Competitive Exams
Internet and Web Designing
I. Multiple Choice Questions SET 1
I. Multiple Choice Questions
1. Web site is a collection of
a. HTML documents
b. Graphic files
c. audio and video files
d. all of above
2. Internet is governed by
a. I&B
b. IETF
c. Inter NIC
d. None of these
3. Which of the following protocols is used for WWW?
a. ftp
b. http
c. w3c
d. none of these
4. The first network that planted the seeds of Internet was:
a. ARPANET
b. NSFnet
c Vnet
d. Inet
5. The communication protocol used by Internet is:
a. HTTP
b. WWW
c. TCP/IP
d. All of above
6. The first page that you normally view at a Web site is its:
a. Homepage
b. Master page
c. First page
d. Banner page
7. Internet is
a. complex system
b. decentralized system
c. dynamic system
d. all of these
8. What facilities do you need to put your Web pages on the WWW?
a. connect to the internet b. a Web Browser
c. a Web Server
d. all of these
9. Which of the following topology is least affected by addition-removal of a node?
a. RING
b. STAR
c. BUS
d. none of these
10. For a small Web site, one needs to buy space from the
a. Network administrator b. Telephone exchange
c. ISP
d. none of these
II. Fill in the Blanks out of the following:
a. messages
b. Web server
c. Internet Network Information Center
d. dialup
e. Web pages
f. Telephone line
g. Callback
h. Backbone
i. Internet gateway
j. Web Site
k. Auditing
l. transmission
1. The Internet is most often used for the exchange of _____ and information.
2. The central structure that connects elements of a network is known as the _____.
3. In _____ connection, you can connect your computer to an ISP server, with the help of a
modem.
4. _____ are the documents that use HTTP.
5. A _____ is a powerful computer that acts as a shared storage resource on the Internet.
6. The addressing scheme of the Internet is managed by the _____.
7. Connecting to the Internet requires four things: PC, modem, _____, and Internet software.
8. An online service provides its subscribers with access to the Internet via a _____.
9. _____ is a security feature.
10. Collection and analysis of data is called _____.
Answers
I.
1. d
6. a
II.
1. a
6. c
Computer and IT
2. d
7. d
3. b
8. d
4. a
9. a
5. c
10. c
2. h
7. f
3. d
8. I
4. e
9. g
5. b
10. k
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 40
Institute for Competitive Exams
I. Multiple Choice Questions Set 2
1. For connection of the Internet, you will need
a. an IP address
b. a TCP/IP connection
c. an ISP
d. all of these
2. The server on the Internet is also known as a
a. repeater
b. gateway
c. host
d. none of these
3. A user can get files from another computer on the Internet by using
a. FTP
b. HTTP
c. UTP
d. (a) and (b) above
4. In MODEMS
a. Several digital signals are multiplexed
b. A digital signal changes some characteristic of a carrier wave
c. Digital signal is amplified
d. none of these
5. In reality, Internet Protocol recognizes only
a. a postal mail address
b. a location of the host
c. an IP address
d. none of these
6. The ground station in VSAT communication is called
a. HTTP
b. Hub
c. multiplexer
d. none of these
7. A small network making up the Internet and also having a small numbers of computers within it
is called
a. host
b. address
c. sub domain
d. none of these
8. Computers on the Internet owned and operated by education institution form part of the
a. com domain
b. edu domain
c. mil domain
d. none of these
9. For a small Web site, one needs to buy space from the
a. Network administrator b. Telephone exchange
c. ISP
d. none of these
10. A host on the Internet finds another host by its
a. postal address
b. electronic address
c. IP address
d. none of these
II. Fill in the Blanks out of the following:
a. ARP
b. Protocol
c. Client
d. LAN
e. an E-mail client
f. bus
g. Token passing h. domain
i. 33.3 kbps
j. PPP
1. Netscape Navigator Web browser software is a ___________.
2. On the Internet, ___________ is analogous to a telephone.
3. Fastest connection will be possible on the Internet with the help of ___________ modem.
4. Text containing connections within it to other document is called ___________.
5. ___________ means rules for exchange of message between two or more hosts.
6. ___________ networking solution is suitable for networking in a building.
7. ___________ topology shares a single channel on which all station can receive and transmit.
8. ___________ LAN access method uses the right to transmission by a special bit pattern.
9. ___________ is a collection of sites that are related in some sense.
10. ___________ is a serial protocol.
Answers
I. 1. c
2. c 3. a 4. b 5. c
6. b 7. c
8. b 9. c 10. c
II. 1. c
2. e 3. i
4. a 5. b 6. d 7. f
8. g 9. h 10. g
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 41
Institute for Competitive Exams
I. Multiple Choice Questions SET 3
1. Usenet discussion groups have their own system of organization to help you find things just as:
a. Internet Excel
b. Archie
c. Gopher
d. none of these
2. The WWW standard allows programmers on many different computer platforms to show the
information on a server. Such programmers are known as:
a. ISP
b. Web browsers
c. Web Servers
d. none of these
3. Some Web pages are divided into independent panes named as:
a. Excel
b. Frames
c. Outlook Express
d. none of these
4. The Web server can be addressed by either its domain name or by the address in numerical:
a. network host
b. IRC networks
c. Archie
d. none of these
5. Netscape Navigator and other browsers such as the following are available free on the Internet:
a. Internet Explorer
b. HotDog
c. Adobe PageMaker
d. none of these
6. Most news readers present newsgroups articles in:
a. threads
b. mail
c. column
d. none of these
7. Which of the following protocols is used by Internet mail?
a. HTTP
b. TCP/IP
c. FTP
d. none of these
8. The server on the Internet is also known as a
a. repeater
b. host
c. gateway
d. none of these
9. A user can get files from another computer on the Internet by using
a. FTP
b. HTTP
c. UTP
d. both (a) & (b)
10. Take the odd item out.
a. Yahoo!
b. HotBot
c. Lycoss
d. Win 2000
II. Fill in the Blanks out of the following:
a. ISP
b. Hypertext
c. packet switching
d. Hyperlinks
e. HTTP
f. Netscape Navigator
g. 1970
h. WWW
i. Authorization
j. Stageful Inspection
k. $$$
1. One of the most common ways to get information, in the early _____ was to log on to the other
computer network and access the files there.
2. In order to transfer messages in a computer network, we use the techniques called _____.
3. For a small Web site, one needs to buy space from the _____.
4. _____ is a non-linear text.
5. _____ is a non-persistent, stateless protocol.
6. An Internet server may not be a part of the _____.
7. A _____ is a host that is connected to two or more physical networks simultaneously and is
configured to switch packets between them.
8. Using a browser to travel the Web is called _____.
9. _____ is one type of Firewall.
10. _____ is the process of test whether an authorized use is permitted to use resources or not.
Answers
I.
1. a
6. a
II.
1. g
6. h
Computer and IT
2. b
7. a
3. c
8. a
4. a
9. a
5. a
10. d
2. c
7. d
3. a
8. f
4. b
9. j
5. e
10. i
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 42
Institute for Competitive Exams
Data Communications and Computer Networking
1.
What is a transponder? How does it differ from amplifier?
Ans. Transponder is a device present in communication satellite.
Transponder listens to some portion of frequency spectrum, amplifies the incoming signal and
then rebroadcasts it at different frequency to avoid interference with the incoming frequency
signal.
Whereas, amplifier is a device used to increase current voltage or power of a signal. Amplifier does
this by taking power from a power supply by amplifying the input signal to match the output signal
with the increase in amplitude.
2.
How does an amplifier differs from a repeater?
Ans. Repeater does for digital signal what an amplifier does for analog signal. A repeater reshapes
the digital pulses so that they retain their digital level voltages for data 1 or zero.
3.
What is transmission impairments. Classify the various types of transmission
disturbances.
Ans. The distortion, noise and disturbances caused in the transmission of signal through a
medium is known as impairments. These are classified as follows:
Systematic disturbance/distortion or static impairments: It occurs every time we transmit a given
signal over a given channel. Knowing the channel, we can predict what is going to occur.
Systematic distortion is, then, something which might possibly be compensated for electronically
so that its effects are eliminated.
Fortuitous disturbance/distortion or transient impairments: It occurs at random so it is not
predictable except in terms of probability. It refers to transient impairments rather than
continuing conditions on the line. This type of disturbance is more difficult to compensate for
except that steps can be taken to minimize its effects and repair the damage it does.
4.
What do you understand by the term channel bandwidth. How channel
bandwidth is affected by the signal to noise ratio?
Ans. The term channel bandwidth refers to the range of frequencies that is available for the
transmission of data. This is the term used to describe the data handling capacity of the
communication system. The more the bandwidth of the channel, the more data it can transmit. For
a channel, with the bandwidth of H hertz, and signal to noise ratio as S/N in decibel (dB), the
channel capacity is limited by the formula H log2 (1 + (S/N)).
5.
Name five methods of multiple accesses used for satellite networks.
Ans. Methods of multiple access used for satellite communication are:
1. Polling
2. FDMA (Frequency Division Multiple Access)
3. TDMA (Time Division Multiple Access)
4. CDMA (Code Division Multiple Access)
5. Aloha
6.
What are modems? What purpose do they serve in data communication
systems?
Ans. Modems are the devices used to convert digital signals (to be communicated over an analog
channel such as a telephone line) to sine wave at the sending end and back to digital signals at the
receiving end. They are used as a means to connect two distant located PCs so that PCs can
communicate with each other using telephone lines.
7.
List down the applications where computer networks can be used.
Ans. Data communication networks have become an integral part of business, industry and
entertainment. Some of the network applications in different fields are given below:
a) Sales and marketing
b) Financial Services
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 43
Institute for Competitive Exams
c)
d)
e)
f)
g)
h)
i)
Manufacturing
Electronic mail
Directory Services
Information Services
Electronic Data Interchange (EDI)
Tele-conferencing
Cellular Telephone
8.
Explain the concept of QPSK modulation?
Ans. In phase shift keying (PSK) the phase of the signal is changed to represent data. In this
system, situation 'off is represented by sending a signal burst same as the previous one. A 'on'
situation is represented by sending a signal burst of opposite phase to the preceding phase. In this
way, PSK makes efficient use of bandwidth of the channel. When we want to send signal at higher
bit rate, then we can use even more efficient method using QPSK. In QPSK (Quadrature Phase
Shift Keying), instead of allocating a phase shift of 180°, it uses the phase shift of multiples of 90
degrees. This will cause each signal element to represent two bits rather than one.
9.
In a QPSK modulator, data rate is 9600 bits/sec Calculate the symbol rate.
Ans. The number of symbols possible for QPSK = 4 or 22.
Hence symbol rate = bit rate/(number of bits per symbol) or symbol rate = 9600/2 = 4800
10. What do you understand by the term transmission media? Classify the
different transmission media.
Ans. Transmission media is the physical path between transmitter and receiver in a data
transmission system. Classification of transmission media:
Magnetic media: In this method, we write data on the magnetic media and physically transport
the media like floppy disk, etc. to other machine.
Guided media or bounded media: With guided medium, the waves are guided along the
transmission medium such as Twisted pair wires (used for telephonic system), Coaxial cable and
Optical fiber.
Unguided media or unbounded media: The atmosphere and the outer space are the
examples of unguided medias, that provide a means of transmitting electromagnetic signals but do
not guide them. This form of transmission is also referred to as wireless transmission.
11.
Why TCP/IP is most appropriate for Internet?
Ans. TCP/IP is an abbreviation of Transmission Control Protocol/Internet Protocol. It is an
industry standard protocol suite for wide area network. It is routable protocol that is suitable for
connecting the dissimilar devices (like Microsoft OS and Unix) or heterogeneous networks. It is
this protocol used for the world wide network. Hence TCP/IP is the most appropriate for Internet.
It is not dependent on the physical media used for transfer of packets between sending and
receiving ends.
12.
A communication system uses an 8-bit converter at exactly the Nyquist rate for
signals with 30 kHz bandwidth. Calculate the bit-rate at the output.
Ans. Assuming the maximum frequency of speech signal is 4 kHz. Then according to Nyquist
sampling rate theorem, the sampling signal frequency should be 8 kHz. Each of this sample will
use 8 bit for its amplitude. Therefore, the bit rate needed is equal to 8 x 8 kHz or 64 kHz.
13.
What is modulation?
Ans. Modulation: It is a technique to mix data signal onto a carrier and thus modifying carrier's
characteristics for transmission in a communication network. A carrier is electromagnetic wave
that is generated at a fixed frequency. This is known as modulation. Modulation scheme could be
either analogue, frequency, or phase shift keying (PSK).
14.
What is differential phase shift keying (DPSK)? How is it achieved? Explain the
advantage of a differential phase-shift keying (DPSK) modulation over ordinary PSK.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 44
Institute for Competitive Exams
Ans. Differential phase shift keying (DPSK) is a concept in phase shift keying using which we can
transmit more than one bit per symbol under the limited bandwidth of the transmission channel.
Number of bits transmitted per symbol has 2n combinations, and we can transmit them by the
phase angle of (36072"). In 4 bit combination, signals are transmitted using same phase angle but
of a different amplitude.
In DPSK, a combination of bit can be transmitted using different phase angles and at different
amplitudes. In this way, we can transmit a number of bits but limited by the speed of modem. In
Phase shift keying, we can transmit 2 bits by the phase shift of 180°.
15.
What do you understand by the term aliasing error? What is done to limit this
error?
Ans. If the sampling rate is less than twice the highest fundamental sine wave frequency, than a
distortion known as aliasing error or fold over occurs. To remove the aliasing error the sampling
rate should be higher than or equal to twice the highest sine wave frequency i.e. if Sr is the rate of
sampling and fs the frequency of the highest frequency, then Sr = 2 x sin(2nfs)
16.
What is LAN?
Ans. LAN stands for Local Area Network. The need to create LAN arose for cost-effective
communication of data both written and oral. The term network means connecting
communication devices of many types together. The devices may be dispersed geographically at
vast distances. These devices are so connected that they may exchange data of various types
efficiently and accurately.
17.
Write short note on the following:
Ans.
(a) GSM Telephony
GSM stands for Global System for Mobile Communication Various systems have been developed
for cellular communication, but there was no standardization. This led to several incompatibility
problems. To overcome such problems, GSM standard was adopted in 1982 for cellular
communication. GSM is a globally accepted standard for digital cellular communication. It
provides the specifications, that is the function and interface requirements, but does not address
the hardware. This is done to allow buying equipments from different vendors. GSM network is
divided into the following three systems:
 Switching System (SS)
 Base Switching System (BSS)
 Operation and Support System (OSS)
(b) Cellular Radio
Cellular Radio means using a large number of low-power base stations for transmission, each
having a limited coverage area. An area is divided into a number of smaller areas, called cells. Each
of these smaller areas is served by its own low-power
radio base station. Frequency channels are allocated to these radio stations in such a way that the
channels (frequencies) used in one cell can be reused in another cell some distance away.
(c) VSAT technology
Very Small Aperture Terminals (VSATs) are tiny terminals that have 1-meter antennas and can put
out about 1 watt of power. The uplink is generally good for 19.2 kbps, but the downlink is more,
often 512 kbps. In many VSAT systems, the micro-stations do not have enough power to
communicate directly with one another. Instead, a special ground station, the hub, with a large
high gain antenna is needed to relay traffic between VSATs.
18. What are the various encoding techniques? Discuss them.
Ans. Because computers are inherently digital, most computer network use digital data
transmission. There are different coding schemes for encoding data for transmission. Broadly we
can classify them into two main encoding techniques namely:
Current-state encoding: In this coding method, data are encoded by the presence or absence of
a signal characteristic or state.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 45
Institute for Competitive Exams
State-transition encoding: State transition encoding methods differ from current-state
encoding in that they use transitions in the signal to represent data, as opposed to encoding data
by means of a particular voltage level or state.
Biphase coding: Under this coding techniques, the two types are:
(i) Manchester Code
(ii) Differential Manchester Code
19. Write a short note on Public Switched Telephone Network
Ans. The public telephone network managed by the local telco and long-distance carriers. The
Public Switched Telephone Network (PSTN) consists of a digital backbone of switched circuits
together with the analog local loop wiring still found in many residences. The PSTN is also known
as the Plain Old Telephone Service (POTS), although that term specifically relates to the older,
nondigital portion of the PSTN. The PSTN provides the most popular basis for creating wide area
networks (WANs) through both leased lines and dial-up lines between local and remote networks.
PSTN is often used in wide area networking because of its common nature-local loop connections
exist almost everywhere in the world.
20. Write the differences between Twisted-pair wire and optical fiber cable.
Ans. Difference between Twisted-pair wire and optical fiber cable is given below:
Characteristics
Twisted-Pair wire
Optical Fiber
Construction
Two insulated copper wires twisted Made up of tiny threads of glass or
together in a helical shape.
plastic
Transmission Principle Transmission of electromagnetic Transmission of optical/light energy
energy along the wires.
along the fiber.
Cost
Least expensive.
Very expensive
Bandwidth
Attenuation
Low
High
Very high
Very low
Transmission mode
Uses
Full-duplex
Half-duplex
Can be used for both analog and Used mainly
digital data.
transmission.
for
digital
data
21.
Why do you connect the wire mesh conductor of a coaxial cable to the ground?
Ans. In order to avoid the interference caused by the electromagnetic noise, we connect the wire
mesh conductor of a coaxial cable to earth or ground. The voltage induced by electromagnetic
interference (EMI) is sent to earth by grounding the outer conductor of a coaxial cable.
22. Why are the digital communication systems more resistant to channel noise
than analog systems?
Ans. Digital communication systems are more resistant to channel noise because of the following
reasons.
The detector in the digital system needs to find the presence and the absence of a pulse and
therefore even if there is noise, the detection of signal pulse is not very difficult. Moreover, noise is
not a static quantity. Sometimes, noise signal is large and sometimes small but the digital pulses
are of constant magnitude. Hence, the detection of digital pulse containing value 1 or zero becomes
easier. It is similar to the case of the sound of the whistle blown by a referee in a hockey
playground can be easily discriminated even when there is noise in the field.
23. State the advantages of semiconductor laser diode over light-emitting diodes
(LED) for fiber-optic light transmission.
Ans. Advantages of semiconductor laser diode over light-emitting diodes (LED) for fiber
transmission are the following:
 Data or bit rate is high.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 46
Institute for Competitive Exams


Light can be transmitted in single mode as well as in multimode.
The distance over which light pulses can be transmitted is about 30 km without any light
amplifier.
24. State the mechanism by which an optical pulse travelling along an optical fiber
suffers from dispersion.
Ans. As shown in Fig. 1, light that enters at the center line of the core travels in a straight line
throughout the core (as long as the core itself is straight).
Fig. 1 Light Transmission through fiber
Light entering at any other angle will eventually hit the cladding and be "bounced" down the cable.
These rays travel greater distances than the ray entering at the center of the core. The larger the
angle of incidence, the further the rays have to travel before exiting the core. As a result, the rays
emerge at different times, resulting in a phenomenon called Pulse spreading (dispersion) which
causes the replicated electrical
information to be distorted by the varying arrival times of the light rays through the cable. The
distortion is not great, but it presents a limiting factor to the length of the fiber cable and the data
rates that are propagated through it. If the length is too long, then the spreading can cause the loss
of digital bits and create data errors.
25. What are the advantages and disadvantages of single mode optical fiber over
multimode optical fiber?
Ans.
Advantages:
 Greater bandwidth.
 Smaller size of core and cladding namely 8.3 micron core and 12.5 micron cladding.
 Distortion and attenuation are very low.
Disadvantages:
 Multimode allows more light energy to enter the cable because of wider acceptance angle as
compared to single mode.
26. How does an optical detector indicates the difference between a logic 1 (highintensity light) and logic 0 (low-intensity light)?
Ans. The electron-hole generation of a photo detector varies directly with the amount of light it
senses. Thus, 1 is detected by higher light intensity and zero by low light density.
27. What is the resulting effect on the light signal due to scattering?
Ans. The effect of scattering is to attenuate the light energy as the ray
travels through the core.
28. Explain the procedure of light transmission:
Ans.
(a) Single mode fiber
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 47
Institute for Competitive Exams
Systems using laser diodes as the light-emitting sources employ single mode optical fiber. The
single mode concentrates the passage of light to the centre of the fiber core. Where the centre is
very narrow about 6 to 12 micrometres in diameter, the ray concentrates at the centre and moves
the quickest through the cable with the least distortion and attenuation (See Fig. 2 (a)).
(b) Step index multimode fiber
While the single mode fiber accepts signal light ray at a time, in a narrow diameter, the multimode
fiber allows more than one ray of light at a moment. With each ray at a slightly different angle from
the other in a wider core (See Fig. 2 (b)).
r
Fig. 2 (a) Single mode optical fiber (b) Step index multimode fiber
The first kind of multimode fiber is the step index. In the step index core, the incident ray enters
the core, is refracted slightly and travels through the core as it is reflected from one side of the
cladding to the other. The main disadvantage of this is that every time the ray strikes the cladding,
the cladding absorbs some of its energy, resulting in a slight attenuation.
29. Why circuit switching is preferred over packet switching in voice
communication?
Ans. Circuit switching is preferred over packet switching in voice
communication because of the following reasons:
The circuit switching statically reserves the required bandwidth in advance, whereas packet
switching acquires and releases it as and when bandwidth is needed.
Circuit switching is controlled by a centralized hierarchical control mechanism with global
knowledge of the network configuration.
Circuit switching is complex and completely compartmental. The sender and receiver can use any
bit rate, format or framing method they want to use.
In circuit switching, the call charges are based on the distance and the time the call is made and
not on the amount of data is transferred.
30. What are the two types of packets used in packet switching networks?
Ans. Packets come in two forms. These are:
Data Packets: Data packets contain message segment as well as sequence and routing
information.
Control Packets: Control packets are brief messages transmission requests and acceptances,
acknowledgements of data-packet receipt—that keep traffic flowing smoothly. These control
packets initiate and maintain communication.
31. Define the following terms:
Ans.
(a) Attenuation
Attenuation is the loss of signal strength when signals travel long distances along the cable or any
other media. Attenuation values for actual cables are measured in units of decibels (dB), standard
measurement value used in communication for expressing the ratio of two values of voltage,
power, or some other signal-related quantity. For example, a drop of 3 dB corresponds to a
decrease in signal strength in terms of power transmitted of 50 percent or 2:1.
(b) Distortion
Distortion refers to the corruption encountered by a signal
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 48
Institute for Competitive Exams
during transmission or processing that mutilates the signal
waveform. Distortion can be classified into three types which
are explained hereunder:
(i) Linear distortion
(ii) Non-linear distortion
(iii) Distortion due to Time-variant Multipath Channels
(c)
Noise
Noise is the random electrical interference on network cabling that is generated by networking
components such as network interface cards (NICs). It is also the one induced in cabling by
proximity to the electrical equipment that generates electromagnetic interference (EMI).
(d) SONET
SONET offers a method of interconnecting various types of fiber optic transmission systems. A
SONET system consists of switches, multiplexers, and repeaters, all connected by fiber. In SONET
terminology, a fiber going directly from any device to any other device, with nothing in between, is
called a section. A run between two multiplexers is called a line. Finally, the connection between
the source and destination is called a path. A SONET topology is often a dual ring topology.
(e)
DSL
DSL is a telecommunications technology for providing highspeed transmission to subscribers over
the existing copper wire twisted-pair local loop between the customer premises and the Telco's
central office (CO). The Digital Subscriber Line (DSL) technology was designed to provide highspeed data and video-on-demand services to subscribers at speeds much faster than Integrated
Services Digital Network (ISDN).
(f)
CDMA
CDMA is a digital cellular phone technology that uses spread spectrum wireless networking
technologies. Code Division Multiple Access (CDMA) can be used to refer both to a type of digital
cellular phone system and to the specific media access method used by this kind of cellular system.
CDMA was developed by Qualcomm in 1993, and it was adopted and ratified by the
Telecommunications Industry Association (TIA) as part of their Interim Standard 95.
(g)
FDMA
FDMA is the signal multiplexing technology used in the Advanced Mobile Phone Service (AMPS)
analog version of cellular phone technology. Frequency Division Multiple Access (FDMA) is one of
three methods used for allocating channels to users over the shared wireless communications
medium in cellular phone communication.
(h) Token Ring
Token Ring was developed by IBM as a robust, highly reliable network. In a token Ring a single
special packet called a token is passed around the network. When a computer has data to transmit,
it waits until the token is available, grabs hold of it, and transmits a data packet while
simultaneously releasing the token to the next computer in line. Then the next computer grabs the
token if it has data to transmit.
32. What do you mean by Remote Control and Remote Node?
Ans. Remote control: Remote control uses a software package such as pcAnywhere to take control
of the console of a computer remotely. Administrators generally use this method to trouble-shoot
server problems remotely. However, because the remote connection is often made through a
relatively slow analog modem, the bandwidth restriction often makes remote control access slow
and jerky. Remote control access provides high security, saves on hardware and licensing costs,
and ;s simple to implement on a network.
Remote node: Remote node uses a remote access device to provide a gateway for users to access
file, print, and other services on a company network from remote locations. Remote access
gateway devices can be computers running remote access software and connected through
multiport serial boards.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 49
Institute for Competitive Exams
33. Write short note on the following.
(a) DLC (Data link control)
(b) LCP (Link Control Protocol)
(c) PAP (Password Authentication Protocol)
(d) CHAP (Challenge Handshake Authentication Protocol)
Ans.
(a) Data Link Control
Data Link Control is related to an international standard protocol called IEEE 802.2. Many
organisations employing token ring use DLC to allow their PC workstations to talk to Mainframe
gateways. Another common use of this protocol is to use it to communicate with network printers.
The data link layer performs the following functions:
(i) To provide a well-defined service interface to the network layer, determining how the bits of the
physical layer are grouped into frames.
(ii) To deal with transmission errors and regulating the flow of frames so that slow receivers are
not bogged down by fast senders.
(b) Link Control Protocol
Link Control Protocol (LCP) operates at the data-link layer (layer 2) of the Open Systems
Interconnection (OSI) reference model for networking and is considered a data-link layer protocol.
During establishment of a PPP communication session, LCP establishes the link, configures PPP
options, and tests the quality of the line connection between the PPP client and PPP server. LCP
automatically handles encapsulation format options and varies packet sizes over PPP
communication links. LCP also negotiates the type of authentication protocol used to establish the
PPP session. Different authentication protocols are supported for satisfying the security needs of
different environments. LCP can negotiate several authentication proto-cols.
(c)
Password Authentication Protocol
PAP Transmits passwords in clear text using a two-way handshake. Password Authentication
Protocol (PAP) is not a secure form of authentication because the user's credentials are passed over
the link in unencrypted form. If the password of a remote client using PAP has been compromised,
the authentication server can be attacked using replay attacks or remote client impersonation.
(d)
Challenge Handshake Authentication Protocol Challenge Handshake Authentication
Protocol (CHAP) is one of several authentication schemes used by the Point-to-Point Protocol
(PPP). It is a serial transmission protocol for wide area network (WAN) connections. CHAP
encrypts the transmitted password, while PAP does not.
34. What are the different applications of ISDN?
Ans. Different applications of ISDN system are as follows:
Telephones with multiple buttons for instant call setup to arbitrary telephones anywhere in the
world will be available.
Another feature is that telephones will display the caller's telephone number, name, and address
on a display screen while ringing.
It allows the telephone to be connected to a computer, so that the caller's database record is
displayed on the screen as the call comes in. For example, a stockbroker could arrange to display
the caller's portfolio on the screen.
Other advanced voice services include call forwarding and conference calls worldwide.
Advanced non-voice services are remote electricity meter reading, on-line medical, burglar and
smoke alarms that automatically call the hospital, police, or fire department, respectively and give
their address to speed up response.
35. In Broadband ISDN, what is the difference between a distributive service and
interactive service?
Ans.
Broadband ISDN provides two types of services:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 50
Institute for Competitive Exams
Interactive: Interactive services are those services which need two-way transfer between either
two subscribers or between a subscriber and a service provider.
Distributive: Distributive services are of simplex communication form which are sent from a
service provider to subscribers. The subscriber does not have to transmit a request each time a
service is desired. These services can be without or with user control.
36. How is CRC superior to LRC? Explain with an example.
Ans. Longitudinal redundancy check (LRC) is basically used in asynchronous data transfer, where
there is very less probability of errors occurring in bursts. LRC is used to detect single-bit errors.
Cyclic redundancy check (CRC) is used to detect multi-bit errors as well. It is useful to employ this
method in synchronous data transfer as well as asynchronous data transfer. Hence, CRC method is
better than LRC method.
37.
Discuss difference between polling and selecting?
Ans.
Polling: When the secondary stations want to send data to the primary station, then the primary
station chooses one station out of many. This is called polling.
Selecting: When the transmitter has to send data to secondary stations/devices, then select
operation is performed by the primary station.
38. What is the mechanism of stop-and-wait Automatic Repeat Request (ARQ) flow
control?
Ans. In Stop-and-wait ARQ method of flow control, the sender after sending a frame to the
receiver waits for a small dummy frame sent by the receiver. This dummy frame sent by the
receiver indicates that whether the receiver had received the frame or not. If the receiver sends a
NAK -> negative acknowledgement, then the frame is sent again by the sender.
If the receiver does not get any response from the receiver, it then retransmits the frame after a
particular time limit. Retransmission occurs in case of lost, damaged frames and lost
acknowledgements.
A timer is used which goes off after enough time has elapsed i.e. enough time for acknowledgement
to reach the sender. When sender receives an acknowledgement, it automatically sends another
frame of data. In this way, flow control is maintained for data frame between sender and the
receiver.
39. What is the purpose of hamming code?
Ans. Hamming code is an error-correction code which includes enough redundancy bits so that
error can be corrected by receiver itself rather than asking for re-transmission of data from the
satellite transmitter.
40. Write short notes on the following:
Ans:
(a) Synchronous Data Link .Control
SDLC (Synchronous Data Link Control) Protocol is a data-link layer protocol developed in the
1970s by IBM for its Systems Network Architecture (SNA) networking environment. It is primarily
used in wide area networks (WANs) that use leased lines to connect Mainframe SNA hosts and
remote terminals.
In a serial SDLC link, data is sent as a synchronous bit stream divided into frames that contain
addressing and control information in addition to the payload of data.
SDLC uses a master/slave architecture in which one station is designated as primary (master) and
the remaining stations are secondary (slaves). The primary station establishes and tears down
SDLC connections, manages these connections, and polls each secondary station in a specific order
to determine whether any secondary station wants to transmit data.
(b) High Level Data Link Control
HDLC is a protocol to prevent aliasing error. It determines where a true message block begins and
ends and what part of the message is to be included in the CRC (Cyclic Redundancy Check). It uses
bit-stuffing for data transparency.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 51
Institute for Competitive Exams
In HDLC, all information is carried by frames that can be of the following types:
(i) Information Frames (I-frames)
(ii) Supervisory control sequences (S-frames), or unnumbered command/responses (U-frames).
41.
Explain different types of Transmission control procedures.
Ans. The following are the different transmission control procedures:
Non-procedure: Non-procedure protocols are those which do not have any laid down procedure
for connecting .two PCs together. Examples include Ethernet, Token ring, Token bus, FDDI etc.
Basic procedure: Basic Control Procedure protocols include LAPB (Link Access Procedure,
Balanced), LAPD (Link Access Procedure for D channel) and LAPM (Link Access Procedure for
Modems).
42. Differentiate between character-oriented and bit-oriented protocols.
Ans. Character-oriented Protocol: Character-oriented protocols, also called byte-oriented
protocols, interpret a transmission frame or packet as a succession of characters, each composed of
one byte (eight bits). All control information is in the form of an existing character encoding
system such as ASCII coding method.
Bit-oriented Protocols: Bit-oriented protocols interpret a transmission frame or packet as a
succession of individual bits, made meaningful by their placement in the frame and by their
neighboring bits. Control information is in the form of one or more bits.
43. Which type of services are provided by the data link layer to the network layer?
Ans. The services provided by the data link layer are of the following types:
(a) Unacknowledged connectionless service: This service has the source machine to send
independent frames to the destination machine without having the destination machine
acknowledge them.
(b) Acknowledged connectionless service: This service is more reliable than
unacknowledged connectionless service. When this service is offered, there are still no connections
used, but each frame sent is individually acknowledged.
(c) Acknowledged connection-oriented service: This is the most sophisticated service that
the data link layer can provide to the network layer. With this service, the source and destination
machines establish a connection before any data are transferred. Each frame sent over the
connection is numbered, and the data link layer guarantees that each frame sent is indeed
received. It guarantees that each frame is received exactly once and that all frames are received in
the right order.
44. What do you mean by flow control? What is the difference between hardware
flow control and software flow control.
Ans. Flow control is a set of procedures that tell the sender node how much data it can transmit
before it must wait for an acknowledgment from the receiver. The receiving device must be able to
inform the sending device before those limits are reached and request the transmitting device to
send fewer frames or stop temporarily.
Two basic types of flow controls are:
Hardware flow control: This method uses special dedicated pinning on cables to leave flow
control to the modem itself.
Software flow control: This method uses special data characters (usually Ctrl+S to stop
transmission, and Ctrl+Q to resume transmission) sent within the data stream itself. This would
enable a local modem to signal a remote modem to stop transmitting data so that the local modem
can catch up.
45. Describe the facilities provided by the Bluetooth Technology? Why it is called
Bluetooth technology?
Ans. The Bluetooth technology is the new technology for providing links between fixed devices
(such as computers and home appliances), mobile devices (such as laptops and mobile phones),
and the Internet, the link being a wireless link. Bluetooth technology is named after Harald
Bluetooth, who ruled most part of Denmark in 10th century.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 52
Institute for Competitive Exams
Bluetooth can provide consumers with the ability to do the following:
 Make calls from a wireless headset connected remotely to a cell phone.
 Eliminate cables linking computers to printers, keyboards, and the mouse.
 Hook up MP players wirelessly to other machines to download music.
 Set up home networks which remotely monitor air conditioning, the oven, and children's'
Internet surfing.
 Call home from a remote location to turn appliances on and off, set the alarm and monitor
activity.
46. Describe the protocol architecture of Bluetooth technology?
Ans. Protocol Architecture: Bluetooth is defined as a layered protocol architecture consisting of
the following types of protocols:
1. core protocols
2. cable replacement protocols
3. telephony control protocols, and
4. adopted protocols
47. What is Wireless Local Area Network (WLAN)?
Ans. Nowadays, numerous portable computing and communication devices have come up.
Portable means these can be easily moved or carried from one place to another. But, till recent
times, in order to communicate among themselves these devices need to-be connected to a wired
fixed network. However, with the use of radio signals these can be made to communicate without
wires. Such a network is known as WLAN (Wireless LAN).
48. Write short note on the Ethernet.
Ans. Ethernet is one of the most popular network architecture for local area networks (LANs).
Ethernet was originally developed by Xerox in the 1970s and was proposed as a standard by Xerox,
Digital Equipment Corporation (DEC), and Intel in 1980. A separate standardization process for
Ethernet technologies was established in 1985 in the Institute of Electrical and Electronics
Engineers (IEEE) using 802.3 standard known as Project 802. The IEEE standard was then
adopted by the International Organization for Standardization (ISO), making it a worldwide
standard for networking. Because of its simplicity and reliability, Ethernet is by far the most
popular networking architecture used today. It is available in three different speeds:
 10 Mbps, which is simply called Ethernet
 100 Mbps, which is called Fast Ethernet
49. What do you mean by routing.
Ans. Routing refers to the process of forwarding messages through internetworks of LANs. In
some cases, routing information is programmed into the routing devices. However,
preprogrammed, or static routers cannot adjust to changing network conditions. Most routing
devices therefore are dynamic, which means that they have the capability of discovering routes
through the internetwork and then storing the route information in route table. Route tables do
not store only the path information, but also store estimates of the time, cost or calculated distance
taken to send a message through a given route. This time estimate is known as the cost of a
particular path.
50. What do you mean by the term internetworking?
Ans. internetwork (internet) consists of multiple networks in which LANs are attached to other
LANs, other communications networks, remote sites, individual stations and Wide Area Networks
(WANs). It permits data to move freely among large number of networks and populations. The
goal of internetworking is universal service across heterogeneous networks.
51.
What are the reasons for using router to connect LANs?
Ans. We use router to connect LANs due to the following reasons:
 Security
 Reliability
 Performance Enhancement within the Individual Network
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 53
Institute for Competitive Exams
 Networking Range
52. What do you mean by congestion control? Write the factors
which are responsible for congestion.
Ans. When too many packets are available in the subnet the performance of the subnet may get
retarded. This situation is called congestion.
Factors Responsible for Congestion are as follows:
If routers (IMPs) are too slow to perform the various book keeping tasks required of them, namely,
queuing buffers, updating tables, etc., packets queue would build up even if there is an excess
capacity of the line.
The input traffic of the packets sent by the hosts is faster than the output delivery rate of packets
by the subnet.
53. Write the names of any four protocols in detail which are used
in network layer?
Ans. (a)
Address Resolution Protocol (ARP)
Reverse Address Resolution Protocol (RARP)
Internet Control Message Protocol (ICMP)
Internet Group Message Protocol (IGMP)
54. What is the purpose of transport layer?
Ans. The purpose of the transport layer is to bridge the gap between what the network layer offers
and what the transport user wants. It also serves to isolate the upper layers from the technology of
the network layer by providing a standardized service definition. In this way, changes in the
network technology will not require changes to software in the higher layers.
55. What do you understand by the term network security?
Ans. Due to the wide spread use of PCs and developments in networks connecting PCs to
company's mainframe computers, there has been an increase in the chances of feeding undesirable
data deliberately by outsiders. A person with a PC at a remote place can use a phone line and
illegally collect information without leaving any clues. Individual users can copy confidential data
from a company's computer or other details from a remote station connected via a network. The
collection of tools designed to protect data and thwart hackers is known as computer security.
56. What are different types of attacks carried out by hackers on
computer networks?
Ans. Attacks in a computer network can be classified into two types. These are:
(a) Passive Attack: Eavesdropping on or monitoring of transmissions is known as passive
attack. The goal of eaves-dropping is to obtain that information which is being transmitted. Passive
attacks are difficult to detect (if they occur) but they can be prevented. (b) Active Attack:
Modification of messages being transmitted, capturing authentication sequences and obtaining
extra privileges, creation of false messages etc. are a few active attacks. Active attacks are difficult
to prevent because they require protection of all communication facilities and paths at all times.
But one can detect and recover from the disruptions caused by them.
57.
Describe the role played by a firewall available for your use to
protect your PC from Internet virus.
Ans. One of the best free firewall products available is ZoneAlarm 2.0 from Zone Labs which is
available free of cost and can be downloaded from the company's site at www.zonelabs.com. It
provides protection for Internet users. Combining the safety of a dynamic firewall with total
control over applications' Internet use, Zone Alarm gives rock-solid protection against thieves and
vandals. ZoneAlarm makes ironclad Internet security easy to use. Zone Alarm protects a PC from
malicious programs, like Spyware and Trojan horses, by allowing it to control PC's Internet traffic
and how applications access the Internet.
58. What is a firewall? What characteristics do you recommend in
a firewall.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 54
Institute for Competitive Exams
Ans. Every time a corporation connects its internal computer network or LAN to the Internet, it
faces potential danger regarding security. Due to the Internet's openness, every corporate network
connected to it is vulnerable to attack. Crackers on the Internet could break into the corporate
network and do harm in a number of ways. The solution for this type of problems and many other
type of virus attack problems is to build 'firewalls' to protect the networks. These firewalls allow
anyone on the corporate network to access the Internet, but they stop crackers, hackers or others
mischief doers on the Internet from gaining access to the corporate network and causing damage.
Following characteristics are recommended in a good firewall: (a) The firewall should be able to
support a "deny all services except those specifically permitted" design policy, even if that is not
the policy used.
The firewall should be flexible. It should be able to accommodate new services and needs if the
security policy of the organization warrants so.
The firewall should contain advanced authentication measures.
The firewall should employ filtering techniques to permit or to deny services to specified host
systems as and when needed.
The firewall should use proxy services for FTP and TELNET, so that advanced authentication
measures can be employed and centralized. If services such as gopher or HTTP are required, the
firewall should contain the corresponding proxy services.
The firewall should accommodate public access to the site, such that public information servers
can be protected by the firewall but can be segregated from site systems that do not require the
public access.
The firewall should contain mechanisms for logging traffic and suspicious activity, and should
contain mechanisms for log reduction so that logs are readable and understandable.
(h) If the firewall requires an operating system such as Unix, a secured version of the operating
system should be part of the firewall.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 55
Institute for Competitive Exams
Data Communication and Computer Networking
I. Multiple Choice Questions Set 1
1. In simplex mode of transmission
a. Data transmission is one way
b. Data transmitted to small distances only
c. Data format is simple
d. none of these
2. In digital data transmission
a. Baud rate is always smaller or equal to the bit rate b. Baud rate is equal to bit rate
c. Baud rate is always higher than the bit rate
d. none of these
3. A digital channel implies that the channel
a. is digitized
b. is carrying digital data
c. adopts digital modulation techniques
d. is without carrier
4. An example of half duplex transmission is
a. referee's whistle
b. satellite channel
c. broadcast radio
d. none of these
5. In half-duplex data transmission
a. Data can be transmitted in one direction only
b. Data can be transmitted in both directions
c. Data can be transmitted in both directions simultaneously
d. none of these
6. The information to be communicated in a communication system is the _____
a. medium
b. protocol
c. message
d. none of these
7. Networks are judged by
a. security
b. reliability
c. performance
d. all of the
above
8. Computers in a computer network are connected by
a. telephone line only
b. satellite channel only
c. either telephone line or satellite channel
d. none of these
9. In _____ transmission, a start bit and a stop bit form a character byte.
a. asynchronous
b. synchronous
c. parallel
d. none of these
10. Communication system is a combination of
a. hardware
b. software
c. data transfer links
d. all of the
above
II. Fill In the Blanks out of the following:
a. full duplex
b. small
c. secure
d. demodulation
e. necessary
f. end
g. simplex
h. start
i. half-duplex
j. same
k. CRC
l. 20
1. The cost of conveying messages, pictures or voice over a large distance in a communication
system should be _____
2. In any good communication system, the message should be safe and _____. It should reach to
the person for whom it is meant.
3. Sending a message and receiving a response has always been _____ for the proper functioning
of a business or administration.
4. Synchronous transmission is almost _____% more efficient than asynchronous transmission.
5. One disadvantage of telephone is that both the sender and the receiver of the message should be
available at the _____ time and should speak the same language to understand message.
6. Each asynchronous character is preceded by a _____ bit and followed by one stop bit.
7. _____ transmission means that data flows in both directions simultaneously.
8. A television broadcast is an example of _____ transmission.
9. The process that converts digital signal to its analog form at the destination is called _____.
10. _____ is used to check the accuracy of digital transmission.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 56
Institute for Competitive Exams
Answers
I.
1. a
2. a
3. b
4. b 5. b
6. c
7. d
8. c
9. a 10. d
II.
1. b
2. c
3. e
4. l
5. j
6. h
7. a
8. g
9. d 10. k
I. Multiple Choice Questions SET 2
1. Which of the following is not a bounded media of transmission of RF energy.
a. UTP
b. STP
c. Laser beam
d. Fiber optic
2. Frequency range of human voice and audible to human ears is usually in the range of:
a. 200 KHz to 600 KHz
b. 400 Hz to 3.4 KHz
c. 100 MHz to 400 MHz d. none of these
3. Fiber optic communication system uses:
a. simplex transmission
b. full-duplex
c. both (a) and (b)
d. none of these
4. The velocity of transmission of energy in free space is given by the following formula where f is
the frequency, λ is the wave length and c is the velocity of transmission of the wave.
a. c = f λ
b. c = f / λ
c. c = f λ
d. none of these
5. In satellite communication, up-link frequency and down-link frequencies are different because:
a. by this method, interference can be avoided.
b. by this method, full duplex operation can be carried out.
c. this is the usual convention in satellite communication.
d. none of these.
6. Transmission media are usually categorized as
a. fixed or unfixed
b. guided or unguided
c. determinate or indeterminate
d. none of these
7. In fiber optics, the signal source is
a. radio
b. light
c. microwave frequency
d. very low frequency
8. Which of the following is not a guided medium?
a. twisted-pair cable
b. coaxial cable
c. fiber-optic cable
d. atmosphere
9. The inner core of an optical fiber is
in composition.
a. glass or plastic
b. copper
c. bimetallic
d. liquid
10. Co-axial cables are widely used in
a. telephone networks
b. cable TV networks
c. both a and b
d. computer networks
II. Fill in the Blanks out of the following:
a. base band
b. analog
c. cross talk
d. reducing
e. higher
f. single-mode
g. UTP
h. multi-mode
i. increase
j. broadband
k. cladding
l. fiber-optic cable
m. high bandwidth
1. The purpose of twisting the wires is to _____ the efficiency of the UTP by reducing the
electromagnetic interference from similar pairs close by.
2. STP and _____ can be used for both analog and digital data transmission.
3. Higher the bandwidth, _____ is the efficiency response in a stereo system.
4. Teflon insulation in twisted pair cable results in less _____ and better quality signal over longer
distance, making it suitable for high-speed computer communication.
5. Baseband networks use the entire bandwidth of the cable for a single channel. _____ is
basically a frequency division multiplexed situation.
6. Intermodal dispersion is absent in _____ fibers.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 57
Institute for Competitive Exams
7. _____ fiber suffers from high signal dispersion.
8. An optical signal travels through the fiber waveguide by total internal reflection at the core to
_____ interface.
9. In _____, the bandwidth is highest.
10. The advantage of optical fiber is _____.
Answers
I.
1. c
2. b
3. c
4. a 5. a
6. b
7b
8. d
9. a 10. c
II.
1. i
2. g
3. e
4. c 5. j
6. f
7. h
8. k
9. l
10. m
I. Multiple Choice Questions SET 3
1. Indicate which of the following is an advantage of frequency modulation (FM) over amplitude
modulation (AM):
a. Better noise immunity
b. Lower bandwidth is provided
c. Less modulated power is required
d. The transmitted power is more useful
2. The ground wave eventually disappears as one moves away from the transmitter because of
a. Interference from the sky above
b. Loss of line-of-sight condition
c. Attenuation of energy by the ground
d. Maximum single-hop distance limitation
3. Microwave links are generally preferred to coaxial cable for television transmission because
a. they have less overall phase distortion
b. they are cheaper
c. of their greater bandwidths
d. of their relative immunity to impulse
noise
4. Indicate the true statement. Modulation is used to
a. reduce the bandwidth
b. separate differing transmission
c. insure that intelligence may be transmitted over long distances
d. allow the use of practicable antennas
5. Full duplex operation
a. requires two pairs of cables
b. can transfer data in both directions at
once
c. requires modems at both ends
d. all of the above
6. The following medium does not use metallic conductor for transmission
a. twisted pair
b. optical fiber
c. none of these
d. coaxial cable
7. The modulation technique used for the high speed data modem is
a. QPSK
b. FSK
c. DPSK
d. ASK
8. A balanced modulator can be used to generate
a. PSK
b. FSK
c. DPSK
d. none of these
9. For carrying digital data over long distance using digital signal, at appropriately spaced points,
we must have
a. amplifiers
b. repeater
c. amplifiers or repeater d. none of these
10. When useful bandwidth of medium exceeds the required bandwidth of signals to be
transmitted we use
a. frequency division multiplexing
b. time division multiplexing
c. statistical time division multiplexing
d. none of these
II. Fill in the Blanks out of the following:
a. capacity
b. 2w
c. w
d. asynchronous
e. lesser
f. much higher
9
g. synchronous
h. 10
i. 1014
j. DPSK
k. communication
l. transmitter
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 58
Institute for Competitive Exams
1. Nyquist result states that if the rate of signal transmission is 2w, then signal with frequencies no
greater than _____ is sufficient to carry the signal.
2. To synchronize receiver and transmitter, besides synchronous transmission, the other approach
is _____ transmission.
3. In optical fiber transmission there exists _____ repeater spacing.
4. In amplitude shift keying (ASK), as compared to frequency shift keying (FSK) and phase shift
keying (PSK), the resulting signal occupies a _____ bandwidth.
5. A satellite link introduces larger _____.
6. _____ transmission is more appropriate for high speed communication.
7. Start and stop bits are required in asynchronous _____.
8. Order of frequencies used in satellite communication is _____.
9. Fiber optic communication uses order of _____ frequencies.
10. Phase sent for a particular bit is dependent on the previous bit in _____.
Answers
I.
1. a
2. c
3. c
4. c 5. d
6. c
7. a
8. a
9. c 10. a
II.
1. c
2. d
3. f
4. e 5. a
6. g
7. d
8. h
9. i
10. j
I. Multiple Choice Questions Set 4
1. Sharing of medium and its path is known as
a. encoding
b. multiplexing
c. modulation
d. line discipline
2. Which multiplexing technique is used to transmit digital signals?
a. FDM (Frequency Division Multiplexing)
b. CDM (Code Division Multiplexing)
c. TDM (Time Division Multiplexing)
d. None of these
3. In long-distance data transmission system, .the most preferable mode of communication is:
a. Serial transmission
b. Parallel transmission
c. Either serial or parallel transmission d. none of these
4. Which multiplexing technique is used to transmit analog signals?
a. FDM
b. synchronous TDM
c. either (a) or (b)
d. none of these
5. Multiplexing involves
a. one path and one channel
b. multiple paths and one channel
c. multiple paths and multiple channels d. one path and multiple channels
6. Signals that involve human communication are generally
a. Digital
b. Analog
c. Either analog or digital d. none of these
7. Which one of the following is a guided transmission line?
a. Pair of wires
b. Optical fiber cable
c. Coaxial cable
d. All of the above
8. During transmission, the distortion of the signal depends on:
a. The duration of transmission
b. Frequency of the signal
c. Both (a) and (b)
d. None of these
9. The sampling interval of a telephone voice signal is:
a. 125 x 10-6 sec
b. 50 x 10-6 sec
c. 100 x l0-6 sec
d. 25 x l0-6 sec
10. In a telephone channel, voice signals are band limited to:
a. 1 kHz
b. 4 kHz
c. 8 kHz
d. 20 kHz
II. Fill in the Blanks out of the following:
a. channel
b. single mode
c. Synchronization
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 59
Institute for Competitive Exams
d. Frequency shift
e. CRC f. concentrators keying
g. quantization
h. demultiplexer
i. 256 error
j. STATDM
k. asynchronization
l. quantization
m. detection
n. compression
o. circuit
1. Statistical multiplexers may also be classed as
2. multiplexing avoids wastage of time slots.
3. The approximate round trip delay in satellite communication is ___________ msec.
4.__________ separates a stream of signals into its component transmissions.
5. The difference between the decoded signal and the original signal is referred to as the
__________.
6. A portion of a path that carries a transmission between a pair of devices is known as a
__________.
7. In a time division multiplexed signal, the total data rate exceeds the sum of the data rates of the
individual channels because of the inclusion of __________ bits.
8. The _____________ process in a PCM modulator introduces an error in the original signal
and the final demodulated signal.
9. _______________ allows data to be transmitted using a smaller band width, and higher data
bit rate/sec.
10. parity bit is used for error ___________
Answers
I.
1. b 2. c 3. a 4. c 5. d 6. b 7. d 8. c 9. a 10. b
II.
1. f 2. i 3. i 4. h 5. g 6. a 7. c 8. 1 9. n 10. m
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 60
Institute for Competitive Exams
Business Systems
1. What do you mean by computerized business system?
Ans. A computerized business system is a set of manual and/or computerized components for
gathering, storing and processing business data and for converting such data into useful, decision
oriented information.
2. Distinguish between an algorithm and pseudocode?
Ans. An algorithm is a set of instructions which describes the steps to be followed to carry out an
activity. It is called an algorithm or procedure for solving a problem. If the algorithm is written in
the computer’s programming language then such a set of instructions is known as a program.
Pseudocode is an abbreviated form of expression that makes us of both the English language and
certain programming language control words such as IF - THEN - ELSE as well as END IF. The
user describes in plain English language, the sequence of steps necessary to solve a particular
problem. Sentences are generally written one per line. Indentation is used in the IF statement to
outline which actions are to be taken when a condition is true and which are to be taken if the
condition is not true.
3. What are the basic tasks performed by Business data processing?
Ans. Business data processing uses electronic machines for fast and accurate manipulation of
data. The main purpose of business data processing is to do complex jobs of processing at
incredible speed. A business processing cycle consists of three basic steps. These are:
(a) Input cycle
(b) Processing cycle
(c) Output cycle or Managing output
4. Discuss of the following:
Ans.
(a) FIFO (First in First Out)
FIFO assumes that the materials purchased are issued in strict chronological order i.e. whatever is
received first is consumed first. This method ensures that the materials are issued at actual cost
and the stocks are valued as per the latest price paid. The operations are simple, so long as
fluctuation in price is not much. If the prices are fluctuating, then every batch of production will
have different materials cost and comparison between batches will become meaningless.
(b) Real-time processing
Real-time means immediate response from the computer. A system in which a transaction accesses
and updates a file quickly enough to affect the original decision making is called a real-time
system.
(c) Data, Record and File
Data: A collection of facts in raw form that become information after proper organization or
processing.
Record: The collection of related fields is called a record.
File: A collection of similar records that are used together is called a file or a table.
(d) Passing parameters by value
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 61
Institute for Competitive Exams
Passing parameters by value means that a copy of the argument is passed to the function. The
function can change the value of this copy but cannot change the original value of the argument in
the calling function.
5. What do you mean by procedural programming?
Ans. Procedural programming is based on the different set of procedures laid down. In the
procedural programming, all the returning sequences of statements are placed in a main program.
A procedure call is used to invoke the procedure or subroutine. After the execution of statements,
flow of control return just after the position where the call was made. In procedural programming,
the main program is responsible to pass data to the individual subroutines or procedures, the data
is processed by the procedures and after the execution of whole program, the resulting data is
presented to the main program.
6. What is the meaning of Financial Reporting?
Ans. Financial reporting refers to general purpose external financial reporting by business
enterprises. As such, financial reporting includes not only financial statements but also other
means of communicating information that relates directly or indirectly to the information
provided by the accounting system, i.e. information about an enterprise’s resources, obligations,
earnings etc. Managements may communicate information to those outside the enterprise by
means of financial reporting other than formal financial statements.
7. What do you mean by source data? What are their types?
Ans. Source data are the original data that are handwritten or printed on a source document or
typed into the computer system from a keyboard or terminal. It can be of the following two types:
(a) Raw Data: Raw data are those that have not been processed or manipulated. For example, a
number such as 40 is a raw fact. When it is manipulated by saying that the age of Mr. X is 40, it
becomes information. Hence, raw data are not of much use.
(b) Derived Data: Derived data are the data values that are obtained from the values of various
other data items by using a specified algorithm.
8. What is the difference between master file and transaction file?
Ans.
Master File:
A master file contains records of relatively permanent nature. For example, the name, address, roll
number, sex, and date of birth of a student would appear on his master record. Similarly, name,
address, and credit information would appear on the master record of a customer master file.
Transaction File:
A transaction file is a file in which the current data are stored for subsequent processing usually in
combination with a master file. For example, a transaction file may contain the roll number of the
student whose home address has recent changed. This file will be used to update the record of the
student whose roll number in master file matches with the transaction file record. The records of
the master file will thus be updated at regular intervals that may be a month or a week.
9. Differentiate between batch processing, on-line and real-time processing.
Ans.
Batch Processing:
In a batch processing, each user prepares his program data file off-line and submits it to the
computer centre. A computer operator collects the programs and data which have been stored on
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 62
Institute for Competitive Exams
tapes or CDs and stacks one program or job on top of another. When a batch of programs have
been collected, the operator loads this batch of programs into the computer at one time where they
are executed one after another. Finally, the operator retrieves the printed outputs of all these jobs
and returns them to the concerned users.
On-line Processing:
On-line processing permits transaction data to be fed directly into secondary on-line storage
devices. These data may be keyed in by the use of a typewriter like terminal. The CPU can make
programmed input control checks during this process. Using these input data items, appropriate
records may be quickly updated. The access to, and retrieval of, any record is quick and direct.
Information contained in any record is accessible to the user without the necessity of a sequential
search of the file and within a fraction of a second after the enquiry message has been transmitted.
Real-time Processing:
Real-time means immediate response from the computer. A system in which a transaction accesses
and updates a file quickly enough to effect the original decision making is called a real-time
system. The essential feature is that the input data must be processed quickly enough so that
further action can then be promptly taken on these results.
10. Distinguish between indexed and relative file.
Ans.
Indexed File:
An indexed file is one that has an index for looking up locations of records on a disk. This index
enables the user to access a disk file randomly.
Relative File:
A relative file does not use an index to access records randomly. Rather, the key field of each
record is used to calculate the record’s relative location in the file stored on the disk.
11. Write the difference between testing and debugging.
Ans. Testing is the process of confirming whether a program will successfully do all the jobs for
which it has been designed under the specified constraints. For testing a program, different sets of
data are fed as input to that program to test the different paths in the program logic.
Even after taking full care in program design, some errors may remain in the program because the
designer might have never thought about a particular case. These errors are detected only when we
start executing the program on a computer. Such type of program errors are called bugs and the
process of removing these errors is known as debugging.
12. Write the characteristics that any program should possess.
Ans. Programming style should have the following three important qualities:
(a) Readability: You should write the source code or the program in high level language so that it
is readable to you and to others. This includes aesthetic formatting, meaningful variables names
and consistency within and across the source files.
(b) Portability: Write the code using high level language so that it is easy to transfer the program
to other machines as well. If possible, avoid nonstandard features and also use the standard library
runtime routines rather than writing your own and thus save time.
(c) Maintainability: As you write the program, think about how you might want to change or
extend it in future. For example, put -data structure definitions in header files where changes will
automatically broadcast to all source files that include the header file.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 63
Institute for Competitive Exams
13. What are the basic operations which are performed on any data file?
Ans. The following are the basic operations performed on data files.
(a) Inputting or Writing to a file
(b) Outputting from a file or Reading a file
(c) I/O and Deleting a file
14. What are the types of programming errors?
Ans. Once a. program has been typed in, different types of errors may show up. These include:
(a) Syntax/Semantic Errors: Syntax is a set of rules governing the structure of and
relationship between symbols, words and phrases in a language statement. A syntax error occurs
when a program cannot understand the command that has been entered.
(b) Logic errors: Logic refers to a sequence of operations performed by a software or hardware.
Software logic or program logic is the sequence of instructions in a program. Logical errors are the
errors that have been entered in the instructions created because of the mistake made by a
programmer.
(c) Runtime errors: Runtime error occurs when a program is run on the computer and the
results are not achieved due to some misinterpretation of a particular instruction. This could be
some thing like dividing a number by zero which results in a very large value of quotient.
15. What do you mean by file updation?
Ans. Updation is the process of modifying a master file with current information according to a
specified procedure.
I. Multiple Choice Questions SET 1
1. A computerized business information system includes
a. Hardware
b. Software
c. Data facts
d. All of the
above
2. The operation carried out on an input data for checking its correctness and acceptability is
termed as
a. Validation
b. Verification
c. Moderation
d. None of these
3. System design specifications do not include
a. Blueprint showing the layout of hardware
b. Output requirements
c. Input and storage requirements
d. Includes all of the above
4. Which of the following is a transaction file?
a. Voucher files
b. Invoice files
c. Purchase order file
d. All of the
above
5. A typical computerized business application system will have
a. A master file only
b. A transaction file only
c. Both master and transaction file
d. None of these
5. A Pseudo code is
a. A machine-level code
b. Structured English to communicate the logic of a program
c. A random number
d. None of these
7. Which step is taken first in designing a program?
a. Data validation
b. Input design
c. Task analysis
d. Problem identification
8. The accounting equation is
a. Total liabilities = Total assets + capital
b. Total assets = Total liabilities + capital
c. Total liabilities = Total assets + total expenses
d. None of these
9. A data source is made up of
a. the text that changes with each version of a merged document.
b. the graphics that change with each version of a merged document.
c. both text and graphics that change with each version of a merged document.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 64
Institute for Competitive Exams
d. none of these
10. EOQ is used in
a. Purchase
b. Purchase and sales
c. Sales
d. None of these
II. Fill in the Blanks out of the following:
a. random
b. syntax
c. AVG
d. X
e. free f. decision
g. related
h. book keeping
i. embed
j. Table
k. delete
l. top down
1. A design approach where the main program is decomposed into progressively lower level
module is called _____.
2. A diamond indicates a _____ symbol.
3. Data stored on disks can be accessed in either a direct or _____ way.
4. _____ error occurs when there is a violation in any of the rules of language.
5. _____ is an aggregate function in SQL.
6. Files is a collection of _____ data.
7. Table not associated with database is called _____ table.
8. The procedure of recording and summarizing the business transactions is known as _____.
9. _____ is the fundamental structure of a relational data base management system.
10. _____ is to insert an object, which is not linked on its originating document, into a destination
document.
Answers
I.
1. d
2. b
3. a
4. c 5. c
6. b
7. d
8. b
9. c 10. d
II.
1. l
2. f
3. a
4. b 5. c
6. g
7. e
8. h
9. j
10. i
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 65
Institute for Competitive Exams
I. Multiple Choice Questions SET 2
1. An efficient sales analysis system should be
a. On-line processing system
b. Batch mode
processing system
c. Real time processing system
d. All the above
2. Payroll system should necessarily have provision for
a. ensuring that duplicate payslips are not generated for an employee in a given month
b. arrears are paid to the employees in timely manner
c. integrating the employee Provident Fund (PF) contribution with the PF system
d. all the above
3. Employees details is
a. a master file for the payroll system
b. a replica of the monthly payslip
c. not related to the payroll system
d. none of these
4. The lowest level of management concerns with
a. operational information
b. tactical information
c. long term planning
d. strategic information
5. A typical commercial application would have
a. a master file and a transaction file
b. a master file but may not have transaction
file
c. a transaction file but may not have a master file
d. none of these
6. A fast moving item can be characterized by
a. large number of issues b. large number of receipts c. both (a) and (b)
d. None of these
7. ABC analysis is used in
a. Financial control
b. Inventory control
c. Stores accounting
d. None of these
8. The pay period processing stage does not include:
a. Printing payroll cheques
b. Backing up the employee master file
c. Editing time card information
d. None of these
9. Overtime analysis is
a. useful for formulating personnel policies
b. derived from the payroll system
c. both of the above
d. none of these
10. The approach used in top-down analysis and design is
a. to identify the top-level functions by combining many smaller components into a single entity
b. to identify a top-level function and then create a hierarchy of lower-level modules and
components
c. to prepare flowchart after programming has been completed
d. none of these
II. Fill in the Blanks out of the following:
a. One
b. Data Structure
c. Key fields
d. Centralized
e. Software
f. graphic object
g. Transaction
h. Dummy
i. Top down
j. Validation
k. Database
l. Bottom up
1. The process of ascertaining logical conformity of data to certain prescribed characteristics is
_____.
2. A special field can be placed in a _____ record at the end of a file to indicate that all valid
records have been processed.
3. Each module of a structured program should have _____ entry point.
4. A database management system is essentially a specialized type of _____ package.
5. Logical organization of data in a file is also called _____.
6. The approach towards program design in which main program is decomposed into progressively
lower level modules is called _____.
7. Computerized Railway Reservation System is an example of _____ data processing system.
8. The fields within a logical record on which files are sorted are called _____.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 66
Institute for Competitive Exams
9. _____ are lines and boxes that you draw to enhance a report.
10. A _____ file is used to update a master file.
Answers
I.
1. a
2. d
3. a
4. a 5. a
6. c
7. d
8. c
9. c 10. b
II.
1. j
2. h
3. a
4. e 5. b
6. I
7. d
8. c
9. f
10. g
I. Multiple Choice Questions SET 3
1. Which of the following is true about a disk file where WRITE statement will always place a
record in the next physical position.
a. Sequential file
b. Relative file
c. Indexed file
d. None of these
2. Which of the following does not constitute a master file in a store system?
a. Material issue file
b. Material receipt file
c. Purchase order file
d. All of these
3. A sequential file organization is most suited for
a. Airline reservation system
b. A library management system
c. A payroll system
d. None of these
4. Ageing analysis is integral to which of the following?
a. Personal management b. Oil drilling
c. Inventory management d. None of these
5. The most efficient and well designed computerized payroll system would be
a. On-line real time system b. Batch processing system c. Both (a) and (b) above d. None of these
6. Which of the following appropriately explains the desirable characteristic of good system
design?
a. Modular approach
b. Proper documentation
c. Either (a) or (b)
d. Both (a) and (b)
7. A flowchart is a
a. method of programming
b. usually difficult to understand
c. a method of displaying the solution to a problem in simple steps
d. none of these
8. Edit checks and controls are built into a computer based system to
a. Ensure that the transcription errors do not corrupt the result
b. Duplicate data does not enter into the computer system
c. Avoid transposition errors
d. All of the above
9. Edit checks and controls are built into the computer based system to
a. Ensure that the transcription errors do not corrupt the result.
b. Duplicate data does not enter into the computer system
c. Avoid transposition errors
d. All of the above
10. Check lists are generated by the computer programs to
a. Check manually the input data fed into the computer against input forms data
b. Form part of the computerized processing stage
c. Serve as aid to the management control and monitoring
d. None of these
II. Fill in the Blanks out of the following:
a. sequential
b. Decision
c. Pseudocode symbol
d. key
e. Syntax
f. Updation
g. Buffer
h. Flowchart
i. random
j. Structured programming k. program documentation l. top down
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 67
Institute for Competitive Exams
1. A unique identifying value that is found in every record in a file is called a record _____.
2. The memory space which is set up to transfer records to and from a file is called a _____.
3. ___ describes a program segment written in ordinary language and not a programming
language.
4. An index file essentially a _____ file.
5. _____ is the graphical representation of an algorithm.
6. The formal rules governing the construction of valid statements in a language are called _____.
7. _____ is a symbol in flowchart, which indicates at which point decision has to be made.
8. _____ is a process of modifying a master with current information.
9. _____diminishes the efficiency of coding of the programs.
10. In _____ it is incorrect to include a system flowchart.
Answers
I.
1. a
2. d
3. c
4. c 5. a
6. d
7. c
8. d
9. d 10. a
II.
1. d
2. g
3. b
4. a 5. h
6. e
7. c
8. f
9. j
10. k
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 68
Institute for Competitive Exams
Database Management System and Oracle Queries
1.
What is the difference between file processing system and Database system?
Ans. In file processing system, the operating system stores permanent records in various files.
Application programs are needed to extract records from, and add records to the appropriate files.
As time passes, new files and corresponding application programs are added to the system.
In database system, there exists a collection of interrelated files and a set of application programs
to access and modify these files. Details of data storage and maintenance are hidden from the
users. Change made in any record is included in all the related files in database system which is not
the case in file processing system.
2.
Why do you need recovery routines using log?
Ans. Log is a document in DBMS used for recording database modifications. Logging means
recording all the update activities in a database. Log records the value of data item both prior to
the update operation and the new value of data item after the update operation. This allows us to
undo a modification that has already been applied on a database. We can undo it by using the old
values recorded in the log. Hence, recovery routines need to use logs in order to recover data from
failures.
3.
What are statistical databases?
Statistical databases are such databases which store confidential information about users or
organizations. Examples, include database storing medical records, income of individuals, etc.
4.
What do you mean by normalization of data? What are its advantages?
Ans. Normalization is the process of reducing the redundancy of data in a relational database.
Advantages
Normalization reduces the unnecessary redundant data.
Data integrity is easily maintained within the database.
Normalization makes database and application design processes much more flexible.
5.
What is a key? Explain the types of keys.
Ans.
(a) Super Key
A Super Key for ah entity is a set of one or more attributes whose combined values uniquely
identifies the entity in the entity set.
(b) Primary Key
The Primary Key uniquely identifies each record in a table and must never be the same for two
records. For example, emp_code can be primary key for the entity set Employees.
(c)
Candidate Key
A Candidate Key is an attribute or set of attributes that uniquely identifies a record. These
attributes or combinations of attributes are called candidate keys. In such a case, one of the
candidate key is chosen to be a primary key. The remaining candidate keys are called Alternate
keys.
(d) Composite Key
In many cases, as we design a database, we will have tables that will use more than one column as
part of the primary key. These are called Composite Keys or (concatenated keys). In other words,
when a record cannot be uniquely identified by a single field, in such cases a composite key is used:
A composite key is a group of fields that are combined together to uniquely identify a record. For
example, passenger's name and father's name.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 69
Institute for Competitive Exams
(e)
Secondary Key
Secondary Key is an attribute or combination of attributes that may not be a candidate key but
classifies the entity set on a particular characteristic. For example, the entity set EMPLOYEE
having the attribute Department, which identifies by its value which means all instances of
EMPLOYEE who belong to a given department.
(f)
Foreign Key
In a relation, the column whose data values correspond to the values of a key column in another
relation is called a Foreign KeyNOTE: In a relational database, the foreign key of a relation may be the primary key of another
relation.
6.
Define attribute. Explain difference between single valued attributes and
multivalued attributes.
Ans. The various kinds of data that describe an entity are known as its attributes.
Single valued attributes have a unique value for a particular entity. For example Age is a single
valued attribute of an employee entity.
Multivalued attributes may have upper and lower limits on the number of values for an individual
entity. For example, the colour attribute of a car may have between one to seven values, if we
assume that car can be painted have at most in seven colours.
7.
What is the difference between generalization and specialization?
Ans. Generalization proceeds from the recognition that a number of entity sets share some
common features which are described by the same attributes and participate in the same
relationship sets. On the basis of their commonalities, generalization synthesizes these entity sets
into a single, higher level entity set.
Specialization stems from a single entity set. Specialization emphasizes differences among entities
within the set by creating distinct lower-level entity sets. These lower-level entity sets may have
attributes, or may participate in relationships, that do not apply to all entities in the higher-level
entity set.
8.
What is a transaction? How transaction can be terminated?
Ans. The updation, insertion or deletion operations require a number of distinct tasks or steps to
be performed by the DBMS. Such a collection of tasks or steps for execution of a single database
operation (like insertion, updation, deletion, etc.) is called a Transaction.
A transaction can be terminated in three ways. These are:
Suicidal Termination: The transaction detects an error while processing and decides to terminate
by performing a rollback operation.
Murderous Termination: The Database Management Software or the operating system can force
the transaction to be terminated due to some specified reasons.
Successful Termination: The transaction is terminated after executing it successfully.
9.
Who is DBA?
Ans. The person who is responsible for the operation and maintenance of DBMS is called
Database administrator or DBA in short.
10. Explain Multivalued dependency and join dependency.
Ans. Functional dependencies rule out certain tuples from being in a relation. If A —> B, then we
cannot have two tuples with the same A value but different B values. Multivalued dependencies, on
the other hand, do not rule out the existence of certain tuples, which have multiple dependencies.
Instead, they require that other tuples of a certain form be present in the relation.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 70
Institute for Competitive Exams
Join dependency is a constraint, similar to a Functional Dependency or a Multivalued
Dependency. It is satisfied if and only if the relation concerned is the join of certain number of
projections. And therefore, such a constraint is called a join Dependency.
11.
Explain the following:
Ans.
(a)
Entity Integrity
"If an attribute of a table is of prime attribute (unique identifier),
it can not accept null values, or in other words, no component of a primary key1 values may be
null".
Entity Integrity ensures that instances of the entities are distinguishable and thus no prime
attribute (component of a primary key) value may be null.
(b) Full Functional Dependency
When all non-key attributes are dependent on the key attribute (such as name, roll_no), it is called
full functional dependency.
(c)
Referential Integrity
To ensure that a value which appears in one relation for a given set of attributes will also appear
for certain set of attributes in another relation. This condition is called as referential integrity.
12.
What are the basic components of a DBMS?
Ans. The basic components of a DBMS are:
Database Engine
Data Dictionary
Query Processor
Security and Other Utilities.
13.
Define the following:
Ans.
(a)
Metadata
Metadata are data that describe the database structure, constraints, applications and
authorizations.
(b) Data Independence
Data independence is the property of a database management system (DBMS) that enables data to
be processed independently of access mode, storage method, or arrangement of data.
(c)
Query Processor
Query processor is a functional component of database management system whose function is to
break down DML (Data Manipulation Language) statements into instructions
understood by the DBMS and which helps the database system to access data.
(d) Data Manager
Data manager is the component of the database management system whose function is to provide
access to data, perform or monitor the storage of data and control input/output operations.
(e)
External View
External view deals with user-oriented representation of information visible at the outer interfaces
of an information processing system.
14.
Explain the difference between base relations and derived relations.
Ans. Base relations are those relations that are created prior to their use. They are also called
'tables' and they exist as physical files. Derived relations are those relations which are derived or
brought out from a base relation. They do not exist as physical files. These are also called as views.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 71
Institute for Competitive Exams
15.
How can we avoid deadlock in DBMS operations?
Ans. Deadlocks can be avoided by any of the following ways:
Lock all the required data items at the beginning of a transaction.
All data items are assigned an order. A transaction can only request locks in the given order say
ascending order.
Another method is to make run time decisions about what a transaction must do if it detects that it
has to wait for a data item. For this, each transaction is assigned a unique timestamp. The system
uses these timestamps to decide whether it should wait for the data item, abort or rollback the
transaction.
16.
What do you understand by the term concurrency?
Ans. Most of today's DBMS allow multiple users to access a database at the same time. This is
referred to as concurrency or concurrent access to database. The DBMS must include concurrency
control software to ensure that several users trying to update the same data item do so in a
controlled manner so that the results of the updates are correct.
17.
Discuss the two-phase locking protocol.
Ans. In two-phase locking protocol, locks on all the required data items must be acquired before
the first unlock operation. Such a transaction can be divided into two phases, namely:
expanding or growing phase during which the number of locks being acquired goes on increasing
shrinking or contracting phase, during which the existing locks can be released but no new locks
can be acquired. That is during the shrinking phase, the number of locks acquired goes on
decreasing.
18.
What are the different states a transaction can be in?
Ans. A transaction can be in one of the following states:
Active: A transaction is in Active state, after it has started execution.
Partially committed: A transaction is in Partially committed state, after the final statement has
been executed.
Aborted: A transaction is in Aborted state, after the transaction has been rolled back.
Failed: A transaction is in Failed state, after the discovery that normal execution of the transaction
cannot be carried out.
Committed: A transaction is in Committed state, after it was completed successfully.
19.
What is buffer memory?
Ans. The buffer is a small portion of the primary memory. The data item which is to be modified is
first copied into the buffer memory. After applying changes, the data item is written back to the
permanent storage. The part of the database which is responsible for managing these buffers is
called the buffer manager.
20. Differentiate clearly between privacy, security, correctness and integrity of a
database.
Ans. Privacy refers to the ethical and legal rights which all individuals have regarding the secrecy
and use of their personal information collected by agencies like Insurance Co. Security refers to the
protection of information contained in the database against unauthorized access, modification or
destruction.
Correctness refers to the absence of errors in the information stored in a database.
Integrity refers to the maintenance of database consistency in the presence of user modifications.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 72
Institute for Competitive Exams
21.
What is DML? What are the two types of DML?
Ans. DML stands for Data Manipulation Language. DML is a language that enables a user to
access or manipulate data as organised by the appropriate data model. The two types of DML are:
Procedural DML: Procedural DML requires a user to specify what data are needed and how to get
those data items.
Declarative DML: Declarative DML requires a user to specify what data are needed without
specifying how to get those data items.
22. What is database manager?
Ans. The database manager is a program module which provides the interface between the lowlevel data stored in the database and the application programs and queries submitted to the
system. Database typically require lots of storage space (in gigabytes). This must be stored on hard
disks. Only pertinent data items are moved between the disk and main memory as and when
needed. The goal of the database manager is to simplify and facilitate access to data in the shortest
possible time.
23. Write the different query languages used in RDBMS.
Ans. Following are the three query languages commonly used:
Structured Query Language (SQL): SQL uses features of relational algebra as well as tuple calculus.
It is the language for a number of RDBMS packages like IBM's DB2, SQL/DS, and ORACLE.
Query Language (QUEL): QUEL is based on tuple calculus and supports set operations like Union,
Intersection, etc. It is the language mainly used for INGRESS RDBMS.
Query-By-Example (QBE): QBE is based on domain calculus. It is a graphical query language. In
QBE, queries are formulated by generating a skeleton table giving an example of what the user
wishes to retrieve. QBE is implemented by translating QBE queries into equivalent SQL queries.
RDBMS packages such as INGRESS AND ORACLE have some form of QBE also included.
The QBE format shows a replica of an empty record on screen, needing the user to type in the
search condition by filling in the field columns.
24. Explain First Normal Form (INF) with an example.
Ans. A table is in the First Normal Form when it contains no repeating groups. The repeating
columns or fields present in an unnormalized table are removed from the table and put into
separate table or tables. These tables are dependent on the parent table from which it is derived.
The key to these tables must also be a part of the parent table, so that the parent table and the
derived tables can be related to each other.
Isolate repeating groups from an entity because they are easier to process separately, from rest of
the entity. Figure below shows an unnormalized table structure.
Employee Employee Store
Department
number name
branch
21130680 Anand K Downtown Hardware
Item
number
TRIO
SA 1
PT6
AB16
30142101 Zadoo S
TT
1 Humidfier 114.00
DS10 Dishwasher 262.00
Computer and IT
Dadeland Home appliances
Item
description
Router
Saw
Drill
Lawn
mover
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Sale
price(Rs.)
35.00
19.00
21.00
245.00
Page 73
Institute for Competitive Exams
41984620 Balwant
Cutter
point
Auto parts
MCI
AC146
BBIOO
HS10
Snow tire
Alternator
Battery
Suit
85.00
65.00
49.50
215.00
61204721 Bhagwan Fashion
Men's clothing
spot
The first four attributes (Employee number, Employee name, Store branch and Department) are
virtually constant. The remaining three attributes (Item number, Item description, and
Sale price) contain data that change and are repeated with different sales persons. Therefore, the
repeating group should be separated from the entity "salesperson." The normalized file is shown
below.
* = Key
*/Employee number
Employee name
Store branch
Department
21130680
30142101
41984620
61204721
Anand K
Zadoo S
Balwant
Bhagwan
Downtown
Dadeland
Cutter point
Fashion spot
Hardware
Home appliances
Auto parts
Men's clothing
Salesperson Data File
*/Employee number
*/item number
Item description
Sale price(Rs.)
21130680
21130680
21130680
21130680
30142101
30142101
41984620
41984620
41984620
61204721
Salesperson Item File
TRIO
SA 1
PT6
AB16
TT 1
DS10
MC16
AC146
BB100
HS10
Router
Saw
Drill
Lawnmover
Humidfier
Dishwasher
Snow tire
Alternator
Battery
Suit
35.00
19.00
21.00
245.00
114.00
262.00
85.00
65.00
49.50
215.00
It consists of two files:
The salesperson data file with employee number as the primary key.
The salesperson item file with employee number and item number as new attributes. These two
attributes are added to relate the records in this file to the salesperson data fileThe two attributes are used together for accessing data. Therefore, two keys are used together and
such a key is called a concatenated key.
25. Consider the following tables and write the queries in SQL?
The EMPLOYEE table
EMP_CODE
101
102
103
104
105
EMP_NAME
Raju
Amar Roy
Raj
Rajiv Kumar
Suraj Patel
Computer and IT
DESIG
Manager
Salesman
Assistant
As. Engineer
Area Manager
HEAD
105
101
107
-
DOJ
17-DEC-90
20-FEB-91
22-FEB-93
02-APR-91
28-SEP-91
BASIC
6000
2000
2500
4200
5500
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
DEPT_CODE
20
30
20
10
30
Page 74
Institute for Competitive Exams
106
107
108
109
110
Binay Kumar
Ramaswamy.
Jog Iyer
Imran Khan
Tinu Anand
Salesman
Engineer
Assistant
Steno
As. Engineer
105
105
105
107
01-MAY-91
09-JUN-91
09-DEC-92
17-NOV-91
12-JAN-93
2270
4500
2250
2500
4000
30
10
30
30
10
The DEPARTMENT table
DEPT_CODE
DEPT NAME
FLOOR
10
Accounts
1
20
Research
2
30
Sales
3
40
Operations
4
Ans.
(a) List all department names and their locations from the DEPARTMENT table.
SELECT DEPT_NAME, FLOOR FROM DEPARTMENT;
(b) List the names of the Assistants working in department 30.
SELECT EMP_NAME FROM EMPLOYEE WHERE DESIG = 'Assistant' AND DEPT_CODE
= 30;
(c)
List the names of the employees not belonging to the department 10 and 40.
SELECT EMP_NAME FROM EMPLOYEE WHERE DEPT_CODE NOT IN (10, 40);
(d) List the different positions (i.e designations) available in the EMPLOYEE table.
SELECT DISTINCT DESIG FROM EMPLOYEE;
NOTE: Using the DISTINCT clause with SELECT will forbid duplicate values if any in a
column.
(e) List the names of those employees whose names either starts or ends with 'R'.
SELECT EMP_NAME FROM EMPLOYEE
WHERE EMP_NAME LIKE ' R% ' OR EMP_NAME LIKE '%R' ;
The LIKE operator is used with CHAR and VAR-CHAR2 type data to match string pattern.
Special characters '%' and '_' are used with LIKE operator to specify a pattern. '%' is similar
.to the '*' wildcard of DOS and '_' is like the '?' wildcard of DOS.
(f)
List the names, salary and PFs of all the employee in the EMPLOYEE table. PF
is calculated- as 10% of the basic salary.
SELECT EMP_NAME, BASIC, BASIC * 0.1 FROM EMPLOYEE;
A more neat way of displaying the result of above query is to use an alias of the column BASIC * 0.1
as given below:
SELECT EMP_NAME, BASIC, BASIC * 0.1 "PF" FROM EMPLOYEE;
(g)
List the names, salary, PF, HRA, DA and GROSS of all the employees in the
EMPLOYEE table. HRA is 30% of salary and DA is 15% of salary. PF is calculated as
10% of the basic salary. The result should be in descending order of GROSS.
SELECT EMP_NAME, BASIC, BASIC * 0.1 "PF",
BASIC * 0.3 "HRA", BASIC * 0.15 "DA", BASIC
+ BASIC * 0.3 + BASIC * 0.15 - BASIC * 0.1 "GROSS"
FROM EMPLOYEE ORDER BY GROSS DESC;
(h) List the average salary and number of employees working in each department.
SELECT
DEPT_CODE,
COUNT(EMP_CODE), AVG(BASIC) FROM EMPLOYEE
GROUP BY DEPT_C0DE;
(i) List the designation and the number of employees having each designation. The
result should be in ascending order of the number of employees.
SELECT DESIG, COUNT(EMP_CODE) FROM EMPLOYEE GROUP BY DESIG ORDER BY
COUNT(EMP_CODE);
(j) List average salaries of those departments which is employing at least 4 people.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 75
Institute for Competitive Exams
SELECT DEPT_CODE, AVG{BASIC) FROM EMPLOYEE GROUP BY DEPT_CODE
HAVING COUNT(EMP_CODE) >= 4;
(k) List the names of the employees along with the names of the people under whom
they are working.
SELECT WORKER.EMP_NAME, HEADTABLE.EMP_NAME FROM EMPLOYEE
"WORKER",
EMPLOYEE
"HEAD-TABLE"
WHERE
WORKER.HEAD
=
HEADTABLE.EMP_CODE;
Here WORKER and HEADTABLE are two aliases for the EMPLOYEE table.
(l) List the names of the employees who joined the company before their respective
heads did.
SELECT
WORKER.EMP_NAME,
WORKER.DOJ,
HEADTABLE.EMP_NAME,
HEADTABLE.DOJ FROM EMPLOYEE "WORKER",EMPLOYEE"HEADTABLE" WHERE
WORKER.HEAD = HEADTABLE.EMP_CODE AND WORKER.DOJ < HEADTABLE.DOJ;
(m) List the designations with highest average salary.
SELECT DESIG FROM EMPLOYEE
WHERE DESIG = (SELECT DESIG FROM EMPLOYEE
GROUP BY DESIG HAVING AVG(BASIC) = (SELECT MAX(AVG(BASIC))
FROM EMPLOYEE GROUP BY DESIG));
(n) List the details of the department which is headed by employee 105.
SELECT * FROM DEPARTMENT WHERE DEPT_CODE=(SELECT DISTINCT
DEPT_CODE FROM EMPLOYEE WHERE HEAD = 105);
(o) List the names of the employees who are earning the lowest salary in each
department.
SELECT EMP_NAME FROM EMPLOYEE
WHERE BASIC IN (SELECT MIN(BASIC) FROM
EMPLOYEE GROUP BY DEPT_CODE);
(p) Increase the salary of employee 102 by 5000.
UPDATE EMPLOYEE SET BASIC = BASIC + 5000 WHERE EMP_CODE = 102;
(q) List the names of those employees who do not head anyone but still gets the
highest salary in the department.
SELECT EMP_NAME FROM EMPLOYEE "E"
WHERE NOT EXISTS (SELECT * FROM EMPLOYEE
WHERE HEAD = E.EMP_CODE) AND BASIC >= ALL
(SELECT BASIC FROM EMPLOYEE WHERE DEPT_CODE = E.DEPT_CODE) ;
(r) List the names of the employees who are earning more than the lowest salary of
an employee in department 30.
SELECT EMP_NAME FROM EMPLOYEE
WHERE BASIC > ANY (SELECT BASIC FROM EMPLOYEE WHERE DEPT_CODE = 30);
(s) Update the HEAD column of those employees who have more than one people
under them such that these employees are under the employee 101.
UPDATE EMPLOYEE SET HEAD = 101 WHERE EMP_CODE <> 101 AND
EMP_CODE IN (SELECT HEAD FROM EMPLOYEE GROUP BY HEAD HAVING
COUNT(EMP_CODE) > 1);
(t) List the names and designations of those employees who works in FLOOR 2 of the
building.
SELECT EMP_NAME, DESIG FROM EMPLOYEE, DEPARTMENT
WHERE EMPLOYEE.DEPT_CODE = DEPARTMENT.DEPT_CODE AND FLOOR = 2;
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 76
Institute for Competitive Exams
Database Management System and Oracle Queries
I. Multiple Choice Questions Set 1
1. Which one of the following is not a valid relational database?
a. SYBASE
b. IMS
c. ORACLE
d. UNIFY
2. Data about data is normally termed as
a. directory
b. databank
c. meta data
d. None of these
3. In an object-oriented model, an object can access data of another object by passing
a. Instance variable
b. Message
c. Variable
d. None of these
4. Find the wrong statement. Database software
a. provides facilities to create, use and maintain database.
b. supports report generation, statistical output, graphical output.
c. provides routine for backup and recovery.
d. all are correct.
5. Which is not a DBMS packages?
a. Unify
b. INGRESS
c. IDMS
d. All are DBMS packages
6. Data are
a. Raw facts and figures
b. Information
c Electronic representation of facts
d. None of these
7. Corporate information
a. brings healthy relationship among employees and employers
b. contains personal particulars.
c. means information derived from weekly meetings
d. None of these.
8. Top level managers use
a. Operational information
b. Technical information
c. Both a and b
d. Strategic information
9. Top level managers use
a. Internal information only
b. External information only
c. Both a and b
d. None of these
10. Data processing cycle consists of
a. Input cycle and output cycle
b. Input cycle, output cycle and processing cycle
c. Output cycle and processing cycle
d. None of these
II. Fill in the Blanks out of the following:
a. field
b. tactical
c. traditional
d. Oracle
e. data dictionary f. Database Administrator
g. IDMS
h. strategic
i. Relational
j. database
k. IMS
l. security
1. _____________ contains the structure of the database.
2. _____________ is a hierarchical database system.
3. _____________ is an example of network database system.
4. _____________ model is preferred over hierarchical model by many organizations.
5. _____________ is a relational Database Management System.
6. Middle level managers use _____________ information.
7. _____________ is an organized collection of facts.
8. The smallest piece of meaningful information in a file is called _____________.
9. _____________ is responsible for physical design and maintenance of database.
10. Hierarchical, network and relational data models are _____________ data models.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 77
Institute for Competitive Exams
Answers
I.
1. b
II.
1. e
2. c
3. b
4. d
5. d
6. a
7. d
8. d
9. c
10. b
2. k
3. g
4. i
5. 1
6. b
7. j
8. a
9. f
10. c
I. Multiple Choice Questions SET 2
1. The relational model is concerned with
a. Data structure and Data integrity
b. Data manipulation
c. Both a and b
d. None of these
2 A view of a database that appears to an application program is known as
a. schema
b. subschema
c. virtual table
d. None of these
3. Model based on user's requirements is
a. Logical model
b. Physical model
c. Conceptual model
d. none of these
4. The Data model which describes how data is actually stored is
a. internal model
b. external model
c. logical model
d. None of these
5. The scheme for hierarchical database is
a. tree
b. graph
c. B-tree
d. none of these
6. A relational model which allows non-atomic domains is
a. Nested relational model
b. Non-atomic data model
c. Hierarchical data model
d. Such a model cannot exist
7. Which of the following is an example for network database?
a. IDMS
b. Ingress
c. Oracle
d. DBMS
8 Which of the following is an example for hierarchical database?
a. Oracle
b. DB2
c Ingress
d. SYSTEM 2000
9. In most of the implementations of hierarchical database, parent-to-child links are stored with
the help of
a. Pointers
b. Virtual records
c Reference variables
d. Preorder threads
10. A hierarchical data model is
a. Partially ordered
b. Not ordered
c. Totally ordered
d. Concept of ordering does not appear
II. Fill in the Blanks out of the following:
a. relational
b. Attributes
c. logical
e. two entities
f. network
g. 3
i. physical
j. data model
k. index
m. an entity and an attribute
d. domain
h. leaf
l. set theory
1. ANSI/SPARC report proposed _____ level architecture for a database system.
2. Data on a last level of a database tree is called _____.
3. _____ is a collection of entries where each entry corresponds to a data record.
4. In the relational data model, the columns of a table are called _____.
5. A _____ is a mechanism that provides abstraction for database applications.
6. The _____ model is based on the mathematical concept of a relation.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 78
Institute for Competitive Exams
7. A relationship is always established between _____.
8. Relational tables show only _____ relationship.
9. The values for an attribute are drawn from a set of values known as _____.
10. Relational model of data management is based on _____.
Answers
I.
1. c
II.
1. g
2. b
3. a
4. a
5. a
6. a
7. a
8. d
9. d
10. c
2. h
3. k
4. b
5. j
6. a
7. e
8. c
9. d
10. l
I. Multiple Choice Questions SET 3
1. The following entities/attributes in a relational database should not have null values,
a. Keys
b. Relations
c Variable
d. All of these
2. An association of several entities in an Entity - Relation model is called
a Tuple
b. Record
c. Relationship
d. Field
3. One limitation of the entity - relation model is that it cannot
a. use generalization
b. express relationship among relationship
c. use single primary key
d. None of these
4 Complex entities can be constructed using the following operations:
a. Sum
b. Union
c. Aggregation
d. Collection
5. Some entity types may have any key attributes of their own; these are called
a. Strong entity type
b. Weak entity type
c. Both a and b
d. None of these
6. In an Entity-Relation (E-R) model an Oval shape represents
a. entity sets
b. attributes
c. relationships
d. links
7. A set of objects that share a common structure and a common behaviour is called
a. Object
b. Class
c. Entity
d. None of these
8 In the E-R diagram a weak entity set is represented by
a. doubly outlined rectangle
b. rectangle
c. oval
d. None of these.
9. An association between Father and Child is
a. 1:1 relationship
b. 1:M relationship
c. M:M relationship
d. None of these.
10. An association between students and courses is
a. 1:1 relationship
b. 1:M relationship
c. M:M relationship
d. None of these.
II. Fill in the Blanks out of the following:
a. object
b. physical level
c. many to many
d. line
e. many to one
f. Weak Entity
g. specialization
h. supertypes
i. E-R diagram
j. attributes
k. subtype
l. association
1. An _____ of several entities in a Entity-Relation model called relationship.
2. Various kinds of data that describes an entity are known as its _____.
3. A _____ set is represented by a doubly outlined rectangle in the E-R diagram.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 79
Institute for Competitive Exams
4. _____ is the result of taking subsets of a higher level entity set to form lower level entity sets.
5. _____ class is also known as specialization class.
6. Attributes are the data that represents characteristics of interest about an _____.
7. A _____ relationship describes entities that may have many relationships in both the
directions.
8. The overall structure of a database can be expressed graphically by an _____.
9. The level of data abstraction that describes how the data is actually stored is called _____.
10. _____ links attributes to entity sets and entity sets to relationships.
Answers
I. 1. a 2. c 3. b 4. c 5. b 6. b 7. b 8. a 9. b 10. c
II. 1. l 2. j
3. f
4. g 5. k 6. a 7. c
8. i
9. b 10. d
I. Multiple Choice Questions SET 4
1. Which one of these is an aggregate function in SQL?
a. AVG
b. SELECT
c. ORDER BY
d. None of these
2. This is an authorization command of SQL
a. Access
b. Grant
c. Allow
d. None of these
3. Transactions are initiated by BEGIN TRANSACTION and terminated
a by COMMIT TRANSACTION
b by ROLLBACK TRANSACTION
c either by COMMIT TRANSACTION or by ROLLBACK TRANSACTION
d. None of these
4. Which of the following statements on the view concept in SQL is invalid?
a. all views are not updatable.
b. the views may be referenced in an SQL statement when ever tables are referenced.
c. the views are instantiated at the time they are referenced and not when they are defined.
d. the definition of a view should not have GROUP BY clause in it.
5. Which of the following is an aggregate function in SQL?
a. Union
b. Like
c. Group By
d. Max
6. Which of the following is not a proper state of transaction?"
a. Partially aborted
b. Partially committed
c. Aborted
d. Committed
7. Rollback of transaction is normally used to
a. recover from transaction failure
b. update the transaction
c. retrieve old records
d. repeat a transaction
8. Universal quantifier of relational calculus can be implemented in SQL using key words
a. NOT EXISTS
b. EXISTS
c FOR ALL
d. None of these
9. What is not true about a view?
a. It is a definition of a restricted portion of a database.
b. It is the means for implementing integrity constraints.
c. It is always updatable like any other table.
d. All are true.
10. GRANT is a command from
a. DDL
b. DML
c DCL
d. None of these
Answers
I. 1. a 2. b 3. c 4. d 5. d 6. b 7. a 8. a 9. d 10. c
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 80
Institute for Competitive Exams
Computer Organization
1. What is computer organization?
Ans. By computer organization we mean the physical as well as logical connections among the
hardware parts of a computer. The basic minimum features of all digital computers contains the
following components:
1. Internal registers
2. The main memory
3. A set of instructions given by OS and application package
4. The timing and control structure
2. How many 128 x 8 memory chips are required to provide a memory capacity of
4096 x 16 bits.
Ans. Number of chips each of 128 x 8 capacity required to construct a memory of capacity 4096 x
16 is given by:
4096  16
128  8
 6 4 c h ip s
3. Convert the binary real number 1101.1010 to a decimal real number.
Ans. A binary real number consists of two parts, an integer part and the fraction part. The decimal
equivalent is determined for both integer as well as fraction parts. These parts are added to give
the equivalent decimal real number. Thus:
1 1 0 1 .1 0 1 0  (1  2  1  2  0  2  1  2 )  (1  2
3
2
1
0
1
 02
2
 1 2
3
 02
4
)
Real Part Fractional Part
= 13.625 (decimal equivalent)
4. What do you understand by floating point representation of numbers? Where this
representation is used?
Ans. In scientific applications of computers, fractions are mostly used. So a system of
representation which automatically keeps track of the position of the decimal point is required.
Such a system of representation is called floating point representation of numbers. Many
computers and electronic calculators use floating-point arithmetic operations. The computers
which do not have internal circuitry for floating-point operations can solve the scientific problems
involving fractions with the help of software using this method.
5. Explain the range of the numbers that can be obtained for a 32 bit word length.
Ans. The range of number can be obtained for a 32-bit word length. Suppose out of 32 bits, 24 bits
are employed for the mantissa including sign bit and 8 bits for the exponent including sign bit.
23
( 2  1)
The maximum value = (1  2 )  2
≈ 2127 = 1038
7
1
7
( 2 1 )
1
127
128
= (2 )  2
= 2
The minimum value = ( 2 )  2
≈1 0
The range of the number = 2  1 2 8 to 2127 or 1 0  3 8 to 1038
38
6. What is Karnaugh's Mapping.
Ans. Karnaugh's mapping is a method of plotting a boolean function and is used to simplify logical
expressions making use of a truth table. To draw a Karnaugh map, a boolean function must be
written in a Sum of Products form or in the Min term form. If it is not in this form, then we should
use the truth table to convert it to the sum of the products form.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 81
Institute for Competitive Exams
7. What do you mean by Don't Care Condition?
Ans. Boolean expressions describe the behaviour of logic networks. Each square of a Karnaugh
map represents the response (i.e. output) of the network corresponding to a combination of logic
values of the input variables. Sometimes, certain input combinations never occur. In such
situations, the output of the logic network (i.e. minterms on the Karnaugh map) are not specified
These situations are referred to as don't-care conditions A don't -care condition is indicated by a
dash or cross on a Karnaugh map. The squares on the Karnaugh map with dash entries are known
as don't-care squares. A don't-care square may be assumed either as a 1-square or 0-square as
desired while forming the groups of squares for simplification. Any one of such squares or some of
them may be included or may not be included while forming groups.
8. What do you understand by the term Timing Signals?
Ans. Timing signals are electrical pulses that are generated in the CPU or some other external
device in order to synchronize computer operations. The main timing signal comes from the
computer's clock, which provides a frequency that can be divided into many slower cycles.
In synchronous communication systems timing signals are generated by sending special sync
characters to the destination device in order to synchronize both sending and receiving stations.
9. What does the term bus signify?
Ans. A bus is a communication channel, or pathway, between hardware devices either internally
between components in a computer, or externally between terminals and computers in a
communications network. The CPU, memory and peripheral control units are all interconnected
through the bus.
The bus is divided into two channels, one to select where data is located called address bus, and the
other to transfer the data called data bus.
10. Draw the K-Map for the following function
F (A, B, C, D) = ∑m (0, 2, 3, 6, 7, 12, 13, 14) + ∑d (1, 4, 11, 15)
(In the above function, d represents the don't care conditions and m represents the
min terms). Find the minimized Boolean Expression in the sum of product form.
Ans. The plot of ∑m (0, 2, 3, 6, 7, 12, 13, 14) is seen by marking 1 in the corresponding cells. The
dash (-) is used for don’t-care condition.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 82
Institute for Competitive Exams
The min terms are given for the corresponding cell numbers as represented in the brackets. For
example, the cell in 3rd column and first row represents 1100 or decimal value 12 given within
brackets.
11. A digital computer has a common bus system for 16 registers of 32 bits each. The
bus is constructed with multiplexers.
(i) How many multiplexers are there in the bus?
(ii) What size of multiplexers are needed?
(iii) How many selection inputs are there in each multiplexer?
Ans.
(i) Since a register has 32 bits, number of multiplexers required = 32
(ii) Number of registers = 16. Therefore the number of inputs to a multiplexer = 16.
Size of each of the 32 multiplexers is 16 x 1.
(iii) n selection inputs are required for 2n multiplexers.
Therefore, Number of selection variables required for 32 multiplexers = 5, because 25 = 32.
12. Add the binary number 1100 and its 2's complement.
Ans. The binary number = 1100
Its l's complement = 0011
Its 2's complement = 0011 + 1 = 0100
The number + its 2's complement =
1100
+ 0100
1
0000
 Ignore carry
If the carry of the last stage is neglected, the sum of a binary number and its 2's complement is
equal to zero. In the above example the binary number is of 4 bits.
If we have a 4-bit processor and use it for addition, then the last carry is left out because, the sum
will be considered only upto 4 bits. For an 8-bit processor the binary number and its 2's
complement is written upto 8 bits.
13. List the micro-operations executed for the following instructions
Ans.
(a) ADD: The ADD instruction would add the contents of accumulator (AC) with the contents of
memory word specified by the effective address. The sum is stored back in AC and any carry is
transferred to E flip-flop.
(b) BUN: This instruction transfers or branches off the program control to the instruction which
is stored at location referred by the effective address. The instruction, in such a case, is not
executed line by line or one after another.
(c) BSA: This is similar to BUN instruction but in addition, it also saves the return address.
Return address is the address where the program control will return after executing the subroutine
instructions. Therefore, before replacing the contents of program counter (PC) we will have to
store the contents memory. The contents of PC must be stored at address given by the bits 0-11 of
the instruction (which will be transferred to address register (AR). The instruction at location AR +
1 is then executed.
(d) ISZ: This instruction first increments the memory word given by the effective address. If the
result of the increment is zero, it skips the next instruction in sequence. This can be done by
adding one to program counter (PC).
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 83
Institute for Competitive Exams
14. What is Register? What are their types?
Ans. For performing any arithmetical or logical operation, an arithmetical logical unit (ALU)
requires certain temporary memory locations where the data may be kept for a short while. Such
memory locations built in the ALU, are called its registers. For example, Intel 8085
microprocessor has five types of registers, namely
General Purpose Registers: These registers may be used for any temporary storing purpose.
These registers may be combined to form, register pairs in order to handle larger size data. General
purpose registers are also known as programmable registers as they may be programmed by the
user with the help of instructions.
Accumulator: This register is generally referred to as Register AC. It is used for storing data and
for doing arithmetic and logic operations. The result of an arithmetic or logical operation is
automatically stored in this register.
Status Register: The status register also called flag register, holds 1-bit flags to indicate certain
conditions that arise during arithmetic and logical operations.
Program Counter: This is a register which deals with the order for execution of instructions.
This acts like a pointer which indicates the subsequent memory location where instruction is
stored. After one instruction is executed, the program counter gets incremented by one to indicate
the location of the next instruction in serial order.
Stack Pointer (SP): Stack may be defined as a set of memory locations and the stack pointer
may be defined as the indicator to these memory locations. Stack memory locations are used by a
microprocessor for storing data temporarily for execution of a program.
15. What is the difference between direct addressing mode and indirect addressing
mode?
Ans. In case of memory reference instructions, the value of I bit determines the addressing mode.
That is, if I bit in the instruction is 0, then the address contained in address field, of the instruction
is the address of the operand in the memory. This is known as direct addressing.
If value of I bit is 1, then the address field contains the address of the memory where the effective
address is stored in the memory. This is known as Indirect addressing.
16. Explain how Fetch Cycle works?
Ans. This cycle comprises the following four steps:
(a) Program Counter (PC) is loaded with the address of the instruction to be fetched from the
memory. The instruction is loaded in the Instruction Register (shown as IR).
(b) The opcode part of the instruction is passed into the decoder and the address part in the
Address Register (AR).
(c) The opcode is decoded to confirm which of the operations like add, subtract, multiply, divide,
etc. are to be performed. Execution of each operation needs a set of control signals which are
initiated after decoding.
(d) The Program Counter (PC) containing the address of instruction in the memory is incremented
by 1 to get the address of the next instruction in the memory.
17. What are the factors which help in deciding the length of instruction format?
Ans. Instruction format length depends on the number of address fields in the instructions. The
number of address fields in the instruction format of a computer in turn depends on the internal
organisation of its registers.
18. What do you mean by saying "xxxxx is a 32 bit machine” What is the purpose of
stack pointer register in assembly language?
Ans. When we say that xxxxx is a 32 bit machine it indicates that a memory word in xxxxx is of 32
bits. There are 32 data lines in xxxxx machine. The data register (DR) in xxxxx is of 32 bits.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 84
Institute for Competitive Exams
19. Explain with suitable examples the following:
Ans.
(a) Immediate Addressing
In this case, the operand itself is given in the instruction. For example:
LDA 10101 [It means, Load operand 10101 into AC]
(b) Relative Addressing
In relative addressing mode, the contents of program counter is added to the address in the
address field of instruction. The sum of these values then provide the effective address of the
operand. Suppose for example, the program counter contains value 500, then the instruction BUN
23 will make CPU to execute instruction located at address 523 (500 + 23 = 523).
(c) Indexed Addressing
Indexed addressing mode makes use of a register called index register. This register contains the
address of operand with respect to a fixed memory address. The instruction specifies the fixed
address. To access an operand the value in the index register is added with the fixed value given in
the instruction. Therefore, if the index register is incremented after each instruction, the same
instruction can be used to access elements stored in consecutive memory locations.
20. What do you mean by instruction format?
Ans. An instruction format defines the layout of bits of an instruction in terms of its constituent
parts. The bits of an instruction can be grouped into parts called fields. In a computer, the
instruction format usually consists of 3 fields. These are as follows.
Operation Code (opcode) Field: Specifies the operation, such as addition, subtraction etc., to
be performed on the operands.
Mode field: Specifies the addressing mode.
Address field: Specifies the address where the operand is stored.
21. What is the difference between zero-address, one-address, and two-address
instructions?
Ans.
Zero-address instruction: Zero-address type of instructions do not contain any operand or
operand address. The operand addresses are implied. The instruction CLA is a 0-address
instruction. CLA stands for clear accumulator. Here the instruction itself specifies that the
operation "clear" is to be per formed on Accumulator.
One-address instruction: In this type of instruction, a single operand address is specified. The
other operand lies in the accumulator and the result is also stored back in the accumulator. LDA A,
STA A, ADD A and PUSH A are some examples of 1-address instruction.
Two-address instruction: In this type of instruction, addresses of two operands are specified.
The result of the operation is stored in one of the given operand addresses. MOV R1, R2 is an
example of 2-address instruction.
22. What is Instruction pipelining? What are its uses?
Ans. Imagine a water pipe, where new inputs are accepted at one end before the former inputs
leave as outputs from the other end. The same concept applies to instruction pipelining as well.
Suppose, instructions consist of two stages namely, fetch and execution stages. In Instruction
pipelining, the pipeline hardware is designed in such a way that while an instruction is being
executed, the next instruction in sequence is fetched. This is done because there are times during
the execution of an instruction, when the main memory is not accessed. These moments can be
better utilised to fetch next instruction.
In a non-pipelined computer, fetching, decoding, calculation are first completed, before execution
of an instruction, then the next instruction to be executed would be fetched from the memory. In a
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 85
Institute for Competitive Exams
pipelined computer, while an instruction is fetched, the other is decoded. It is also possible that
while the operand is being fetched for the third, the fourth instruction is executed. The instruction
fetching unit, the instruction decoding unit, operand fetching unit and the execution unit all would
operate simultaneously, in a pipelined operation.
23. What is loop buffer?
Ans. A loop buffer is a small, very high speed memory containing the most recently fetched
instructions, in sequence. If a branch needs to be taken, loop buffer is first checked to see whether
it contains the branch target. If found, the next instruction is fetched from here.
24. How does single pass assembler process an assembly program? Compare it with
2 - pass assembler.
Ans.
Single Pass Assembler: A single pass assembler scans the program only once and creates the
equivalent binary program. The Assembler substitutes all of the Symbolic instructions with
machine code in one go. It has the advantage that every source statement needs to be processed
only once. The translation process thus becomes faster.
Two Pass Assembler: The input program is scanned twice by the Two-Pass assembler, to
produce the equivalent binary program. Each scan by the assembler is named as a Pass namely,
first pass and second pass.
During the first pass, assembler generates a table. This table lists down all the user defined address
symbols (labels) along with their binary equivalent values. This table, containing labels and their
equivalent binary code, is called Address-Symbol Table.
Machine Instructions are translated into binary code during second pass by means of table lookup
procedures. Any symbol that is encountered in the program must be available as an entry in
Pseudo instruction table, MRI table, Non-MRI table, Address symbol table.
25. What are imperative, declarative and directive statement in assembly language?
Ans. An assembly program consists of three kinds of statements:
(a) Imperative statements: An imperative assembly language statement indicates actions to be
performed during execution of the assembled program. Hence, each imperative statement
translates into (generally one) machine instruction. For example, the following are all imperative
statements:
LDA A
STA ADD
ISZ C
(b) Declarative statements: A declarative assembly language statement declares constants or
storage areas in a program. For example, the statement
A DS 20
simply declares a storage area of 20 words and indicate that this storage area must be known by
the name A Hence, A stands for the first word of the operand T access fifth word, A + 4 is used.
First word is accessed as A + 0.
(c) Directive statements: Assembler directive statements direct the assembler to take certain
actions during the process of assembling a program. They neither represent machine instructions
to be included in the object program nor indicate the allocation of storage for constants or program
variables. For example, the statement ORG 100 indicates that the first word of the object program
must be placed at memory location '100'.
26. Describe the microinstruction format.
Ans. A microinstruction consists of 4 functional parts. These are listed below.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 86
Institute for Competitive Exams
Microoperation fields (F1, F2, etc): The fields F1, F2 and F3 specify the micro-operations
which are to be performed. These fields are of 3 bits each. 3 bits can form 8 combinations which
stands for 8 micro-operations. Thus the three fields F1, F2 and F3 can specify 3 of 24 possible
combinations. If a control word needs to specify only one microoperation then F2 and F3 field
contains value 000 (no microoperation).
Condition for branching (CD): The CD field specifies the conditions for branching like
Unconditional branch, indirect address bit, overflow and zero value in accumulator. 2 bits in CD
can form 4 combinations i.e can specify 1 of 4 possible conditions.
Branch field (BR): The BR field specifies the type of branch like Jump to a location
unconditionally, call a subroutine at a location, return to the location from where the subroutine
was called, etc.
Address field (AD): The address of the main memory where the value of the variable is
available.
27. Explain horizontal and vertical microinstruction format.
Ans.
Horizontal Microinstruction: They have long formats. They have the ability to express a high
degree of parallelism (Degree of Parallelism is a measure of the number of micro operations that a
single microinstruction can specify). Hence it is faster when compared to vertical
microinstructions. No decoder is used to decode control field.
Vertical Microinstruction: They usually have short formats i.e they are more compact. They
have limited ability to express parallelism. That is, a vertical microinstruction cannot specify more
than one micro-operations. A function code is used for each action to be performed. A decoder is
used to translate the code into control signals.
28. Convert the hexadecimal number 2B6D into its decimal equivalent.
Ans.
2B6D = 2 x 163 + B x 162 + 6 x 161 + D x 16°
= 2 x 4096 + 11 x 256 + 6 x 16 + 13 x 1 = 8192 + 2816 + 96 + 13 = 11117 (decimal)
29. Convert the hexadecimal number 3DE to its equivalent octal number.
Ans. The hexadecimal number 3DE is first converted to its binary equivalent
3DE (hex) = (0011) (1101) (1110) = (001111011110)2 Now the above binary equivalent is divided into
groups of 3 bits to obtain its octal equivalent
(001111011110)a = (001) (111) (011) (110) = 1736 (octal)
30. Explain serial data transfer. Why is it slower than parallel data transfer?
Ans. In serial data transfer, one bit of data is transferred at a time. It is employed for slow-speed
peripherals such as terminals, mouse, modem, etc. Printers employ serial interface if they are low
speed printers.
In parallel data transfer, all the bits of a word is transferred at a time simultaneously. In parallel
interface there are multiple lines to connect the peripheral to the port. A parallel interface is used
for high speed peripherals such as disk, tape and printers.
31. What do you understand by the terms I/O interface, I/O processor and interrupt
mask?
Ans.
I/O interface: An I/O interface is a channel between the CPU and a peripheral device. In small
computers, it includes the controller and cable between the CPU and the peripheral device.
I/O processor: An I/O processor is a hardware device or software program that is dedicated to
handling only input and output operations.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 87
Institute for Competitive Exams
Interrupt mask: An interrupt mask is an internal switch setting that controls whether an
interrupt can be processed or not. The mask is a bit that is turned on and off by the program.
32. Write short notes on the following:
Ans.
(a) Software interrupt and Hardware interrupt
Software Interrupt is a program-generated interrupt, also called a trap, that stops current
processing in order to request a service provided by the CPU. For example, a program might
generate a software interrupt to refer the CPU to a video routine under the control of the
computer's input/output system or to read input from the mouse or the keyboard.
Hardware Interrupt is a type of interrupt (request for service) generated either externally by
hardware devices such as the keyboard, disk drive and input/output ports or internally by the
microprocessor. External hardware interrupts are used by devices to request attention from a
computer's CPU. Internal hardware interrupts are generated by the CPU to control events.
(b) Polling and interrupt driven I/O
Polling is a method of Input Output handling by CPU wherein the CPU continuously interrogates
devices attached to it to determine if a device wishes to transmit. If a peripheral device is ready to
transmit, it sends back an acknowledgement code (ACK), and the transmission sequence begins.
In Interrupt driven system, the device that is ready to transmit sends a signal to the CPU indicating
that it requires data transmission. The CPU then takes action accordingly.
(c) Memory mapped I/O and I/O mapped I/O
I/O mapped Input Output
Memory mapped Input output
In I/O mapped configuration, the CPU has In a memory mapped I/O organisation there are
distinct input and output instructions.
no separate input output instructions. The
memory type instructions are used for I/O
operations as well.
The address part of I/O instructions refers to Same address space is used for both memory
the address of an input or output interface access and Input Output.
register.
Requires separate read and write lines.
A single set of read and write lines are employed
for both memory transfer operations and input
output operations.
(d) Daisy Chaining
Daisy chaining is an hardware implementation of interrupt priority scheme. In this method the
input output devices are connected serially. The device with the highest priority is placed closer to
the CPU and the device with the lowest priority is paced farthest away from CPU. Thus, farther a
device is from the first position, the lower is its priority.
(e) Traps
Traps are the names given to internal interrupts that occur when there is a mistake in the user's
program. For example, attempt to divide by zero, accumulator overflow or use of an illegal opcode
are the reasons for internal interrupts. When such a mistake is detected by CPU, it interrupts the
user's program and branches to a subroutine which handles the trap. The routine program which
runs when a trap occurs is known as trap handler.
33. What is associative memory? Explain how is it used in address mapping in cache
memory system?
Ans. Associative memory is a type of memory, which does not keep track of addresses of its
contents. The data are accessed by its contents. Using specially designed circuits, the requested
word is matched against all the words available in the memory. This memory is accessed on the
basis of the data contents rather than by specific address or location.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 88
Institute for Competitive Exams
In case of associative mapping, the contents of cache memory are not associated with any address.
That is, data stored in the cache memory is not accessed by specifying any address. Instead, data or
part of data is searched by matching with the actual contents. The data are then accessed by its
contents.
In the Associative mapping method, both the words and the address of the word (in the memory)
is stored in the cache. The address bits, sent by CPU to search, is matched with the addresses
stored in the cache memory. If any address is matched, the corresponding word is fetched from the
cache and sent to CPU.
If no match is found in cache memory, the word is searched in the main memory. The word along
with its address is then copied from main memory into cache. This is done because the word is
most likely to be referenced again in future (due to locality of reference property). If the cache is
full, then the existing word along with its address must be removed to make room for the new
word.
34. Write short notes on Virtual memory and Flash Memory?
Ans.
Virtual memory: It gives users an illusion of working with a large block of contiguous memory
space (perhaps even larger than real memory), when in actuality most of their work is done in a
small primary memory. In a computer system that implements virtual memory system, the user
has the option to use part of or entire auxiliary memory to use. Virtual memory is nothing but the
auxiliary or secondary memory of the computer system seen as main memory by application
programs.
Flash Memory: Flash memory is one of today's hottest development areas. This is largely driven
by the availability of gadgets like cellphones, PDAs, digital cameras and MP3 players, all of which
use some form of flash memory to store data. Flash memory is an EEPROM (Electronically
Erasable Programmable Read Only Memory) chip. Though it is a read-only memory, you can
electronically erase its contents and write data on it. Flash memory offers the advantage of solidstate storage, which means that unlike RAM and like the BIOS chip in your PC, the data you store
on it does not disappear when you switch off power.
35. Write a short note on bootstrap loader?
Ans. Boot means start the computer. It comes from the word "boot-strap", since bootstraps help
you get your boots on. Similarly, booting the computer helps get its first instructions. In personal
computers, there is a small bootstrap routine in a ROM chip that is automatically executed when
the computer is switched on. The bootstrap routine searches for the operating system, loads it and
then passes control on to it. In large computers, the bootstrap procedure may require a more
elaborate sequence of button pushing or keyboard input. A cool boot is when the computer is first
turned on. A warm boot is when the computer is already on and is being reset. With personal
computers using single-tasking operating systems, it is usually necessary to reset the computer
after it crashes.
36. Define full subtractor and write its truth table.
Ans. Full Subtractor is a combinational circuit that can do subtraction on 3 bits of a binary
number. It consists of 3 inputs and only 2 outputs i.e. difference (D) and borrow (B). The table
below shows the truth table for a 3-bit subtractor. Here, a, b and c are the three bits. B and D are
the Borrow and Difference Bits.
a
b
c
Borrow Differenc
e
0
0
0
0
0
0
0
1
1
1
0
1
0
1
1
0
1
1
1
0
1
0
0
0
1
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 89
Institute for Competitive Exams
1
1
1
0
1
1
1
0
1
0
0
1
0
0
1
37. Define Multiplexer.
Ans. A multiplexer is a combinational circuit that selects binary information from one of many
input lines and directs it to a single output line. The selection of a particular input line is controlled
by a set of selection lines or control signals. Normally, there are 2n input lines and n selection or
control lines whose bit combinations determine which input line is selected.
38. Differentiate between odd parity bit and even parity bit system.
Ans.
Odd Parity Bit System
In an odd parity bit system, we add a bit whose
value can be 0 or 1 along with the transmitted
data so as to make the total number of bits with
1’s are odd number. Example, if transmitted
data is 0110 then odd parity bit system convert
it to 01101
Even Parity Bit System
In an even parity bit system, we add a bit whose
value can be zero or 1 with transmitted data in
order to make the total number of 1s as even
number.
For example, if transmitted data is 0110 that
consists of even no. 1’s then even parity bit
system convert it to 01100.
They are used for checking whether the received They are also used for checking whether the
data is error free or not because if data is not received data is error free or not. If data is not
error free, it will not consists of odd no. of 1's.
error free then a bit may have changed and it
does not contain even no. of 1's.
39. Explain with the help of electronic circuits, how the following logic gates are
created?
Ans.
(a) NOT gate
In a NOT gate, the truth table is as follows:
A
NOT A
0
1
1
0
Figure shows a simple circuit to perform NOT function using a switch. When the switch S is open
(logic 0), the output voltage V0 is equal to the supply voltage V (logic 1). When S is closed (logic 1),
V0 is equal to 0 (logic 0), because the point P goes to the ground potential in this condition. The
switch S can be replaced by a transistor to perform the same operation, a-shown in Figure. When
Vm is 0, the transistor does not conduct and V0 is equal to V (logic 1). When Vin is equal to 5 volts
(logic 1), the transistor conducts and V0 is equal to zero (logic 0) as the point P goes to the ground
potential. Thus, this simple transistor circuit performs NOT function (i.e. inverter operation).
Figure: NOT gate realisation.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 90
Institute for Competitive Exams
(b) NAND gate
The truth table for NAND gate is as follows:
A
B
(Output) Z = A.B
0
0
1
0
1
1
1
0
1
1
1
0
Figure shows a simple circuit to perform NAND function. When any one or both switches A and B
are open (logic 0), the output voltage V0 is equal to the supply voltage (i.e. logic 1). When both
switches are closed (logic 1), V0 is zero (i.e. logic 0). The switches A and B are replaced by the
Transistors TA and TB as shown in Figure. When both inputs A and B are at 5 volts i.e. logic 1,
transistor TA and TB both conduct and the point P goes on the ground potential. This makes V0
equal to zero i.e. 0 logic. When both A and B are at 0 logic, both transistors are open (they do not
conduct) and V0 is equal to the supply voltage V i.e. at logic 1. When either A or B is at zero logic,
one of the transistors will not conduct and hence the point P will not come to the ground potential.
In this condition V0 is at logic 1. Thus, this transistor circuit performs NAND function.
Figure: NAND gate realisation.
(c) NOR gate
The truth table for NOR logic gate is as follows:
A
B
0
0
1
1
0
1
0
1
(Output) Z=
1
0
0
0
A  B
Figure shows a simple circuit to perform NOR function. When any one of the switches A and B or
both are closed (i.e. logic 1), V0 is at zero logic. When both the switches are open (logic 0), V0 is at
logic 1. Switches A and B are replaced by transistors as shown in Figure. When both inputs A and B
are at logic 1, both transistors conduct and V0 is at ground potential i.e. logic 0. When either A or B
is at logic 1 one of the transistors (TA or TB) conducts, and the point P goes to the ground potential.
This makes V0 at logic 0. When both the inputs A and B are at 0 logic, none of the transistors
conducts and V0 is equal to the supply voltage i.e. logic 1. Thus this circuit performs NOR function.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 91
Institute for Competitive Exams
Figure: NOR gate realisation.
40. What is a flip-flop circuit? What is its function?
Ans. A flip-flop circuit is a bistable device. A device is said to be bistable which has two stable
states. Flip-flop has two stable states:
Flip-flop's output value remains either high or low. The high stable state, i.e. 1 is called SET.
The other stable state (low, i.e. 0) is called RESET. Flip-flop's property is to remain in one state
until it is changed by an input signal to switch over to the other state. Thus, a flip-flop circuit can
store binary digit either 1 or 0.
41. What is the shortcoming of S-R flip-flop? How this shortcoming is removed in J-K
flip-flop?
Ans. In S-R flip-flop, the state of the output is unpredictable when both the inputs of S = R = 1.
However, J-K flip-flop allows inputs J = K = 1. In this situation the state of the output is changed;
the complement of the previous state is available at the output terminal, when the input to both J
and K is 1.
42. What are the advantages of Master-slave flip-flops over other types of flip-flops?
Ans. Master-slave flip-flops are level-triggered. A problem associated with level-triggered masterslave J-K flip-flops is that the inputs at J and K must not change while clock is high otherwise the
output will be unpredictable. If a master-slave unit contains edge-triggered flip-flops then there
will be no such difficulty. This is the main advantage of master-slave flip-flops over other types of
flip-flops.
43. Define the terms D/A and A/D conversion.
Ans.
Digital to Analog (D/A) Conversion: D/A converter transforms digital information into
equivalent analog information using electronic circuits. For example, the output of a digital system
may be converted to analog form to drive a pen-recorder in a plotter.
Analog to Digital (A/D) Conversion: An analog signal may be required to be converted to
digital equivalent form for better transfer on long distances through cable media. A/D converter is
also known as encoding device because it is used to encode analog signals for entry into digital
systems.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 92
Institute for Competitive Exams
I. Multiple Choice Questions SET 1
1. Stored program concept may provide
a. maximal use of secondary storage
b. program to modify its own instructions
c. use of cache memory
d. None of these
2. Which of the following is a unit of measurement with computer systems
a. byte
b. megabyte
c. kilobyte
d. all of the above
3. The parity bit is used for
a. error checking
b. indexing
c. coding
d. controlling
4. In fourth generation computers, the main technology used is
a. Transistor
b. SSI
c. MSI
d. LSI & VLSI
5. The hexadecimal number system has a base
a. 2
b. 4
c. 8
d. 16
6. In a half - adder, CARRY is obtained by using
a. OR gate
b. NAND gate
c. AND gate
d. EX-NOR gate
7. In Von Neumann computer, program is assumed to be
a. in main memory and data is on secondary storage
b. on secondary storage and data is also on secondary storage
c. in main memory and data is also in main memory
d. None of these
8. If even parity mechanism is being used, for data transfer, correctly receipt data byte is
a. 1101011
b. 1111011
c. 1111111
d. None of these
9. Any combination logic circuit can be implemented by using the following universal building
block
a. AND
b. NAND
c. OR
d. None of these
10. The T (or Toggle) flip-flop can be constructed using a JK flip-flop by connecting
a. toggle input to J and the inverted form of toggle input to K
b. the toggle input to J
c. inverted form of toggle input to K
d. None of these
II. Fill in the Blanks out of the following:
a. stored
b. 80
c. 7F
d. 5
e. XOR
f. 1
g. ASCII
h. 106
i. 1016
j. management
k. hard copy
l. 210
1. Von Neuman introduced ___________ program concept in a computer.
2. A CPU, with a memory address register of 10 bit's, can address up to ___________ KB of
memory.
3. In a half - adder circuit SUM is realized using ___________ operation.
4. The hamming distance between 101101 & 110010 is___________.
5. To set the most significant bit of an 8-bit register A to 0.Logical AND operation on A with mask
___________ hex is used.
6. Printed copy is often called ___________.
7. A mega byte is equal to approximately ___________ bytes.
8. 1 KB equals __________ bytes.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 93
Institute for Competitive Exams
9. __________ is the code used for transform of information.
10. File __________ refers to the retrieval of information from a file.
Answers
I.
1. c 2. d 3. a 4. d 5. d 6. c 7. c 8. b 9. b 10. d
II.
1. a 2. f 3. e 4. d 5. c 6. k 7. h 8. l 9. g 10. j
I. Multiple Choice Questions SET 2
1. In n/2 bits wide data bus in n bit word size computer, CPU would access
a. memory module twice during each instruction execution.
b. memory module once during each instruction execution.
c. memory module twice during two instruction execution.
d. none of these
2. Advances in computer hardware and software are generally classified into generations. In which
generation are we currently?
a. second
b. third
c. fourth
d. fifth
3. The toggle flip-flop can be constructed using a JK flip-flop by connecting
a. toggle input to J and the inverted form of toggle input to K
b. the toggle input to J
c. inverted form of toggle input to K
d. none of these
4. Which of the following was (were) not used in first-generation computers?
a. vacuum tubes
b. cards
c. magnetic core
d. punched paper tape
5. The number of select input lines in an 16-to-1 multiplexer is
a. 4
b. 8
c. 1
d. none of these
6. Which of the following was not associated with second-generation computers?
a. high-level procedural language
b. operating system
c. magnetic core
d. all of the above
7. How many full adders are needed to add two 4 bit numbers?
a. 8
b. 2
c4
d. 16
8. In the third generation of computers:
a. high-level procedural languages were first used
b. an operating system was first developed
c. distributed data processing first became popular
d. on-line, realtime systems became popular
9. Which of the following is not a universal building block?
a. 2-input NAND gate
b. 3-input NAND gate
c. 2-to-1 multiplexer
d. 2-input XOR gate
10. The person contributing the idea of the stored program was
a. John Von Neumann
b. Charles Babbage
c. Howard Aiken
d. Thomas J. Watson, Sr.
II. Fill in the Blanks out of the following:
a. register transfer
b. data bus
c. high level language
d. low level language
e. 00110001
f. memory write
g. +
h. X
i. 2's compliment
j. ,
k. compliment
l. previous value of bit
m. stored program
n. 00010011
o. ENIAC
1. _____ causes data on bus to be put into the addressed location.
2. Data lines, which provide path for moving data between system modules are called _____.
3. _____ language is used to denote micro-operations.
4. _____ operator is used to indicate that two operations are executed simultaneously.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 94
Institute for Competitive Exams
5. Taking the _____ of a number and adding 1, will give us the two's compliment of the original
number.
6. Y is the 2's compliment of a number of X. The 2's compliment of Y will give us_____.
7. A decimal number 13 is represented in BCD as _____
8. When an 8 bit two's compliment number is to be right shifted, we must set bit 7 (MSB) to
_____.
9. The capability that differentiates computers from calculators is the _____.
10. The first electronic digital computer is the _____.
Answers
I.
1. a
2. c
3. d
4. c 5. a
6. d
7. c
8. d
9. d 10. a
II.
1. f
2. b
3. a
4. j
5. k
6. h
7. n
8. l
9. m 10. o
I. Multiple Choice Questions SET 3
1. In instruction cycle
a. the indirect cycle is always followed by execute cycle
b. fetch cycle is always followed by interrupts
c. execute cycle and fetch cycles are simultaneously executed
d. none of these
2. The number of fetch operational to execute instruction having immediate operand is
a. 0
b. 1
c. 2
d. none of these
3. The number of memory location that a CPU with a 16 bit program counter can address
a. 16 k
b. -64 k
c. 256 k
d. 32 k
4. Operand is fetched from memory during
a. fetch phase
b. execute phase
c. decode phase
d. read phase
5. Accumulator of the basic computer is a
a. instruction register
b. data register
c. address register
d. processor register
6. The number of bits required to address a memory of 1024 bytes is
a. 12
b. 1
c. 10
d. none of these
7. Memory reference instructions operate on operands
a. stored in memory
b. stored in an address stored in memory
c. stored in register
d. none of these
8. Direct addresses are same as
a. effective address
b. address of operand
c. both a and b
d. none of these
9. In order to start the timing signal all over again from To Sequence counter of the control unit has
a. CLR input
b. INR input
c. Clock
d. none of these
10. What is the name of the logic circuit which can add two binary digits
a. Full adder
b. Half adder
c. Parallel adder
d. none of these
II. Fill in the Blanks out of the following:
a. 16MB
b. 125
c. fetch
d. preceded e.
no
f. Hardware
g. literals
h. Von Neumann
i. program counter
j. handshaking
k. 16 KB
l. one
m. followed
1. The indirect cycle of instruction cycle is always _____ by execute cycle.
2. _____ are sometimes used directly in operand field.
3. _____ is simple timing mechanism associated with control signal.
4. Register addressing has _____ memory reference.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 95
Institute for Competitive Exams
5. A CPU, whose program counter has 24 bits, can address at least _____ words of storage.
6. A digital computer in which data memory is separated from instruction memory is said to, have
_____ architecture.
7. A register that keeps track of the next instruction to be executed is _____
8. An instruction cycle consists of _____ and execute cycles.
9. RISC architectures can achieve execution of each segment in _____ clock cycle.
10. Stored program computer has _____ architecture.
Answers
I.
1. b
2. a
3. b
4. b 5. d
6. c
7. a
8. c
9. a 10. b
II.
1. d
2. g
3. j
4. e 5. a
6. f
7. I
8. c
9. l
10. h
I. Multiple Choice Questions SET 4
1. A microprocessor is a processor with a reduced
a. Power required
b. MIPs performance
c. Instruction set
d. none of these
2. A CPU instruction normally contains
a. no address
b. one address reference
c. maximum of three address references
d. none of these
3. An addressing mode having no memory reference but with limited operand magnitude is
a. stack
b. register
c. immediate
d. none of these
4. Data is carried along with the instruction in
a. immediate addressing b. direct addressing
c. indexed addressing
d. none of these
5. Previous context register is used to save the content of current value of the program counter by
CPU before transferring control to the subroutine. Such a CPU does no support for
a. branch instruction
b. multiprogramming
c. recursion
d. none of these
6. Stack addressing
a. means implicitly referenced register is program counter
b. is referred to as pushdown list or last in first out
c. combines capabilities of register indirect addressing and relative addressing
d. none of these
7. Technique for concurrent processing like pipelining, multiprogramming was first introduced in
computers of
a. first generation
b. second generation
c. third generation
d. none of these
8. The number of fetch operational to execute instruction having immediate operand is
a. 0
b. 1
c. 2
d. none of these
9. The number of memory location that a CPU with a 4 bit program counter can address
a. 16 k
b. 32 k
c. 256 k
d. 64 k
10. In instruction cycle
a. the indirect cycle is always followed by execute cycle
b. fetch cycle is always followed by interrupts
c. execute cycle and fetch cycles are simultaneously executed
d. none of these
II. Fill in the Blanks out of the following:
a. instruction
b. stack
c. pipeline
. d. immediate
e. control unit
f. indexed
g. zero
h. no
i. 720
j. queue
k. 256
1. One chip computer is called _____.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 96
Institute for Competitive Exams
2. Instruction _____.is often used to enhance the performance.
3. The _____.addressing mode is more suited for address ing array elements.
4. _____.addressing mode may be used to define and use constant value.
5. In immediate addressing mode, the operand itself is contained in an _____.
6. _____.addressing is also known as pushdown list or last in first out.
7. A CPU, with a memory address register of 28 bits, can address up to _____.MB of memory.
8. The hamming distance between 100001 & 100001 is _____.
9. _____ causes data on bus to be put into the addressed location.
10. register addressing has _____ memory references.
Answers
I.
1. d
6. b
II.
1. e
6. b
Computer and IT
2. c
7. d
3. b
8. a
4. a
9. a
5. c
10. b
2. c
7. k
3. f
8. g
4. d
9. e
5. a
10. H
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 97
Institute for Competitive Exams
Operating System
1. What are the basic functions of an operating system?
Ans. Operating system controls and coordinates the use of the hardware among the various
applications programs for various uses. Operating system acts as resource allocator and manager.
Since there are many possibly conflicting requests for resources the operating system must decide
which requests are allocated resources to operating the computer system efficiently and fairly. Also
operating system is control program which controls the user programs to prevent errors and
improper use of the computer. It is especially concerned with the operation and control of I/O
devices.
2. Why paging is used?
Ans. Paging is solution to external fragmentation problem which is to permit the logical address
space of a process to be noncontiguous, thus allowing a process to be allocating physical memory
wherever the latter is available.
3. While running DOS on a PC, which command would be used to duplicate the
entire diskette?
Ans. diskcopy
4. What resources are used when a thread created? How do they differ from those
when a process is created?
Ans. When a thread is created the threads does not require any new resources to execute the
thread shares the resources like memory of the process to which they belong to. The benefit of code
sharing is that it allows an application to have several different threads of activity all within the
same address space. Whereas if a new process creation is very heavyweight because it always
requires new address space to be created and even if they share the memory then the inter process
communication is expensive when compared to the communication between the threads.
5. What is virtual memory?
Ans. Virtual memory is hardware technique where the system appears to have more memory that
it actually does. This is done by time-sharing, the physical memory and storage parts of the
memory one disk when they are not actively being used.
6. What is Throughput, Turnaround time, waiting time and Response time?
Ans. Throughput: Number of processes that complete their execution per time unit.
Turnaround time: amount of time to execute a particular process.
Waiting Time: amount of time a process has been waiting in the ready queue.
Response Time: amount of time it takes from when a request was submitted until the first
response is produced, not output (for time-sharing environment).
7. What is the state of the processor, when a process is waiting for some event to
occur?
Ans. Waiting state
8. What is the important aspect of a real-time system or Mission Critical Systems?
Ans. A real time operating system has well defined fixed time constraints. Process must be done
within the defined constraints or the system will fail. An example is the operating system for a
flight control computer or an advanced jet airplane. Often used as a control device in a dedicated
application such as controlling scientific experiments, medical imaging systems, industrial control
systems, and some display systems. Real-Time systems may be either hard or soft real-time. Hard
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 98
Institute for Competitive Exams
real-time: Secondary storage limited or absent, data stored in short term memory, or read-only
memory (ROM), Conflicts with time-sharing systems, not supported by general-purpose operating
systems. Soft real-time: Limited utility in industrial control of robotics, Useful in applications
(multimedia, virtual reality) requiring advanced operating-system features.
9. What is the difference between Hard and Soft real-time systems?
Ans. A hard real-time system guarantees that critical tasks complete on time. This goal requires
that all delays in the system be bounded from the retrieval of the stored data to the time that it
takes the operating system to finish any request made of it. A soft real time system where a critical
real-time task gets priority over other tasks and retains that priority until it completes. As in hard
real time systems kernel delays need to be bounded
10. What is the cause of thrashing? How does the system detect thrashing? Once it
detects thrashing, what can the system do to eliminate this problem?
Ans. Thrashing is caused by under allocation of the minimum number of pages required by a
process, forcing it to continuously page fault. The system can detect thrashing by evaluating the
level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by
reducing the level of multiprogramming.
11. What is multi tasking, multi programming, multi threading?
Ans. Multi programming: Multiprogramming is the technique of running several programs at a
time using timesharing. It allows a computer to do several things at the same time.
Multiprogramming creates logical parallelism. The concept of multiprogramming is that the
operating system keeps several jobs in memory simultaneously. The operating system selects a job
from the job pool and starts executing a job, when that job needs to wait for any i/o operations the
CPU is switched to another job. So the main idea here is that the CPU is never idle. Multi tasking:
Multitasking is the logical extension of multiprogramming .The concept of multitasking is quite
similar to multiprogramming but difference is that the switching between jobs occurs so frequently
that the users can interact with each program while it is running. This concept is also known as
time-sharing systems. A time-shared operating system uses CPU scheduling and
multiprogramming to provide each user with a small portion of time-shared system. Multi
threading: An application typically is implemented as a separate process with several threads of
control. In some situations a single application may be required to perform several similar tasks
for example a web server accepts client requests for web pages, images, sound, and so forth. A busy
web server may have several of clients concurrently accessing it. If the web server ran as a
traditional single-threaded process, it would be able to service only one client at a time. The
amount of time that a client might have to wait for its request to be serviced could be enormous. So
it is efficient to have one process that contains multiple threads to serve the same purpose. This
approach would multithread the web-server process, the server would create a separate thread that
would listen for client requests when a request was made rather than creating another process it
would create another thread to service the request. To get the advantages like responsiveness,
Resource sharing economy and utilization of multiprocessor architectures multithreading concept
can be used.
12. What is hard disk and what is its purpose?
Ans. Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data
on the magnetic medium of the disk. Hard disks have a hard platter that holds the magnetic
medium, the magnetic medium can be easily erased and rewritten, and a typical desktop machine
will have a hard disk with a capacity of between 10 and 40 gigabytes. Data is stored onto the disk in
the form of files.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 99
Institute for Competitive Exams
13. What is fragmentation? Different types of fragmentation?
Ans. Fragmentation occurs in a dynamic memory allocation system when many of the free blocks
are too small to satisfy any request. External Fragmentation: External Fragmentation happens
when a dynamic memory allocation algorithm allocates some memory and a small piece is left over
that cannot be effectively used. If too much external fragmentation occurs, the amount of usable
memory is drastically reduced. Total memory space exists to satisfy a request, but it is not
contiguous. Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated
memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory
may be slightly larger than requested memory; this size difference is memory internal to a
partition, but not being used
14. What is DRAM? In which form does it store data?
Ans. DRAM is not the best, but it’s cheap, does the job, and is available almost everywhere you
look. DRAM data resides in a cell made of a capacitor and a transistor. The capacitor tends to lose
data unless it’s recharged every couple of milliseconds, and this recharging tends to slow down the
performance of DRAM compared to speedier RAM types.
15. What is Dispatcher?
Ans. Dispatcher module gives control of the CPU to the process selected by the short-term
scheduler; this involves: Switching context, Switching to user mode, Jumping to the proper
location in the user program to restart that program.
Dispatch latency: time it takes for the dispatcher to stop one process and start another running.
16. What is CPU Scheduler?
Ans. Selects from among the processes in memory that are ready to execute, and allocates the
CPU to one of them. CPU scheduling decisions may take place when a process:
1.Switches from running to waiting state.
2.Switches from running to ready state.
3.Switches from waiting to ready.
4.Terminates.
Scheduling under 1 and 4 is non-preemptive. All other scheduling is preemptive.
17. What is Context Switch?
Ans. Switching the CPU to another process requires saving the state of the old process and loading
the saved state for the new process. This task is known as a context switch. Context-switch time is
pure overhead, because the system does no useful work while switching. Its speed varies from
machine to machine, depending on the memory speed, the number of registers which must be
copied, the existed of special instructions(such as a single instruction to load or store all registers).
18. What is cache memory?
Ans. Cache memory is random access memory (RAM) that a computer microprocessor can access
more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in
the cache memory and if it finds the data there (from a previous reading of data), it does not have
to do the more time-consuming reading of data from larger memory.
19. What is a Safe State and what is its use in deadlock avoidance?
Ans. When a process requests an available resource, system must decide if immediate allocation
leaves the system in a safe state. System is in safe state if there exists a safe sequence of all
processes.
Deadlock Avoidance: ensure that a system will never enter an unsafe state.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 100
Institute for Competitive Exams
20. What is a Real-Time System?
Ans. A real time process is a process that must respond to the events within a certain time period.
A real time operating system is an operating system that can run real time processes successfully
21. Explain the concept of Reentrancy.
It is a useful, memory-saving technique for multi-programmed timesharing systems. A Reentrant
Procedure is one in which multiple users can share a single copy of a program during the same
period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data
for each user process must be stored separately. Thus, the permanent part is the code, and the
temporary part is the pointer back to the calling program and local variables used by that program.
Each execution instance is called activation. It executes the code in the permanent part, but has its
own copy of local variables/parameters. The temporary part associated with each activation is the
activation record. Generally, the activation record is kept on the stack.
Note: A reentrant procedure can be interrupted and called by an interrupting program, and still
execute correctly on returning to the procedure.
22. Explain Belady's Anomaly.
Ans. Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a
process' virtual memory, the process execution is faster, because fewer page faults occur.
Sometimes, the reverse happens, i.e., the execution time increases even when more frames are
allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns.
23. What is a binary semaphore? What is its use?
Ans. A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement
mutual exclusion and synchronize concurrent processes.
24. What is thrashing?
Ans. It is a phenomenon in virtual memory schemes when the processor spends most of its time
swapping pages, rather than executing instructions. This is due to an inordinate number of page
faults.
25. List the Coffman's conditions that lead to a deadlock.
Ans. Mutual Exclusion: Only one process may use a critical resource at a time.
Hold & Wait: A process may be allocated some resources while waiting for others.
No Pre-emption: No resource can be forcible removed from a process holding it.
Circular Wait: A closed chain of processes exist such that each process holds at least one resource
needed by another process in the chain.
26. What are short-, long- and medium-term scheduling?
Ans. Long term scheduler determines which programs are admitted to the system for processing.
It controls the degree of multiprogramming. Once admitted, a job becomes a process.
Medium term scheduling is part of the swapping function. This relates to processes that are in a
blocked or suspended state. They are swapped out of real-memory until they are ready to execute.
The swapping-in decision is based on memory-management criteria.
Short term scheduler, also know as a dispatcher executes most frequently, and makes the finestgrained decision of which process should execute next. This scheduler is invoked whenever an
event occurs. It may lead to interruption of one process by preemption.
27. What are turnaround time and response time?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 101
Institute for Competitive Exams
Ans. Turnaround time is the interval between the submission of a job and its completion.
Response time is the interval between submission of a request, and the first response to that
request.
28. What are the typical elements of a process image?
Ans. User data: Modifiable part of user space. May include program data, user stack area, and
programs that may be modified.
User program: The instructions to be executed.
System Stack: Each process has one or more LIFO stacks associated with it. Used to store
parameters and calling addresses for procedure and system calls.
Process control Block (PCB): Info needed by the OS to control processes.
29. What is the Translation Lookaside Buffer (TLB)?
Ans. In a cached system, the base addresses of the last few referenced pages is maintained in
registers called the TLB that aids in faster lookup. TLB contains those page-table entries that have
been most recently used. Normally, each virtual memory reference causes 2 physical memory
accesses- one to fetch appropriate page-table entry, and one to fetch the desired data. Using TLB
in-between, this is reduced to just one physical memory access in cases of TLB-hit.
30. What is the resident set and working set of a process?
Ans. Resident set is that portion of the process image that is actually in real-memory at a
particular instant. Working set is that subset of resident set that is actually needed for execution.
(Relate this to the variable-window size method for swapping techniques.)
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 102
Institute for Competitive Exams
I. Multiple Choice Questions SET 1
1. Determine the number of page faults when references to pages occur in the following order:
1, 2, 4, 5, 2, 1, 2, 4, Assume that the main memory can accommodate 3 pages and the main memory
already has the pages 1 and 2, with page 1 having been brought earlier than page 2. (LRU algorithm
is used)
(a) 3
(b) 5
(c) 4
(d) none of these
2. Working set (t, k) at an instant of time, t, is
(a) the set of k future references that the operating system will make
(b) the set of future references that the operating system will make in the next 'k' time units
(c) the set of k reference with high frequency
(d) the set of pages that have been referenced in the last k time units
3. Dykstra's banking algorithm in an operating system, solves the problem of
(a) deadlock avoidance
(b) deadlock recovery
(c) mutual exclusion
(d) context switching
4. MS-DOS
(a) does not support multiprogramming
(b) supports multiprogramming to some extent
(c) supports multiprogramming fully
(d) none of these
5. With a single resource, deadlock occurs
(a) if there are more than two processes competing for that resource
(b) if there are only two processes competing for that resource
(c) if there is a single process competing for that resource
(d) none of these
6. In a time-sharing operating system, when the time slot given to a process is completed, the
process goes from the RUNNING state to the
(a) BLOCKED state
(b) READY state
(c) SUSPENDED state
(d) TERMINATED state
7. At a particular time, the value of a counting semaphore is 10. It will become 7 after
(a) 3 V operations
(b) 3 P operations
(c) 5 V operations and 2 P operations
(d) None of these
8. Supervisor call
(a) is a call made by the supervisor of the system
(b) is a call with control functions
(c) are privileged calls that are used to perform resource management functions, which are
controlled by the operating system
(d) is a call made by someone working in root directory
9. At a particular time of computation, the value of a counting semaphore is 7. Then 20 P
operations and ‘x’ V operations were completed on this semaphore. If the final value of the
semaphore is 5, x will be
(a) 22
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 103
Institute for Competitive Exams
(b) 18
(c) 15
(d) 13
10. Pre-emptive scheduling is the strategy of temporarily suspending a running process
(a) before the CPU time slice expires
(b) to allow starving processes to run
(c) when it requests I/O
(d) none of these
11. Mutual exclusion problem occurs between
(a) two disjoint processes that do not interact
(b) processes that share resources
(c) processes that do not use the same resource
(d) none of these
12. Memory protection is of no use in a
(a) single user system
(b) non-multiprogramming system
(c) non-multitasking system
(d) none of these
13. Some computer systems support dual mode operation—the user mode and the supervisor or
monitor mode. These refer to the modes
(a) by which user programs handle their data
(b) by which the operating system executes user programs
(c) in which the processor and the associated hardware operate
(d) of memory access
14. Disk scheduling involves deciding
(a) which disk should be accessed next
(b) the order in which disk access requests must be serviced
(c) the physical location where files should be accessed in the disk
(d) none of these
15. A computer system has 6 tape drives, with 'n' processes competing for them. Each process may
need 3 tape drives. The maximum value of 'n' for which the system is guaranteed to be deadlock
free is
(a) 4
(b) 3
(c) 2
(d) 1
16. Dirty bit is used to show the
(a) page with corrupted data
(b) the wrong page in the memory
(c) page that is modified after being loaded into cache memory
(d) page that is less frequently accessed
17. Fence register is used for
(a) CPU protection
(b) memory protection
(c) file protection
(d) all of these
18. The first-fit, best-fit and the worst-fit algorithm can be used for
(a) contiguous allocation of memory
(b) linked allocation of memory
(c) indexed allocation of memory
(d) all of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 104
Institute for Competitive Exams
19. Single-user operating system is
(a) MS-DOS
(b) UNIX
(c) OS/2
(d) None of these
20. In Round Robin CPU scheduling, as the time quantum is increased, the average turnaround
time
(a) increases
(b) decreases
(c) remains constant
(d) varies irregularly
21. In a paged memory, the page hit ratio is 0.35.The time required to access a page in secondary
memory is equal to 100 ns. The time required to access a page in primary memory is 10 ns. The
average time required to access a page is
(a) 3.0 ns
(b) 68.0 ns
(c) 68.5 ns
(d) 73.5 ns
22. A state is safe if the system can allocate resources to each process (up to its maximum) in some
order and still avoid deadlock. Then
(a) deadlocked state is unsafe
(b) unsafe state "may lead to a deadlock situation
(c) deadlocked state is a subset of unsafe state
(d) all of these
23. In a multi-user operating system, 20 requests are made to use a particular resource per hour,
on an average. The probability that no requests are made in 45 minutes is
(a) e-15
(b) e-5
(c) 1-e-5
(d) 1-e-10
24. In which of the following directory systems, is it possible to have multiple complete paths for a
file, starting from the root directory?
(a) Single level directory
(b) Two level directory
(c) Tree structured directory
(d) Acyclic graph directory
25. Suppose that a process is in 'BLOCKED' state waiting for some I/O service. When the service is
completed, it goes to the
(a) RUNNING state
(b) READY state
(c) SUSPEND state
(d) TERMINATED state
26. In a system that does not support swapping
(a) the compiler normally binds symbolic addresses (variables) to relocatable addresses
(b) the compiler normally binds symbolic addresses to physical address
(c) binding of symbolic addresses to physical addresses normally takes place during execution
(d) None of these
27. To obtain better memory utilization, dynamic loading is used. With dynamic loading, a routine
is not loaded until it is called for. For implementing dynamic loading
(a) special support from hardware is essential
(b) special support from operating system is essential
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 105
Institute for Competitive Exams
(c) special support from both hardware and operating system are essential
(d) user programs can implement dynamic loading without any special support from the operating
system or the hardware.
Consider a set of 5 processes whose arrival time, CPU time needed and the priority are given below
Process Priority Arrival Time (in ms) CPU Time Needed (in ms)
Priority
P1
0
10
5
P2
0
5
2
P3
2
3
1
P4
5
20
4
P5
10
2
3
Answer the next 5 questions based on the above information, (smaller the number, higher the
priority.)
28. If the CPU scheduling policy FCFS, the average waiting time will be
(a) 12.8 ms
(b) 8 ms
(c) 6 ms
(d) none of these
29. If the CPU scheduling policy is SJF, the average waiting time (without pre-emption) will be
(a) 16 ms
(b) 12.8
(c) 6.8 ms
(d) none of these
30. If the CPU scheduling policy is SJF with pre-emption, the average waiting time will be
(a) 8 ms
(b) 14 ms
(c) 5.6 ms
(d) none of these
31. If the CPU scheduling policy is priority scheduling without pre-emption, the average waiting
time will be
(a) 12.8 ms
(b) 11.8 ms
(c) 10.8 ms
(d) none of these
32. If the CPU scheduling policy is priority scheduling with pre-emption, the average waiting time
will be
(a) 19 ms
(b) 7.6 ms
(c) 6.8 ms
(d) none of these
33. Cascading termination refers to termination of all child processes before the parent terminates
(a) normally
(b) abnormally
(c) normally or abnormally
(d) none of these
34. Consider a system having 'm' resources of the same type. These resources are shared by 3
processes A, B, C, which have peak time demands of 3, 4, 6 respectively. The minimum value of 'm'
that ensures that deadlock will never occur is
(a) 11
(b) 12
(c) 13
(d) 14
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 106
Institute for Competitive Exams
35. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units,
then
(a) deadlock can never occur
(b) deadlock may occur
(c) deadlock has to occur
(d) none of these
36. 'm' processes share 'n' resources of the same type. The maximum need of each process doesn’t
exceed 'n' and the sum all the their maximum needs is always less than m + n. In this set up
(a) deadlock can never occur
(b) deadlock may occur
(c) deadlock has to occur
(d) none of these
37. A process refers to 5 pages, A, B, C, D and E in the following order A; B; C; D; A; B; E; A; B;
C;D; E. If the page replacement algorithm is FIFO, the number of page transfer with an empty
internal store of 3 frames is
(a) 10
(b) 9
(c) 8
(d) 7
38. Distributed systems should
(a) meet prescribed time constraints
(b) aim better resource sharing
(c) aim better system utilization
(d) aim low system overhead
39. In real-time operating systems, which of the following is the most suitable scheduling scheme?
(a) round-robin
(b) first-come-first-served
(c) pre-emptive
(d) random scheduling
40. In question number 42, if the number of available page frames is increased to 4, then the
number of page transfers
(a) decreases
(b) increases
(c) remains the same
(d) none of these
41. If there are 32 segments, each of size 1 K byte, then the logical address should have
(a) 13 bits
(b) 14 bits
(c) 15 bits
(d) 16 bits
42. Disk requests come to a disk driver for cylinders 10, 22, 20, 2, 40, 6 and 38, in that order at a
time when the disk drive is reading from cylinder 20.The seek time is 6 ms per cylinder. The total
seek time, if the disk arm scheduling algorithm is first-come-first-served is
(a) 360 ms
(b) 876 ms
(c) 850 ms
(d) 900 ms
43. In question 42, if the scheduling algorithm is the closest cylinder next, then the total seek time
will be
(a) 360 ms
(b) 876 ms
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 107
Institute for Competitive Exams
(c) 850 ms
(d) 900 ms
44. A certain moving arm disk storage with one head has following specifications:
Number of tracks / recording surface = 200
Disk rotation speed = 2400 rpm
Track storage capacity = 62500 bits
The average latency time (assume the head can move from one track to another only by traversing
the entire track) is
(a) 2.5 s
(b) 2.9 s
(c) 3.1 s
(d) 3.6 s
45. In question number 44, the transfer rate will be
(a) 2.5 Mbits/s
(b) 4.25 Mbits/s
(c) 1.5 Mbits/s
(d) 3.75 Mbits/s
46. In a paged segmented scheme of memory management, the segment table itself must have a
page table because
(a) the segment is spread over a number to hit in one page
(b) each segment is spread over a number of pages
(c) segment tables point to page tables and not to the physical location of the segment
(d) the processor's description base register points to a page table
47. The address sequence generated by tracing a particular program executing in a pure demand
paging system with 100 records per page, with a free main memory frame is recorded as follows.
What is the number of page faults?0100, 0200, 0430, 0499, 0510, 0530, 0560, 0120, 0220, 0240,
0260, 0320, 0370.
(a) 13
(b) 8
(c) 7
(d) 10
48. A computer system has 4 k word cache organised in a block-set-associative manner, with 4
blocks per set, 64 words per block. The number of bits in the SET and WORD fields of the main
memory address format is
(a) 15, 4
(b) 6, 4
(c) 7, 2
(d) 4, 6
49. A computer installation has 1000 K of main memory. The jobs arrive and finish in the
following sequence:
Job 1 requiring 200 K arrives
Job 2 requiring 350 K arrives
Job 3 requiring 300 K arrives
Job 1 finishes
Job 4 requiring 120 K arrives
Job 5 requiring 150 K arrives
Job 6 requiring 80 K arrives
Among best fit and first fit, which performs better for this sequence?
(a) First fit
(b) Best fit
(c) Both perform the same
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 108
Institute for Competitive Exams
(d) None of these
50. Consider the following heap:
JOBl-50
FREE-150 JOB2-300 FREE-350 JOB3-600
The sequence of requests for blocks of sizes 300, 25, 125, 50 can be satisfied if we use
(a) either first fit or best fit policy
(b) first fit, but not best fit
(c) best fit, but not first fit
(d) none of these
51. Of the following, the safe sequence is
(a) P0, PI, P2, P3
(b) PI, P0, P3, P2
(c) P2, P0, PI, P3
(d) none of these
52. A demand paging system, with page table held in registers, takes 5 ms to service a page fault if
an empty page is available, or if the page to be replaced is not dirty. It takes 15 ms if the re-placed
page is dirty. Memory access time is lm s. Assume we want an effective access time of 2m s and
that the page to be replaced is dirty 60% of the time. What is the approximate maximum
acceptable page fault rate to meet this access time requirement?
(a) 0.1%
(b) 1.0%
(c) 2.5%
(d) 0.01%
53. Consider a computer with 8 Mbytes of main memory and a 128 K cache. The cache block size is
4 K. It uses a direct mapping scheme for cache management. How many different main memory
blocks can map onto a given physical cache block?
(a) 2048
(b) 256
(c) 64
(d) none of these
54. Relocatable programs
(a) cannot be used with fixed partitions
(b) can be loaded almost anywhere in memory
(c) do not need a linker
(d) can be loaded only at one specific location
55. Fixed partitions
(a) are very common in current operating systems
(b) are very efficient in memory utilization
(c) are very inefficient in memory utilization
(d) are most used on large mainframe operating systems
56. A linker
(a) is not necessary with variable partitions
(b) must be run after the loader
(c) creates a load module
(d) is not needed with a good compiler
57. The garbage collector
(a) is critical for efficient virtual memory systems
(b) prevents fragmentation from occurring
(c) is mostly used with fixed partitions
(d) collects fragmented areas of memory
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 109
Institute for Competitive Exams
58. Access to moving head disks requires three periods of delay before information is brought into
memory. The response that correctly lists the three time delays for the physical access of data in
the order of the relative speed from the slowest to the fastest is
(a) latency time, cache overhead time, seek time
(b) transmission time, latency time, seek time
(c) seek time, latency time, transmission time
(d) cache overhead time, latency time, seek time
59. An unpaged or read-ahead cache associates disk domains with the address of the read and
continues for a specific length. The major disadvantage of unpaged cache is that
(a) it allows cache domain to contain redundant data
(b) it does not allow writes to be cached
(c) its access time is greater than that of paged caching
(d) read ahead cache domain blocks are necessarily fixed in size
60. Disk requests are received by a disk drive for cylinders 5, 25, 18, 3, 39, 8 and 35 in that order.4
seek takes 5 m sec per cylinder moved. How much seek time is needed to serve these requests for a
shortest seek first (SSF) algorithm? Assume that the arm is at cylinder 20 when the last of these
requests is made with none of the requests yet served
(a) 125 msec
(b) 295 msec
(c) 575 msec
(d) 750 msec
61. Which of the following statements is false?
(a) Segmentation suffers from external fragmentation.
(b) Paging suffers from internal fragmentation.
(c) Segmented memory can be paged.
(d) Virtual memory is used only in multi-user systems.
62. If a virtual memory system has 4 pages in real memory and the rest must be swapped to disk.
Which of the following is the hit ratio for the following page address stream, Assume that memory
starts empty. Use the First In First Out (FIFO) algorithm.,
(a) 10%
(b) 15%
(c) 25%
(d) 31%
63. The maximum amount of information that is available with one position of the disk access arm
for a removal disk pack (without further movement of the arm with multiple heads) is
(a) a plate of data
(b) a cylinder of data
(c) a track of data
(d) a block of data
64. If a disk has a seek time of 20 ms, rotates 20revolutions per second, has 100 words per block,
and each track has capacity of 300 words. Then the total time required to access one block is
(a) 25
(b) 30
(c) 40
(d) 60
65. Cached and interleaved memories are ways of speeding up memory access between CPUs and
slower RAM. Which memory models are best suited (i.e. improves performance the most) for
which programs?
(i) Cached memory is best suited for small loops.
(ii) Interleaved memory is best suited for small loops.
(iii) Interleaved memory is best suited for large sequential code.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 110
Institute for Competitive Exams
(iv) Cached memory is best suited for large sequential code
(a) 1 and 2 are true
(b) 1 and 3 are true
(c) 4 and 2 are true
(d) 4 and 3 are true FILE SYSTEM
66. The most efficient data set organization is
(a) a sequential file
(b) an ISAM file
(c) variable depending upon the usage of the data set
(d) a partitioned data set
67. A partitioned data set is most used for
(a) storing program data
(b) storing ISAM files
(c) a program or source library
(d) storing backup information
68. File record length
(a) should always be fixed
(b) should always be variable
(c) depends upon the size of the file
(d) should be chosen to match the data character
69. An incremental backup
(a) uses more tapes
(b) should be done each month
(c) saves only files that have recently changed
(d) saves all files
70. Backup should be done
(a) daily for most installations
(b) weekly for most installations
(c) as several images copies, followed by an incremental
(d) as several incrementals, followed by an image copy
71. Disaster recovery
(a) is needed by every installation
(b) is never needed
(c) varies in degree between installations
(d) requires off-site computer for immediate use
72. Wild-card specifiers
(a) provide an easy way of finding groups of related files
(b) are only used when printing the contents of files
(c) can be used when writing a file
(d) allow several files to be read simultaneously
73. The allocation map
(a) is used to store program data
(b) specifies which blocks are used by which file
(c) is updated by applications programs
(d) allow programs to erase files
74. The activity of a file
(a) is a low percentage of number of records that are added to or deleted from a file
(b) is a measure of the percentage of existing records updated during a run
(c) refers to how closely the files fit into the allocated space
(d) is a measure of the number of records added or deleted from a file compassed with the original
number of records
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 111
Institute for Competitive Exams
75. The volatility of a file refers to
(a) the number of records added or deleted from a file composed to the original number of records
in that file
(b) efficiency with which non-sequential files are processed
(c) the extent where the records of the file are contiguous and in proximity to others
(d) percentage of records that has changed in a given time period.
76. Which types of file organization are supported by magnetic tape?
(a) random files
(b) contiguous sequential file
(c) indexed sequential file
(d) all of these
77. A file is
(a) an abstract data type
(b) logical storage unit
(c) file is usually non volatile
(d) all of these
78. Number of minimal set of required file operations are
(a) two
(b) four
(c) five
(d) six
79. How many common file type are there?
(a) one
(b) six
(c) five
(d) two
80. System supports how many types of files?
(a) one
(b) two
(c) three
(d) four
81. System supports two types of file, which are
(a) text files
(b) executable binary files
(c) both
(a) and
(b) above
(d) none of these
82. The simplest directory structure is
(a) single level directory
(b) two level directory
(c) tree structure directory
(d) none of these
83. Disadvantage of single level directory is
(a) the confusion of files names between different users
(b) the confusion of files data
(c) both (a) and (b) above
(d) none of these
84. Solution of name collision problem is
(a) single level directory
(b) two level directory
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 112
Institute for Competitive Exams
(c) tree structure
(d) all of these
85. Path's name are
(a) absolute path
(b) relative path
(c) both (a) and (b) above
(d) none of these
86. Which structure prohibits the sharing of files and directories?
(a) tree structure
(b) one level structure
(c) two level structure
(d) none of these
87. Shared sub-directories and files are example of
(a) a cyclic graph directory
(b) tree structured direction
(c) one level directory
(d) none of these
88. There are no cycle in which type of directory?
(a) General graph directory
(b) A cyclic graph directory
(c) One level directory
(d) Two level directory
89. The lowest level of I/O control consists of
(a) device drivers
(b) interrupt handlers
(c) both (a) and (b) above
(d) none of these
90. Which type of design problem in file system?
(a) How the file system should look to the user
(b) Algorithm and data structure must be created to map the logical file system into the secondary
storage device
(c) Both (a) and (b) above
(d) none of these
91. In MS-DOS, relocatable object files and load modules have extensions
(a) .OBJ and .COM or .EXE respectively
(b) .COM and .OBJ respectively
(c) .EXE and .OBJ respectively
(d) .DAS and .EXE respectively
92. A file sometimes called a
(a) collection of input data
(b) data set
(c) temporary place to store data
(d) program
93. Access time is the highest in the case of
(a) floppy disk
(b) cache
(c) swapping devices
(d) magnetic disks
94. A file organization component of a VSAM file is
(a) relative record data set
(b) keyed sequential data set
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 113
Institute for Competitive Exams
(c) entry sequential data set
(d) all of these
95. The file structure that redefines its first record at a base of zero uses the term
(a) relative organization
(b) key fielding
(c) dynamic reallocation
(d) hashing
96. A partitioned data set is mostly used for
(a) a program or source library
(b) storing program data
(c) storing back up information
(d) storing ISAM files
97. Consider six files: F1, F2, F3, F4, F5, F6 with corresponding sizes 100, 200, 70, 40, 250 and 50
respectively, the files are to be stored on a sequential device in such a way that as to optimize
access time. In what order should the files be stored?
(a) F6, F5, F4, F3, F2, F1
(b) F1, F2, F3, F4, F5, F6
(c) F5, F2, F1, F3, F6, F4
(d) F4, F6, F3, F1, F2, F5
98. Consider six files F1, F2, F3, F4, F5 and F6 of corresponding sizes 100, 200, 70, 40, 250 and 50
respectively. If the files are stored in such a manner to optimize access time, what will be the
approximate average access time of a record from one of the six files on the sequential device?
(a) 131
(b) 198
(c) 286
(d) 433
99. Primitive disk operating system (DOS) manages its disk files in contiguous blocks. A file is
saved to the first available space that is large enough to hold the file. Assume that a disk has only
10 contiguous blocks of available free space. Which of the following set of file operations
Fa = 1, Fb = 3, Fc = 5, Fd = 6
(a) save (fa) , save (fb) , save (fd) , delete (fd) , save (fc)
(b) save (fc) , save (fa) , delete (fc) , save (fd)
(c) save (fd) , save (fb) , delete (fd) , save (fd)
(d) save (fb) , save (fa) , delete (fb) , save (fd)
100. Punched cards use
(a) alphanumeric code
(b) Hollerith code
(c) EBCDIC code
(d) ASCII code
101. When used with I/O devices, the term intelligent implies
(a) a colour output capability
(b) speech processing capability
(c) high speed printing capability
(d) features to support off-line and online tasks
102. What is the storage capacity of a Hollerith card which is organized into nibbles?
(a) 32
(b) 64
(c) 120
(d) 240
103. The digitizing technology that uses an electric field radiated from the tablet and picked by
cursor is
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 114
Institute for Competitive Exams
(a) raster
(b) electrostatic
(c) sonic
(d) electromagnetic
104. Continuous line drawing are produced using
(a) chain printers
(b) daisy wheel printers
(c) plotters
(d) thermal devices
105. Bit-map terminal
(a) supports displays containing multiple windows
(b) requires considerable amount of video RAM
(c) requires tremendous amount of copying and hence low performance
(d) all of these
106. In a modem using dibit phase, encoding has the bit rate
(a) same as the baud rate
(b) higher than its baud rate
(c) lower than its baud rate
(d) independent of its baud rate
107. Terminals can accommodate
(a) inputs only.
(b) outputs only
(c) both input and output
(d) turnaround document only
108. Memory mapped displays
(a) are utilized for high resolution graphics such as maps
(b) uses ordinary memory to store the display data in character form
(c) stores the display data as individual bits
(d) are associated with electromechanical teleprinters
109. Plotter accuracy is measured in terms of repeatability and (a) buffer size
(b) resolution
(c) vertical dimension
(d) intelligence
110. In electrostatic plotters the term "resolution” refers to
(a) the number of dots per inch
(b) the speed per inch
(c) the accuracy to which the plotter returns to a specific point
(d) dual axis tracking
111. A dumb terminal has
(a) an embedded microprocessor
(b) extensive memory
(c) independent processing capability
(d) a keyboard and a screen
112. In a serial communication, an extra clock is needed
(a) to make efficient use of RS - 232
(b) for programmed band rate control
(c) to synchronize the devices
(d) all of these
113. Which of the following statements is incorrect for a micro-processor system using I/O mapped
I/O?
(a) I/O address space is greater.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 115
Institute for Competitive Exams
(b) I/O and memory spaces are distinct.
(c) Memory space available is greater.
(d) Not all data transfer instructions are available.
114. A DMA module is transferring characters to main memory using cycle-stealing (getting the
system bus from CPU to do DMA transfer) . The device is transmitting at 1 Mbps over a Local Area
Network. The CPU fetches instructions at the rate of 1 MIPS (one million instructions per second)
.Assuming each memory location accessible in one bus cycle can hold 16 bits, the CPU instruction
fetch speed will degrade down to
(a) .9500 MIPS
(b) .9250 MIPS
(c) .9375 MIPS
(d) .9345 MIPS
115. In the disk storage aspect of data bases and application programs
(a) unblocked record files and locate mode I/O are faster
(b) blocked record files and locate mode I/O are faster
(c) unblocked record files and move mode I/O are faster
(d) blocked record files and move mode I/O are faster
116. Parallel printers uses
(a) RS - 232 C interface
(b) Centronics interface
(c) handshake mode
(d) all of these
117. On receiving an interrupt from an I/O device, the CPU
(a) halts for a predetermined time
(b) branches off to the interrupt service routine after completion of the current instruction
(c) branches off to the interrupt service routine immediately
(d) hands over control of address bus and data bus to the interrupting device
118. In a memory based I/O system, which of the following instruction will not be there?
(a) IN, OUT
(b) ADD
(c) LDA
(d) all of these
119. Which of the following does not affect the resolution of a video display image?
(a) Bandwidth
(b) Screen size
(c) Raster scan rate
(d) Vertical and horizontal lines of resolution
120. An advantage of magnetic input media is
(a) high speed
(b) flexibility in accessing data
(c) low cost
(d) all of these
121. NT classifies
(a) container objects
(b) non container objects
(c) both (a) and (b) above
(d) none of these
122. Magnetic tape can serve as
(a) input media
(b) output media
(c) secondary storage media
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 116
Institute for Competitive Exams
(d) all of these
123. The advantage of COM are
(a) compact size, readability
(b) compact size, speed
(c) readability size, speed
(d) low cost, readability
124. EBCDIC can code upto how many different characters?
(a) 8
(b) 16
(c) 32
(d) 256
125. The parity bit is added for which purposes
(a) coding
(b) indexing
(c) error detection
(d) updating
126. The two basic types of record-access methods are
(a) sequential and random
(b) direct and immediate
(c) sequential and indexed
(d) on line and real time
127. Which of the following types of terminals is entirely dependent for all its capabilities on the
computer system to which it is connected?
(a) Smart terminal
(b) Dumb terminal
(c) Micro computer
(d) none of these
128. Which of the following is the principal difference between a monochrome monitor and an
RGB monitor?
(a) number of electron guns
(b) resolution
(c) size
(d) cost
129. Output hardware is often categorized according to whether it
(a) is expensive
(b) requires a large amount of electricity to work
(c) produces hardcopy or softcopy
(d) can fit on a desk top
130. Which of the following does not affect the resolution of a video display image?
(a) band width
(b) raster scan rate
(c) vertical and horizontal lines of resolution
(d) screen size
131. To produce high quality graphics (hard copy) in color, you would want to use
(a) RGB monitor
(b) plotter
(c) ink jet printer
(d) laser printer
132. The technique designed to support the effective access of micro filmed data is
(a) micro fiche retrieval
(b) COM
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 117
Institute for Competitive Exams
(c) micro graphics
(d) all of these
133. Which of the following printing devices provide an output composed of a series of dots?
(a) wire-matrix printer
(b) band printer
(c) wang image printer
(d) (a) or (c) above
134. Which of the following statements is true?
(a) All hardcopy terminals use punched paper tapes
(b) Intelligent terminals provide hard copy outputs only
(c) Microfiche are always produced directly from printed outputs
(d) none of these
135. A temporary storage area, attached to the CPU for I/O operations is a
(a) channel
(b) buffer
(c) register
(d) core
136. The Josephson tunnelling device illustrates principles associated with the advanced storage
technique
(a) cryogenics
(b) CCD
(c) EBAM
(d) holographing
137. A mass storage system is a direct access device capable of storing within its array of cartridges
(a) over 500 megabytes of data
(b) almost 16 billion characters
(c) 2000 megabytes of data
(d) 472 billion characters
138. A serial card reader would be expected to be
(a) faster than a parallel reader
(b) more expensive than a parallel reader
(c) both (a) and (b) above
(d) neither (a) nor (b) above
139. MICR has made possible to
(a) cashless society
(b) checkless society
(c) credit less society
(d) none of these
140. The most common systems security method is
(a) passwords
(b) key-card systems
(c) mantrap
(d) none of these
141. Dial-back systems
(a) prevent hackers from calling the computer
(b) force the user to call the computer twice to get access
(c) require no effort by systems personnel to implement
(d) receive calls, and calls back if user is authorized
142. Supervisor state is
(a) entered by programs when they enter the processor
(b) required to perform any I/O
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 118
Institute for Competitive Exams
(c) only allowed to the operating system
(d) never used
143. Trojan-Horse programs
(a) are legitimate programs that allow unauthorized access
(b) are hacker programs that do not show up on the system
(c) really do not usually work
(d) usually are immediately discovered
144. Link encryption
(a) is more secure than end-to-end encryption
(b) is less secure than end-to-end encryption
(c) cannot be used in a large network
(d) is used only to detect errors
145. Device busy
(a) is good, since that means the device is in use
(b) is bad, since that means the device is not available
(c) is bad only if the device busy rate is too high
(d) depends upon the system paging rate
146. Interrupts per second
(a) is a good measure of the system I/O activity
(b) is a good measure of the system paging activity
(c) should never be greater than 1000/ second
(d) is higher on smaller computers
147. Control-unit busy
(a) is the same as device busy
(b) shows the availability of the path of devices
(c) can be prevented with more devices
(d) can be prevented by reducing the paging rate
148. Real-time displays
(a) are used only for capacity planning
(b) are most useful for showing performance problems
(c) are useless for capacity planning
(d) cannot show the system paging rate
149. Seeks analysis
(a) is used for analyzing paging problems
(b) is used for analyzing device busy problems
(c) is used for analyzing control-unit busy problems
(d) is only shown on real-time displays
150. A long-term monitor
(a) should show any immediate performance problems
(b) should show I/O, paging, and processor activity
(c) need show only the I/O and processor activity
(d) usually reports only on terminal displays
151. A long-term process display should
(a) show which processes used the most processor time
(b) show process activity by time interval
(c) show resources used by the most active processes
(d) all of these
152. A certain microprocessor requires 4.5 micro-seconds to respond to interrupt. Assume that the
three interrupts I1 I2, I3 require the following execution time after the interrupt is recognized. (i)
I1 requires 25 microseconds
(ii) I2 requires 35 microseconds
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 119
Institute for Competitive Exams
(iii) I3 requires 20 microseconds
I1 has the highest priority and I3 has the lowest. What is the possible range of time for I3 to be
executed assuming that it may or may not occur simultaneously with other interrupts?
(a) 24.5 microseconds to 93.5 microseconds
(b) 24.5 microseconds to 39.5 microseconds
(c) 4.5 microseconds to 24.5 microseconds
(d) 29.5 microseconds to 93.5 microseconds
153. The most difficult problem with co-processors is
(a) finding suitable applications
(b) keeping all processors busy
(c) managing shared resources
(d) the cost
154. Applications
(a) cannot run on multiple processors
(b) immediately run on multiple processors
(c) must usually be re-compiled to use multiple processors
(d) can always be made efficient on multiple processors
155. Multiple processor configurations
(a) are more efficient than scalar configurations
(b) are less efficient than scalar configurations
(c) work equally well on all applications
(d) are very efficient, but only. on some applications
156. Resources are managed
(a) with each processor equally
(b) by only one processor
(c) by sophisticated locking mechanisms
(d) more easily with multiple processors
157. A file server uses a form of locking as a concurrency control technique. When a tile is locked
by a client, all attempts to use or lock the file by other clients are prevented by the server. A
potential problem exists if a client requests a lock on a file and then crashes. This situation could
result in the file being locked indefinitely. To prevent this from occurring, the file server starts a
time whenever it sets a lock. If the timer runs out before the file is unlocked the server assumes
that the client has crashed and releases the lock. Which of the following is (are) true of this
strategy?
I. It provides a solution to the problem of preventing indefinite lockout.
II. It may result in interleaved access to a file by two or more clients.
III. It will guarantee mutual exclusion
IV. It will fail to guarantee the prevention of indefinite lockout
(a) I only
(b) I and II
(c) I and III
(d) II and IV
158. Domain of protection is
(a) process
(b) objects
(c) both (a) and (b) above
(d) none of these
159. Window NT
(a) security model is based on the notion of user accounts
(b) creates a security access token that includes the security ID for users
(c) NT operates with client server model
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 120
Institute for Competitive Exams
(d) all of these
160. In MULTICS
(a) has segmented address space
(b) each segment is file
(c) segment is associated with the rings
(d) all of these
161. Domains are represented by
(a) rows
(b) columns
(c) tables
(d) all of these
162. Objects are represented by
(a) rows
(b) columns
(c) tables
(d) none of these
163. Contents of the access matrix entries requires
(a) copy
(b) columns
(c) control
(d) all of these
164. Hydra
(a) is a capability based protection system
(b) provides considerable flexibility
(c) both (a) and (b) above
(d) none of these
165. A hydra
(a) subsystem is built on top of its protection kernel and may require protection of its own
components
(b) is memory management device
(c) is used in interfacing
(d) all of these
166. CAP
(a) is simpler and less powerful than that of hydra
(b) is complex and less powerful than that of hydra
(c) is simple and greater power than that of hydra
(d) none of these
167. Capability of CAP is
(a) data capability
(b) software capability
(c) both (a) and (b) above
(d) none of these
168. Software capability
(a) is protected by CAP microcode
(b) it is not interpreted by microcode
(c) it is interpreted by protected procedure
(d) all of these
169. Main motto of CAP system is
(a) use of software capability has allowed them to relative considerable economics in formulating
and implementing protection policies
(b) system provides him with no library of procedures to be used
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 121
Institute for Competitive Exams
(c) both (a) and (b) above
(d) none of these
170. Security violation due to
(a) malicious
(b) accidental
(c) both (a) and (b) above
(d) none of these
171. Malicious access are
(a) unauthorized reading of data
(b) unauthorized modification of data
(c) unauthorized destruction of data
(d) all of these
172. Physical level
(a) computer systems must be physically secured against armed or surreptitious entry by intruders
(b) users must be screened carefully so that the chance of authorizing a user who then gives access
to an intruder
(c) both (a) and (b) above
(d) none of these
173. Human level
(a) computer system must be physically secured against armed or surreptitious entry by intruders
(b) users must be screened carefully so that the chance of authorizing a user, who then gives access
to an intruder
(c) both (a) and (b) above
(d) none of these
174. A major security problem for operating system is
(a) authentication problem
(b) physical problem
(c) human problem
(d) none of these
175. The most common approach to authenticating a user identity is
(a) user passwords
(b) user log in
(c) hardware device
(d) none of these
176. In one time password
(a) the password is different in each instance
(b) the password is same in each instance
(c) both (a) and (b) above
(d) none of these
177. Program threats are
(a) Trojan Horse
(b) trap doors
(c) both (a) and (b) above
(d) none of these
178. Trojan Horse
(a) A code segment that misuses its file is called Trojan horse
(b) good for file accessing
(c) both (a) and (b) above
(d) none of these
179. Trap door
(a) could be included in a compiler
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 122
Institute for Competitive Exams
(a) pose a difficult problem because, to detect them
(c) both (a) and (b) above
(d) none of these
180. Worm
(a) is a process that uses the spawn mechanism to clobber system performance
(b) spawns copies of itself, using up system resources and perhaps locking out system use by all
other processes.
(c) both (a) and (b) above
(d) none of these
181. Worm was made up
(a) one program
(b) two programs
(c) three programs
(d) all of these
182. Two programs of worm are
(a) grappling hook program
(b) main program
(c) both (a) and (b) above
(d) none of these
183. Boot strap or vector is called
(a) grappling hook program
(b) main program
(c) secondary program
(d) primary storage
184. Viruses
(a) another form of computer attack is virus
(b) virus are designed to spread into other programs and can wreak havoc in a system
(c) it modifying or destroying files and causing system crashes and program malfunctions
(d) all of these
185. Viruses
(a) are usually spread by users downloading viral programs from public bulletin boards or
exchanging floppy disks containing an infection
(b) are beneficial for program
(c) both (a) and (b) above
(d) none of these
186. Protection against computer viruses is
(a) prevention
(b) practice of safe computing
(c) purchasing unopened software from vendors
(d) avoiding free or pirated copies from public sources
187. Threat monitoring technique is
(a) the system can check for suspicious patterns of activity in an attempt to detect a security
violation
(b) a time sharing a system that counts the number of incorrect passwords given
(c) both (a) and (b) above
(d) none of these
188. The security of a system can be improved by
(a) threat monitoring
(b) audit log
(c) both (a) and (b) above
(d) none of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 123
Institute for Competitive Exams
189. An audit log
(a) simply records the time
(b) user
(c) type of all access to an object
(d) all of these
190. Audit log can be used to
(a) determine how and when the problem occurred
(b) what amount of damage was done
(c) when security has been violated
(d) all of these
191. A fire wall
(a) is a computer or router that sits between the trusted and untrusted
(b) it limits network access between the two security domains and maintains and logs all
connections
(c) a firewall may need to allow http to pass
(d) all of these
192. Encryption
(a) is one common method of protecting information transmitted over unreliable links
(b) in crypted information is accessed by an unauthorised person or program, it will be useless
unless it can be decoded.
(c) both (a) and (b) above
(d) none of these
193. Lowest level of security system is
(a) A
(b) B
(c) C
(d) D
1
11
21
31
41
51
61
71
81
91
101
111
121
131
141
151
161
171
181
191
c
b
c
c
c
c
d
c
c
a
d
d
c
b
d
d
a
d
b
d
2
12
22
32
42
52
62
72
82
92
102
112
122
132
142
152
162
172
182
192
d
d
d
b
d
d
d
a
a
b
d
b
d
c
c
a
b
c
c
c
Computer and IT
3
13
23
33
43
53
63
73
83
93
103
113
123
133
143
153
163
173
183
193
a
c
d
c
a
c
b
b
a
d
b
a
b
d
a
b
d
b
a
d
4
14
24
34
44
54
64
74
84
94
104
114
124
134
144
154
164
174
184
b
b
d
a
a
b
d
a
b
d
c
c
d
d
b
c
c
a
d
Answers
5
d 6
15
c 16
25
b 26
35
a 36
45
a 46
55
c 56
65
b 66
75
a 76
85 c 86
95
a 96
105 d 106
115 b 116
125 c 126
135 b 136
145 c 146
155 d 156
165 a 166
175 a 176
185 a 186
b
c
a
a
b
c
c
b
a
a
b
d
a
d
a
c
a
a
d
7
17
27
37
47
57
67
77
87
97
107
117
127
137
147
157
167
177
187
b
b
d
b
c
d
c
d
a
d
b
b
b
d
b
a
c
c
c
8
18
28
38
48
58
68
78
88
98
108
118
128
138
148
158
168
178
188
c
a
a
b
d
c
c
d
b
c
b
a
a
a
b
c
d
a
a
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
9
19
29
39
49
59
69
79
89
99
109
119
129
139
149
159
169
179
189
a
a
c
c
a
a
c
a
c
c
b
b
c
a
b
d
c
c
d
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
a
d
c
b
a
b
d
b
c
b
a
d
d
a
b
d
c
c
d
Page 124
Institute for Competitive Exams
Systems Analysis, Design and MIS
1. Define system and sub-system.
Ans. A system can be defined as an organised grouping of interdependent functioning units or
components, linked together - according to a plan, to achieve a specific objective.
We do make use of a number of systems namely, the transportation system, telephone system,
accounting system, production system; business system, computer system in our day-to-day life. A
system may consist of interrelated departments or subordinate departments. These sub-ordinate
departments are known as its sub-systems. Each sub-system is a part of a larger system.
2. What do you mean by real time system? Give some examples.
Ans. Data is received, processed and results are given so fast that the process seems instantaneous
to the user. Such a system is named as real time system. Some examples of real-time systems are
the following:
(a) Airplane control and space vehicle operations
(b) Nuclear thermal power plant
(c) Automated factory
(d) Equity sales/purchase on National Stock Exchange
3. What is Joint Application Development (JAD)?
Ans. Joint Application Development (JAD) is a structured process in which users, managers, and
analysts work together in the design and development of an application. All this is done through a
succession of collaborative workshops called JAD sessions.
4. What does the term 'Prototyping' means?
Ans. Prototyping is another system development methodology. In fact, prototype is a working
model which is based on interaction between analysts and users, built as a preliminary solution to
a problem.
A prototype is built, tested and then reworked as necessary until an acceptable prototype is finally
achieved from which the complete system or product can be developed.
5. What do you mean by distributed computing system?
Ans. A configuration in which many independent computer systems are connected by
communication networks and in which computers co-operate among themselves to execute a
particular job using data and other resources distributed at multiple sites is thus working as a
distributed computing system.
6. Who is a system analyst? What is his/her role in an organization?
Ans. The system, analyst is the person (or persons) who guides the analysis, design, implement
and maintains a system under development or an existing system. In performing these four tasks,
the analyst must always match the information system objectives with the goals of the
organization. The role of a system analyst are the following:
(a) Defining IT needs of the Organization.
(b) Setting Priorities among different types of IT Requirements
(c) Gathering Data or Facts
(d) Analyzing and Evaluation
(e) Problem Solving
(f) Drawing Specifications
(g) Designing System
(h) Evaluating System
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 125
Institute for Competitive Exams
7. List any five duties performed by a system analyst.
Ans. System analyst has the following duties to perform:
(a) Estimates personnel requirements, cost and time for system's implementation.
(b) Reviews and approve proposed system's solutions.
(c) Performs resource planning and scheduling for system's personnel.
(d) Develops, implements and enforces procedural standards for performing tasks of system
analysis and design.
(e) Evaluates performance of system's personnel and reports on personnel activity to management.
8. Why system analysts are called:
Ans. System analysts are called:
(a) Catalysts, because they assist management and operational personnel in defining what they
wish to change.
(b) Problem Solvers, because they analyse and give solutions to problems.
(c) Detectives, because they search for reasons why existing systems are unsatisfactory.
(d) Architects, because they design new systems.
(e) Technicians, because they have knowledge and skill in areas such as design, programming,
data organization and telecommunications.
(f) Imposers, because they enforce standards and procedures necessary to accomplish change.
(g) Educators, because they plan for user orientation and training of new systems.
9. What are the desirable attributes of a system analyst?
Ans. To be effective, a system analyst must have the following attributes or characteristics.
(a) Knowledge of an Organization
(b) Knowledge of Computer Systems and Software Packages
(c) Good Inter-personal Relations
(d) Ability to Communicate
(e) An Analytical Mind
10. What do you mean by implementation and evaluation of the system?
Ans. Implementation is the final phase of system development. It consists of installing hardware,
software, collecting data and organizing and educating people to interact with and run the new
system.
Once the system is implemented, it should be evaluated. Evaluation is the process of verifying the
capability of a system, after it is put in operation, to see whether it is meeting the required
objectives or not.
11. Differentiate between System Analysis and System design.
Ans.
System Analysis
System Design
a. System analysis is the examination of the
System design is the creation of the information
problem
system which is the solution to the problem.
b. It is concerned with identifying all the
It is concerned with the coordination of the
constraints and the influences.
activities, job procedures and equipment
utilization in order to achieve system goals.
c. It deals with data collection and a detailed
It deals with general design specification,
evaluation of present system
detailed design specifications, output, input,
files and procedures.
12. What is documentation? Name the different types of documentation needed in an
Organization.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 126
Institute for Competitive Exams
Ans. Documentation is a description of the system used to communicate, instruct and record
information for historical, operational or reference purposes. Documents are very important
because they represent the formal information flow of the present system. Documentation
establishes and declares the performance criteria of a system and provides an explanation of how
the system can be used. Different types of documentation needed, are:
(a) Design Documentation
(b) Program Documentation
(c) Training Documentation
(d) Operations Documentation
(e) User Reference Documentation
13. Write short notes on
Ans.
(a) Development of Software:
Development is the phase where detailed design is used to actually construct and build the system.
In this phase, the system is actually programmed. Now, the analyst should decide; whether to buy
a commercial software or to develop new customized programs with the help of programmers. The
choice depends on the cost of the software and the cost of programming such software. In large
organizations the work is entrusted to programmers, whereas in small organizations, the job is
assigned to outside organizations.
(b) Development of Prototype
A prototype is a model of the final system. The purpose of a prototype is to allow the user to see
something concrete. It is very difficult to form an idea of the features of a system from a set of
written specifications, particularly for the user. The prototype shows the user how some part of the
system will look. The system that is developed at a high cost may fail in certain situations. To avoid
this, the analyst should design a mini-system similar to the one to be developed. This prototype
acts as a test system. If this system is successful, the analyst can start designing the actual system.
14. What is system development life cycle (SDLC)? Name first three phases of SDLC.
Ans. The period of time that begins when a system is conceived and ends when a system is fully
operational for use and put to maintenance is called the "development life cycle of a system".
(a) Preliminary Investigation (Problem Formulation)
(b) Feasibility Study
(c) System Analysis
15. Write short note on Maintenance of a System.
Ans. Maintenance is the process of incorporating changes in the implemented existing system for
proper utilization. This involves enhancement (adding new functions or additional capabilities to
the system), adaptation (customizing the software to run in the new environment) and correction
(correcting the bugs in the existing software and making it bug free).
16. What is system testing.
Ans. Testing is the process of making sure that the computer programs perform the intended
tasks. Once the system is designed, it should be tested for validity. During testing, a system is used
experimentally to ensure that the software does not fail, i.e. it will run according to its specification
and in the way users expect it to run.
The system is tested with special test data and the results are examined for their validity. Some of
the users may be permitted to operate on the system so that the analyst can ascertain that the
system can work in the specified environment.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 127
Institute for Competitive Exams
17. What do you mean by 'system requirements analysis'?
Ans. System requirements analysis is finding out the reasons and specifications for a new system.
Once the system analyst has determined that a problem exists and has obtained permission to do
something about its solution, then the requirements analysis would begin.
Requirements analysis for the new system should identify the user requirements first. This will
enable the new system under design to be more user friendly rather than designer friendly.
18. What is Business Process Re-engineering?
Ans. Business process re-engineering is the popular term for optimization of organizational
processes and structures following the introduction of new information technology into an
organization.
19. Explain the term cost benefit analysis.
Ans. Cost-benefit analysis is a tool for evaluating the effectiveness of the project. It may be used by
the management to decide as lo what extent benefits outweigh the costs. The costs associated with
the proposed business system are the expenses arising from developing, installing, training and
implementing the system. The benefits are the advantages gained, including money saving, from
implementing the proposed system.
20. What do you mean by Questionnaire?
Ans. Questionnaires are special-purpose documents that allow the analyst to collect information
and opinions from respondents. When it is impossible because of time, distance or cost constraint,
to interview all the desired people involved in a system, then the analyst may consider the use of a
questionnaire. This is a more structured and formal method of collecting facts, but may be the only
viable option where there are a larger number of dispersed users.
21. Why feasibility study is important? Give reason for this purpose.
Ans. Feasibility study is a procedure that identifies, describes and evaluates the newly developed
systems and selecting the best system for this job. The objective of a feasibility study is to acquire a
sense of its scope for solving the problem. During the study, the problem definition is crystallized
and all aspects of the problem to be included in the system are determined as well as the size of the
project is also determined. Costs and benefits are also estimated with greater accuracy at this
stage. The result of feasibility study is simply a report—a formal document detailing the nature and
scope of the proposed solution.
22. What is presentation? What are advantages of presentation?
Ans. Presentation is the activity of communicating, findings, recommendations and the
documentation for review by interested users and managers. Presentations may be either written
or verbal. Presentations have the following advantages:
(a) Sometimes, people are not very forthcoming with comments and it is easier for them to
respond to a presentation than to explain the entire procedure.
(b) Presentations give the analyst an idea of how correct is the perspective that he has gained.
(c) Presentations give the user an understanding and confidence in the analyst's understanding of
the situation.
23. What do you mean by interviews? Explain different types of interview.
Ans. Interview is a fact-finding technique where the system analyst who acts as a interviewer
collects facts from individuals (interviewees). The respondents (interviewees) are generally current
users of the existing system or potential users of the proposed system. The respondents may be
managers or employees who provide data for the proposed system or those who will be affected by
it. There are two types of interviews.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 128
Institute for Competitive Exams
These are:
(a) Unstructured: Unstructured interview is an approach in which the questions and the
corresponding responses are open-ended. The interviewer can ask questions which may not be
directly related to the system under consideration.
(b) Structured: In structured interview, the interviewer has a specific set of questions to ask
from the interviewee. All these questions are prepared in advance and the answers are noted.
24. What is a decision tree?
Ans. A decision tree is a graphical technique that presents conditions and actions sequentially and
thus shows which condition to consider first and which one to consider next.
25. What is DFD? Explain the symbols used in a DFD.
Ans. Data Flow Diagrams (DFD) provide the logical model of the system. They show the flow of
data as well as the flow of logic involved. Four symbols used in drawing dataflow -diagrams are as
follows:
(a) External Entities (Source or sink): An external entity is a source or a destination of data.
External entities are represented by rectangles.
(b) Dataflow: Data flow diagram shows how data travels from one point to another point in the
diagram. The flow is shown as line with the arrowhead showing the direction of flow.
(c) Processes: Processes that show the transformation of input data flows to output data flows; It
is also known as Bubble or Transform. A rectangular box or circle denotes a process.
(d) Datastore: A data store is like a warehouse for data. It may be a card index, a database file or
a folder in a filing cabinet. Processes may store or retrieve data from a file.
26. What are the pre-requisites of a well design form used for business report?
Ans. Some pre-requisites of a well designed form are as follows:
(a) Descriptive Headings
(b) Maximum Readability
(c) Logical Flow of Information
(d) Physical Attributes
(e) Sufficient Instructions for the user
27. Name the two basic structure provider for graphical user interface (GUI). How
do they differ?
Ans. The two basic structure provider for graphical user interface (GUI) are:
(a) Computer Operating System
(b) Internet Browser
Application programs provide GUI interface either within the operating system or within the
Internet Browser. In client/server applications, the user interface is executed within the client
operating system. But Internet and Intranet applications are run in Web browsers. Most Web
browsers run in many operating systems. Hence, an application that is developed to run on a Web
browser is portable across multiple operating systems. Hence, such applications are not dependent
on the computer in which it is running. It can run on any computer employing any operating
system.
28. Mention the factors that need to be considered while designing reports.
Ans. The reports generated using computerized systems may fall short of the expectation of the
user or the management. The factors to be considered in Report Design are the following:
(a) Completeness
(b) Appropriateness
(c) Method of Presentation
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 129
Institute for Competitive Exams
(d) Timing and Frequency
29. What do you understand by the terms coupling and cohesion in a modular
system design?
Ans. Coupling refers to the strength of relationship between modules in a system. Coupling can be
one of the following two types:
(a) Data couple
(b) Control couple
The term cohesion is used to denote the intramodule strength. It is a relationship among elements
within a module. A system designer should aim at minimizing coupling and maximizing cohesion
to get a modular design.
30. What do you mean by Top-down Design and Bottom up design?
Ans.. Top-down design is the technique of breaking down a problem into the major tasks to be
performed into smaller tasks. Each of these tasks is then further broken down into separate subtasks, and so on until each sub-task is sufficiently simple to be written as a self contained module
or procedure. The program then consists of a series of simple modules.
When faced with a large and complex problem, it may be difficult to see how the whole thing can
be done. It may be easier to solve smaller parts of the problem individually, taking the easier
aspects first and thereby gaining the insight and experience to tackle the more difficult tasks, and
finally bolt them all together to form the complete solution. This is called a bottom-up approach.
31. What is the system acceptance test? What are the three levels of acceptance
testing?
Ans. System acceptance test is the test by which the end-users, management and information
system operations management will either accept the system or reject the system. A system
acceptance test is the final test performed by the end-users applying real data over a certain
period. It is an extensive test that addresses three levels of acceptance testing. These are:
Verification testing: In verification testing, the system is run in a simulated environment using
simulated data.
Validation testing: In Validation testing, the system is run in a live environment using real data.
This is sometimes called as beta testing.
Audit Testing: Audit Testing certifies that the system is free of errors and is ready to be placed
into operation.
32. Who are the key role players in the System testing process?
Ans. The key role players in System testing process are the system
analysts, owners, users and builders. The system analyst typically communicates testing problems
with the project team members. The system owners and the system users hold the ultimate
authority whether a system is operating correctly or not. System builders are involved in the
testing process. System builders include the application programmers, database programmers and
networking specialists. They are needed to solve problems that arise during the testing phase.
33. What do you mean by conversion methods? Name the conversion methods.
Ans. Conversion is the process of changing from the old system, which is currently running in the
organization, to the newly built system. There are four methods of handling the system conversion.
These are:
(a) Parallel-Systems Method
(b) Dual System Method or Phase-In Method
(c) Direct Cut-Over Method
(d) Pilot Approach Method
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 130
Institute for Competitive Exams
34. What do you mean by benchmark?
Ans. A benchmark is a sample program used for evaluating the performance of computer-based
systems.
35. Explain the following testing methods in brief.
Ans.
(a) Unit Testing: Individual functions or procedures are tested to ensure that they are operating
correctly. Each component is tested individually.
(b) Module Testing: A module is a collection of dependent components such as an object class,
procedures and functions. A module encapsulates related components so that it can be tested
without other system modules.
(c) Sub-system Testing: Sub-system testing involves testing a collection of modules which have
been integrated into sub-systems. Note that subsystems may be independently designed and
implemented. The most common problem which arises in large systems is the interfacing of the
sub-systems. The sub-system test process - should therefore concentrate on the detection of
interface errors by rigorous testing.
(d) System Testing: The sub-systems are connected together to make the whole system. System
testing process is concerned with finding such errors which do result from interactions/interfacing
among sub-systems. System testing would be concerned with checking that the system meets the
organization's objective.
36. Differentiate between White box testing and Black box testing.
Ans. White-Box Testing is concerned with the implementation of the
program. In this type of testing, different programming and data structures used are tested for
proper operations. This test concentrates on the examination of the coding. The system software
engineers and programmers coin test-cases and test data. The system designer creates test-cases
that have the likelihood of finding out possible errors.
Black-Box Testing is concerned with the proper testing and execution of the program
specifications. In this type of testing, each function or sub-program used in the main program is
first identified. For example, in a payroll system Calc_grosspay (), Print_payslips () may be the
functions, used to calculate grosspay and printing of payslips.
37. Explain in brief Alpha testing and Beta testing or regression testing.
Ans. Tests performed at the developer's site before the system is finally installed in the real
working environment (user's site) is known as Alpha testing. It involves testing the system with
live data supplied by the organization rather than by the test data used by system designer.
In Beta Testing, the system is delivered to a number of potential users who agree to use that
system and provide feedback to the designers. Testing should be repeated if any modification is
done based on the feedbacks given by the users. Hence, it is sometimes called as regression testing.
38. What do you understand by the term audit trail?
Ans. An audit trail is designed to permit tracing of operation, whether it is related to insertion,
deletion or updation of records or processing performed on the computer system. In audit trail, all
the operations that a user performs during a log-in session are noted. When a user logs in, the
system records the user's account number and associates it with the terminal from which the user
logged in. All operations done from that terminal are attributed to that user account number, till
the user logs off.
39. What is the difference between security and privacy? Do secure systems ensure
privacy? How can privacy be ensured in an information system?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 131
Institute for Competitive Exams
Ans. Security is concerned with protecting data and software packages of an organization. On the
other hand, privacy is concerned with the preservation of data belonging to the individual. For
example, data on payroll is secure if it is safeguarded against fire, flood, corruption etc. But privacy
of individual's information is not secure if an unauthorized person can access or modify this
information without his/her knowledge or permission.
Privacy can be ensured by providing legal protection to individual's data, requiring an individual's
written permission to modify his/her information. Systems must be so designed that the privacy
rights of people whose records are stored in the system are safeguarded.
40. Explain in brief the Object-Oriented Analysis.
Ans. In Object-Oriented analysis, we identify objects, which are the building blocks of the project
to be developed. We perform Analysis using these objects. In the module-oriented approach we
consider in terms of building one large system. In the Object Oriented Analysis, we identify objects
as independent entities with their own local goals. These independent objects are then unified to
achieve the global goal of the large system.
41. Define Object Modelling.
Ans. An Object Model is defined as a collection of principles that form the foundation of objectoriented design; a software engineering paradigm emphasizing the principles of abstraction,
encapsulation, modularity, hierarchy, typing, concurrency and persistence.
42. Explain in brief the term Project Management?
Ans. Project Management includes identifying the activities that need to be done to complete a
project successfully. It needs a plan to handle the unforeseen events that inevitably occur in a large
project. Economic, political and personnel factors are taken into account in order to produce a
successful project.
43. Who is Project Manager?
Ans. A project manager is the key person responsible for project management. He/she must have
the ability to motivate the .staff, adapt to changing requirements, possess good communication
skill arid has commitment to planning and understanding of technical problems.
44. Why systems fail inspite of careful planning?
Ans. In many cases, systems fail even though the design of the system is good. Most systems fail
because of one or more of the following reasons:
(a) Lack of user-involvement or change of requirements.
(b) Contradictory objectives.
(c) Inexperienced development-team.
(d) Delay in implementation.
45. Explain in short the following project team structures:
Ans.
(a) Hierarchical team structure: In this, the team is structured along a traditional hierarchy
of authority. Top-level problem solving and internal team coordination are managed by a team
leader. Communication between the team leader and the team members is vertical. That is, all the
team members will address to the team leader.
(b) Chief programmer team structure: This team structure consists of a chief programmer, a
backup programmer and support panel. The chief programmer is responsible for the functional
structure of the programming system and writes the most difficult system programs. In addition, a
librarian programmer is also included to write documentation.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 132
Institute for Competitive Exams
(c) Adaptive team structure: Adaptive teams work by distributing the work among people
other than the programmer. Here, individuals with particular skills may be called upon for
particular aspects of a task. The team is called adaptive because the members change as new skills
are called for. This team structure is ideal when innovation or technical breakthrough is required.
It is well-suited for solving complex problems but may not perform as efficiently as other teams.
46. Define Management Information System (MIS).
Ans. MIS is the information system(s) developed by an organization to run its management
system (comprising management functions, business functions and decision making processes)
most efficiently and effectively. The MIS may be manual or computerized or a hybrid of- the two. It
may be stand-alone, department-wise or it may be integrated for all/some departments at a
geographical location. It may as well be integrated for the entire or some parts of organization at
different geographical locations.
SAD Multiple Choice
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 133
Institute for Competitive Exams
I. Multiple Choice Questions SET 1
1. The components that constitute a system are:
a. boundary
b. description
c. environment
d. none of these
2. The trend in data processing systems is towards
a. distributed processing
b. real-time processing
c. remote processing
d. none of these
3. Transaction Processing is called On-Line if a transaction
a. is processed as soon as it enters the system. b. is processed in discrete lots.
c. is processed in a running system.
d. none of these
4. A distributed data processing system
a. attempts to capture advantages of both centralized and decentralized processing.
b. does NOT allow greater flexibility.
c. provides slow access to data.
d. none of these.
5. An Automatic Teller Machine (ATM) represents
a. an on-line Banking system
b. a dedicated PC based system
c. a combination of batch-cum-on-line system d. none of these.
6. "Back up" refers to
a. delays in production of outputs
b. accumulation of programs in memory
c. job scheduling failures
d. none of these
7. Hardware means
a. computer equipment or machines.
b. instructions or programs.
c. raw facts or figures.
d. none of these.
8. Pseudo code is
a. false logic
b. programming aid
c. both (a) and (b)
d. neither a nor b
9. Open systems interact with the
a. boundary
b. environment
c. control
d. closed system
10. Among the three basic sub-systems of any industrial organization, we have only
a. marketing
b. manufacturing
c. finance
d. all of the above
11. If the requirements analysis phase of a software development project is not conducted properly
then the
a. resulting system would be delivered before time.
b. output reports would be indecipherable.
c. system might fail to address the real needs of users
d. All of the above.
12. Tangible benefits by their very nature, require
a. Subjective evaluation
b. Quantifiable evaluation
c. Feasible evaluation
d. None of these
13. Whether a system can provide right information for organization's personnel falls under study
of
a. Economic feasibility
b. Operational feasibility
c. Technical feasibility
d. All of the above
14. In considering the total cost associated with desired information, cost of data collection, data
input and computer processing costs are
a. one time
b. temporary
c. permanent
d. recurring
15. Cost of error correction is least at which stage?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 134
Institute for Competitive Exams
a. Requirement analysis
c. Development
b. Design
d. Implementation
II. Fill in the Blanks out of the following:
a. batch
b. distributed processing c. planning
d. environment
e. real-time processing
f. system boundary
g. user interface
h. finance
i. control
j. bar
k. JAD
l. feedback
1. The three basic sub-systems (business functions) of any industrial organization are Marketing,
Manufacturing and processing _____.
2. In _____ processing, the data are gathered for a period and collected into a group before they
are entered into a computer and processed.
3. The trend continues towards more _____ for Management Information System.
4. _____ is the hardware/software boundary that permits communication between people and
computers.
5. _____eliminates many of the problems associated with traditional meeting.
6. Gantt chart is a _____ tool for managing projects.
7. Open systems interact with the _____.
8. A gantt chart is fundamentally a _____ chart.
9. The components that make up any system constitute what is known as _____.
10. _____ is information on how well a system is performing.
Answers SET 1
I. 1. a
6. d
11. c
2. a
7. a
12. b
3. a
8. b
13. b
4. a 5. a
9. b 10. d
14. d 15. a
II.
1. h
6. c
2. a
7. d
3. b
8. j
4. g
9. f
5. k
10. l
I. Multiple Choice Questions SET 2
1. Information is
a. Data
b. Processed data
c. Manipulated input
d. Computer
output
2. System analyst is
a. Agent of change
b. Communicator
c. Problem solver
d. All of the
above
3. Pay image file is
a. A master file for the payroll system
b. A replica of the monthly pay slip
c. Not related to the payroll system
d. none of these
4. In a supermarket, which of the following, will be found in use in its computerized system
a. Scanner
b. Bar coder
c. POS terminal
d. All of the
above
5. Which of the following is a transaction file?
a. Voucher file
b. Purchase order file
c. Invoice file
d. All of the
above.
6. On-line Data entry is most suitable in
a. Entering monthly journal entries
b. Payroll master updation
c. Processing payment of cheque in a bank.
d. None of these.
7. The basic objective of system analysis is to
a. Understand computer hardware by opening the System unit
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 135
Institute for Competitive Exams
b. Train managers in mathematical analysis
c. Run simulation programs
d. Understand a complex system and modify it in some way.
8. One of the main differences between the responsibilities of a system analyst and a programmer
is
a. Programmers use lower level languages whereas Systems Analysts use higher level languages.
b. Programmers deal with computer programs whereas a System Analyst deals with many more
things such as identifying opportunities for computerization, designing new procedures, selection
of equipment, etc.
c. System Analyst is concerned with accounting function whereas a programmer is concerned with
computers.
d. Programmer's responsibility is to train Systems Analysts in PC usage.
9. A data model represents
a. All the types of data and their associations that are relevant to the system.
b. A sample set of data.
c. All facts related to the existing system.
d. All the processes of the system along with the sequence in which they are executed.
10. Which criterion of a real-time system makes it different from an interactive system?
a. Data gathering from internal environment
b. Response time limited by strict time
constraints
c. Information transfer to external world
d. None of these.
II. Fill In the Blanks out of the following:
a. Distributed
b. Documentation
c. isolation
d. user requirement
e. communication
f. Real time
g. environment
h. imaginative
i. closed system
j. programming aid
k. Architect
l. Gantt chart
1. System boundary separates the system from its _____.
2. Sub-systems cannot function in _____.
3. Manuals, forms and other descriptive information, that portray the use and/or operation of a
system, are called _____ of the system.
4. _____ processing shares resources between computer users.
5. _____ is a planning tool for managing projects.
6. System analyst must be creative and _____.
7. The most important and difficult task of an analyst is to understand _____.
8. System analyst is also called _____ because he designs new system.
9. Interface is the hardware/software boundary that permits _____ between people and
computers.
10. Pseudocode is _____.
Answers
I.
1. b
2. d
3. d
4. d 5. b
6. c
7. d
8. b
9. a 10. b
II.
1. g
2. c
3. b
4. a 5. l
6. h
7. d
8. k
9. e 10. j
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 136
Institute for Competitive Exams
I. Multiple Choice Questions SET 3
1. .The next major step before system design and after feasibility study is
a. Analysis activity
b. Equipment selection activity
c. Implementation activity
d. none of these
2. The first step in the SDLC is
a. Preliminary investigation and analysis.
b. System design.
c. Database design.
d. None of these.
3. In a Passenger Seat Reservation System, which of the following is the most critical?
a. Ease of programming b. Response time
c. GUI
d. None of these.
4. The detailed study/investigation of the present system is frequently referred to as
a. System planning
b. System analysis
c. Feasibility study
d. none of these
5. Tactical information is
a. haphazard
b. well organist
c. unstructured
d. partly
structured
6. In Data Processing, Classifying, Calculating and Summarizing data are associated with
a. capturing of input data b. manipulation of data
c managing output results d. None of these
7. The present trend in data processing systems is
a. Distributed processing b. Remote processing
c. Real-time processing
d. none of these
8. The System Development phase associated with creation of test data is
a. Systems analysis
b. Physical design
c. System acceptance
d. Logical
design.
9. On-line data entry is preferable to batch data entry because
a. it ensures better accuracy of input.
b. it is faster.
c. it reduces human efforts in checking control totals, checklist etc.
d. All of the above.
10. Prototype is a
a. mini model of the existing system
b. mini model of the proposed system
c. working model of the existing system
d. none of these
II. Fill in the Bionics out of the following:
a. Flexibility
b. Budget
c. Detailed
d. Real time
e. Closed system
f. Debugging
g. Menu driven
h. Enhancement
i. vouchers
j. Analysis activity
k. Testing
1. prototyping
1. _____is the process of making sure that the programs perform the intended tasks.
2. _____ implies adding new functions or additional capabilities to the system.
3. _____ refers to the capability of the system to adapt to changing environmental factors.
4. The next major step before system design and after feasibility study is _____.
5. _____ allocation is a management decision.
6. An information system is a _____.
7. _____ implies correcting the bugs in the existing software.
8. The _____ investigation of the present system is referred to as system analysis.
9. _____ is the creating, developing and refining a working model of the final Operational System.
10. _____ are used for recording expenses and are proof that transactions have occurred.
Answers
I. 1. a 2. a
II. 1. k 2. h
3. b
3. a
Computer and IT
4. b
4. j
5. d 6. b
5. B 6. e
7. a
7. f
8. c
8. c
9. b
9. l
10. b
10. i
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 137
Institute for Competitive Exams
Programming with C
1. What is the difference between opening a file in ‘w+’ mode and ‘a+’ mode in C?
Ans. ‘w+’ mode opens a new file for reading and writing operations. If the file already exists, its
contents are destroyed. If the file does not exist, a new file is created.
‘a+’ mode opens a file for reading and appending operations and creates the file if it does not exist.
You can read data anywhere in the file, but you can write data only at the end-of-file.
2. What are the different functions used for dynamic memory allocation in C?
Ans. In dynamic allocation, the required memory size is allocated while program is being
executed. There are four dynamic memory allocation functions. These functions are:
(a) malloc() (b) calloc() (c) realloc() (d) free()
3. What is the difference between malloc() and calloc() functions?
Ans. The function malloc() allocates a specified number of bytes in main memory. The allocated
region is not filled with zero. The starting address is returned if the function is successful. A zero is
returned if the function fails to allocate sufficient memory. To assign sufficient memory for x, we
can make use of the library function malloc(), as follows:
x = malloc(10 *size of(int))
This function reserves a block of memory whose size (in bytes) is equivalent to 10 times size of an
integer.
This function is similar to malloc(), but it initializes the allocated byte to zero. This function allows
us to allocate memory for more than one object at a time. The starting address of the area is
returned if the function is successful. A zero is returned if the function’s attempt to get a block of
memory fails. The general declaration of the calloc() function is:
char *calloc(number of items, item_size)
4. What is the purpose of the typedef feature?
Ans. Using the keyword typedef, we can rename basic or derived data types, giving them names
that may suit our application of make our program look simpler.
5. What is the difference between the break statement and the continue statement?
Ans. The break statement causes an immediate exit from the inner most loop structure. If we need
to come out of a running program immediately without letting it to perform any further operation
in a loop, then we can use break control statement. The general format of the break statement is:
break;
The continue statement is used to repeat a set of statement again even if the statements contains
an error. The syntax of the continue statement is: continue;
6. What do you mean by Escape sequence?
Ans. An escape sequence provides special formatting control. An escape sequence consists of a
backslash (\) followed by a single character. Some characters such as line feed, form feed, vertical
tab, alert etc. cannot be typed through the keyboard. Such invisible characters can be made to be
understood by the C compiler through the use of execution characters or escape sequences.
7. What is a function as define in C language?
Ans. A function is a routine or set of instructions that perform a specific task and can be processed
independently. A function can be thought as a “blackbox” to which one or more input values are
passed and output values are then returned automatically.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 138
Institute for Competitive Exams
8. Write a program to print Fibonacci series.
Ans.
/* To print Fibonacci series */
#include<stdio.h>
#include<conio.h>
main()
{
long int a = 0;
long int e = 1;
long int b = 1;
int n, c = 1;
clrscr();
printf(“How many numbers you want in the series ?”);
scanf(“%d”, &n);
do
{
printf(“%d\n”, b);
b = e+a;
a = e;
e = b;
c = c + 1;
} while (n >= c);
return 0;
}
9. Write different methods to pass parameters to a function.
Ans. Parameter passing is a method for communication of data between the calling function and
the called function. This can be achieved in the following two ways:
(a) Call by value: In call by value method, the formal argument is a copy of actual argument.
(b) Call by reference: In the call by reference method, the actual and formal arguments refer to
the same memory location or area.
10. How many types of linked list exist in C language?
Ans. There are various types of linked list that exists in C. These are described below:
(a) Singly linked list: In singly linked list, each node contains data and a single link which
attaches it to the next node in the list.
(b) Doubly linked list: In doubly linked list, each node contains data and two links, one to
previous node and one to the next node.
(c) Circular linked list: Circular linked lists are the linked lists which are obtained by linking
the last node of the linked list to the first node of the list.
11. What is a stack?
Ans. A stack is a data structure which is similar to an array but in which elements are added and
removed from only one end of the list.
12. Write a program that accepts a number from the user and sum up all the digits of
that number.
Ans. /* Accept a number and sum up all the digit*/ /* for example, 173456 = 1+7+3+4+5+6 = 26
*/
#include <stdio .h>
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 139
Institute for Competitive Exams
#include <conio.h>
main()
{
int n, rem, quo, sum = 0;
clrscr();
printf(“Enter a integer number \n”);
scanf(“%d”, &n);
while(n>0)
{
rem = n%10;
quo= n/10;
sum = sum + rem;
n = quo;
}
printf(“The sum of digits which you entered is = %d”, sum);
}
13. What is enumerated data type in programming language C?
Ans. Enumerated data types make the program listing more readable. They also help in reducing
programming errors when more than one programmer are working on the same program. An
enumeration type of data is an integral type that is defined by the user with the syntax:
enum TypeName {enumerator list};
Here, enum is a keyword, typename stands for identifier that names the type being defined and
enumerator list stands for a list of identifiers that define integer constants.
14. Write a program to display the contents of pointer using an array of pointers?
Ans.
#include <stdio.h>
main()
{
char *ptr[3];
ptr[0] = “Rani”;
ptr[l] = “Shiv”;
ptr[2] = “Ram”;
printf(“The content of pointer 1 = %s \n”, ptr[0]);
printf(“The content of pointer 2 = %s \n”, ptr[l]);
printf(“The content of pointer 3 = %s \n”, ptr[2]);
}
15. Write a program to accept a string from the user and print it in reverse order.
Ans.
#include<stdio.h>
#include<string.h>
main()
{
char st[255], c;
int i,n;
/*Accept a string */
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 140
Institute for Competitive Exams
printf(“Input a string:”);
gets(st);
/*Find the length of a string*/
n = strlen(st); /*Printing the string in reverse order*/
for(i = h-1; i >= 0; i--)
printf(“%c”,st[i]);
return 0;
}
16. What is sorting?
Ans. Sorting is the process of arranging data items in a particular order (ascending or
descending). Arrays are convenient for storing many types of data, because they allow the access of
the entry using its index. The data can be of any type which is not in the order i.e., any type of data
for which relations such as “greater than” and “less than” makes sense.
17. Explain the purpose of return statement in C?
Ans. The return() statement has two purposes. These are:
(a) Executing it immediately and transferring control from the function back to the calling
program.
(b) Whatever is inside the parentheses following return is returned as a value to the calling
program.
18. What do you understand by the term constant? Explain types of constant in ‘C.
Ans. Constant is a value, written into a program instruction, that does not change during the
execution of a program.
There are three types of constants:
(a) String constant: A string constant is a sequence of alphanumeric characters enclosed in
double quotation marks. The maximum length of a string constant is limited to 255 characters.
(b) Numeric constant: Numeric constant has a constant value in numbers. The value of the
constant can be positive or negative numeral.
(c) Character constant: Integer constants are whole numbers (0, 1, - 1, 2, - 2, 3, - 3, etc.) and
should not have any fractional or decimal part.
19. Define the following:
Ans.
(a) Comment:
The first line starting with the characters /* and ending with the characters */ is the comment.
Comments are important because they help in documenting a program. Comments should be
written so that the logic of a program is understood easily. You may type as many lines as you wish
between these two sets of characters i.e. (/*, */) for writing comments. Note that the compiler
ignores comments, and does not take any action.
(b) printf( ):
The printf() function is one of the most important and useful functions to display the formatted
output data items on the standard output device such as a monitor.
(c) Delimiters:
The opening brace ({) means a block of code that forms a distinct unit is about to begin. The
closing brace(}) terminates that block of programming code. These set of braces are the delimiters
for indicating the beginning and end of the program segment.
20. Distinguish between unary and binary operators.
Ans.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 141
Institute for Competitive Exams
Unary operators: Unary operator operates on one operand say -x. Unary operators take just a
single operand. The operand -ve sign is a unary operator. It operates on any integer or floating
point value.
Binary operators: Binary operators operates on two operands at a time. For example, x + y.
Here, + is a binary operator which operates on two numerical value x, y.
21. What does the exit() function do?
Ans. The function exit() is defined in the header file <stdio.h> and is used to terminate the
program execution immediately. It takes the form:
exit(status);
where ‘status’ is the termination value returned by the program and is an integer. Normal
termination usually returns 0, while any other number can be used to indicate the error.
22. Define array. Explain how arrays simplify programming with a suitable example.
Ans. An array is a collection of two or more adjacent memory locations containing same type of
data. These memory locations are called array elements which are given a particular symbolic
name. For example, if we want to store salary of 6 employees then we have two options. The first
one is to construct 6 variables to store salary of 6 different employees i.e. each variable containing
one employee’s salary. The second option is to construct just one variable which is capable of
holding all the 6 employees salary respectively. The second option is given the name as array type
of variable. This x[6] will refer to an array x containing 6 elements to store data.
23. In what way does an array differ from an ordinary variable?
Ans. Ordinary variables are like individual folders, whereas an array is like a single folder with
many leaves or compartments.
24. What is the difference between strcpy() and strcmp()?
Ans. The strcpy() function copies the contents of one string to another i.e. source string is copied
to destination string. For example:
strcpy(s1, s2)
copies string s2 to string s1.
The string strcmp() function compares two strings, character by character. It accepts any two
strings as parameters and returns an integer value.
strcmp(s1,s2)
25. What do you understand by the term actual and formal arguments for a
function?
Ans. The parameters that appear in a function call statement are actual arguments.
The arguments that appear in function definition are formal arguments, that is the function creates
its own copy of argument values (dummy arguments) and then uses them.
26. What is the difference between a function definition and a function prototype?
Ans. A function definition contains the code that will be executed when a function is called upon.
A function definition has a name, a parentheses pair containing zero or more parameters and a
body. For each parameter, there should be a corresponding declaration that occurs before the
body. Any parameter not declared is taken to be an integer (int) by default.
The prototype tells the ‘C compiler in advance about some characteristics of a function used in a
program. It has three main components. These are:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 142
Institute for Competitive Exams
(a) Function type: The function “type” is the type of the returned value. If the function does not
return a value, the type is defined as void.
(b) Function name: The function name is any legal identifier followed by the parentheses
without any space in between.
(c) Arguments: The arguments (or parameters) are given inside the parentheses, preceded by
their types and separated by commas. If the function does not use any parameters, the word void is
used inside the parentheses.
27. What is the difference between local and global variables?
Ans. The term local means that the variables are private to that particular function and are
distinct from other variables of the same name declared elsewhere in the program.
Global variables are defined outside the main function block. These variables are referred to by
the same data type and the same name throughout the program in both calling the portion of a
program and a function block. Whenever, some of the variables are treated as constant in both the
main and the function block, it is advisable to use global variables.
28. Explain the term recursion with an example. What are the advantages of using
recursive function?
Ans. A recursive function is a function that calls itself to perform a specific operation. The process
of a function calling itself is known as recursion. For example, recursion can be used to calculate
the factorial of a number.
0! = 1
n!=n(n-l)! where n! is defined in terms of (n-1)! which in turn defined in terms of (n-2)! and so on
till we reach 0! which is explicitly defined to have a value 1.
29. What is a pointer? What is the use of it?
Ans. A pointer is a variable that holds the memory address of another variable (rather than data).
The storage and retrieval of data using the memory address of a variable (i.e. a pointer) is faster
than that of using variable. A pointer provides a way of accessing a variable with out referring to
the name of the variable directly. To declare and refer to a pointer type variable, C provides two
special unary operators namely, * and &.
30. What do you mean by array of pointers?
Ans. An array of pointers is a collection of addresses. The most common use of an array of
pointers is with strings. The start of the string is indicated by a pointer to the first character (a
pointer to array type char), and the end of the string is marked by a null character. By declaring
and initialising an array of pointers to type char, you can access and manipulate a large number of
strings using the pointer array. Each element in the array points to a different string, and by
looping through the array, you can access each one of them in turn. In the following declaration:
char *arrPointer[5]; the variable arrPointer[] is a 5 element array of pointers pointing to character.
This is because the array element operator[] has higher precedence than the dereferencing
operator *.
31. Is there any difference between *++p and (*p)++? Explain with an example.
Ans. *++p means, increment the address p and take the contents of that address. Whereas (*p) ++
means, take the contents pointed by p and increment the contents. For example:
#include<stdio.h>
main()
{
int f, *p;
f = 123;
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 143
Institute for Competitive Exams
p = &f;
printf(“%d\n”, (*p)++);
printf(“%d\n”, *++p);
}
Note that p is a pointer pointing to an integer. The variable f is assigned a constant value 123. The
pointer p is assigned with the address of f. (*p) ++ means, take the contents pointed by p and
increment the contents. Hence the result is 123. *++p means, increment the address p and take the
contents of that address. As p is a pointer variable, pointing to an integer, when incrementing p by
1, it actually skips 2 bytes of memory. The data printed will be meaningless.
32. What is data type structure? How structure is different from array type of data?
Ans. The data type structure consists of a number of data items grouped together - but unlike
arrays, each data item in the group need not be of the same type. For example, a structure may
contain employee’s data such as name, salary, and any other relevant information about the
employee. A structure can hold as many of these items as we need. Only limitation is the size of
main memory of a computer.
33. What is a self-referential structure? For what kind of applications are self
referential structures useful?
Ans. When a member of a structure is declared as a pointer that points to the same structure then
it is called a self referential structure. It is expressed as shown below:
struct node
{
int data;
struct node *next;
};
where node is a structure that consists of two members one is the data item and other is a pointer
variable holding the memory address of the other structure. The pointer variable next contains an
address of either the location in memory of the successor node or the special value Null. The Null
is used to denote the end of the list. Self-referential structures are very useful in applications that
involve linked data structure such as link list and trees.
34. What is the purpose of the fclose() function?
Ans. fclose() function closes file and frees memory occupied by the file structure that
address_of_file points so that the operating system can use the freed memory of file structure for
other files. Argument for fclose() is the file pointer not a file name. The fclose() function returns 0
if the close operation is successful, otherwise it returns 1.
35. What is the difference between fprintf() and fwrite() functions?
Ans. The fprintf() function is used to write formatted data into a disk file. The fprintf() function
can be written as:
fprintf(address_of_file, “This is the sample data\n”);
This statement will store “This is the sample data” in the file whose pointer is address_of_file. This
statement will also place an end of line marker \n at the end of the data in the file.
fwrite() function writes elements from the array to the stream. The general format of fwrite() is:
fwrite(ptr, size, nitems, fptr);
where ptr is a pointer where the first structure is to be written, is the size in bytes of each structure,
nitems is the number of structures to be written and fptr is the file pointer to the file.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 144
Institute for Competitive Exams
Multiple Choice Questions SET 1
1. A program which translates a high level language program into a machine
language program is called
a. Compiler
b. Interpreters
c. Both a and b
d. None of these
2. A sequence of instructions, in a computer language, to get the desired result is
known as
a. an algorithm
b. a decision table
c. a program
d. None of these
3. Which type of errors are flagged by compilers?
a. logical errors
b. adding errors
c. syntax errors
d. None of these
4. An algorithm is best described as
a. a computer language.
b. a step by step procedure to solve a
problem.
c. a branch of mathematics.
d. None of these.
5. Bug means
a. A logical error in a program.
b. A difficult syntax error in a program.
c. Both a and b.
d. None of these.
6. The part of a machine level instruction, which tells the central processor what has
to be done, is
a. an operation code
b. an address
c. an operand
d. None of these
7. Indicate which of the following is not true about an interpreter
a. Interpreter generates an object program from the source program.
b. Interpreter is a kind of translator.
c. Interpreter analysis each source statement every time it is to be executed.
d. None of these.
8. The errors that can be pointed out by the compiler are
a. syntax errors
b. semantic errors
c. logical errors
d. None of these
9. Which of the following statements is not true?
a. C is a high-level language.
b. A C program written for the IBM-PC, is totally different from a ‘C program written for the
execution of SUN machine.
c. C is extensively used to write programs for performing scientific computations.
d. None of these.
10. The language C is
a. an assembly language
b. a third generation high level language
c. a machine language
d. None of these
II. Fill in the Blanks out of the following:
a. Program
b. Terminal
c. Bugs
d. Debugging e.
Algorithm
f. Flowchart
g. Assembly language
h. Connector i. 2
j. Software
k. Hardware
l. Software
1. A set of instructions which describes the steps to be followed to carry out an activity is called
_____.
2. Algorithm is written in computer's language, then such set of • instructions is called a _____.
3. _____ is a graphical representation of a program.
4. The _____ symbol is used to indicate the starting and stopping in the flowchart.
5. A _____ symbol is represented by a circle and a letter or digit placed within the circle.
6. Program errors are called _____.
7. The process of removing bugs in known as _____.
8. Physical component of computer which we can see and touch is called _____.
9. Binary number uses only _____ digits.
10. A program written in mnemonics is called _____ program.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 145
Institute for Competitive Exams
Answers:
I.
1. c
2. c
II.
1. g
2. a
3. c
4. b
5. a
6. a
7. a
8. a
9. b
10. b
3. f
4. h
5. b
6. i
7. c
8. d
9. e
10. k
1. Multiple Choice SET 2
1. A program that converts a high level language program to a set of instructions that can run on a
computer is called a
a. compiler
b. debugger
c. editor
d. None of these
2. Indicate which of the following is true about pseudocode?
a. is a machine language b. is an assembly language c. is a high level language d. None of these
3. Choose the 'Odd One Out" of the following
a. COBOL
b: FORTRAN
c. PASCAL
d. ASSEMBLER
4. Indicate which of the following is a phase of a compilation process?
a. Lexical analysis
b. Code generation
c. Both a and b
d. None of these
5. The name given to a sequence of instructions in a computer language to get the desired result is
a. a program
b. an algorithm
c. a pseudocode
d. a decision
table
6. The language understood by a computer without translation is called
a. command language
b. high level language
c. assembly language
d. machine language
7. A sequence of steps written
in natural language to solve a given problem
is called
a. an algorithm
b. a program
c. binary code
d. None of these
8. Which of the following describes the functions of a program?
a. Specifying the locations of variables in the memory.
b. Specifying constants.
c. Specifying the various operations to be performed by the computer.
d. All of the above.
9. The mapping from assembly language instructions into machine language instructions is
a. many-one
b. one-many
c. one-one
d. many-many
10. A compiler is
a. a machine-independent and OS-independent
b. machine-dependent and OS-dependent
c. machine-dependent and OS-independent
d. machine-independent and OS-dependent
II. Fill in the Blanks out of the following:
a. prime number
b. strlen(name)
c. element
d. brackets
e. less
f. Instant
g. 8
h. itself
i. similar data items
j. 7
k. size
l. strlength (name)
1. The GCD of the numbers 120 and 64 is _____.
2. The number 31 is a _____ because it is divisible by 1 or by itself only.
3. In Fibonacci series, the previous two numbers are added to generate the _____ Fibonacci
number.
4. Square root of a number is that number, which multiplied by _____ gives the original number.
5. The expression used to find the length of the string name is _____
6. An array is a collection of _____.
7. Each of the separate variable in the array is called a/an _____.
8. The _____ indicates to the compiler that we are dealing with an array.
9. The largest element of an array is one _____ than size of array.
10. C does not give any indication when an array subscript exceeds the _____ of the array.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 146
Institute for Competitive Exams
Answers
I.
1. a
2. d
II.
1. g
2. a
3. d
4. c
5. a
6. d
7. a
8. c
9. c
10. b
3. f
4. h
5. b
6. i
7. c
8. d
9. e
10. K
Multiple Choice Set 3
1. The source program testing in respect of the correct format of the instructions is performed at
a. Design phase
b. Execution phase
c. Compiler phase
d. None of these
2. A natural number 1 is also a
a. prime number
b. real number
c. integer number
d. None of these
3. Prime number is a number
a. divisible by 1
b. divisible by 1 and by itself
c. divisible by itself except the number 1
d. None of these
4. Swapping of two numbers is done by
a. direct interchanging their values with each others
b. storing the value of one in a temp variable and shifting the value of the other into the first and
then copying the value of temp to the other
c. transfer one number to other number without storing any number in the temp variable
d. None of these
5. Sorting an array in the ascending order of numbers is the process of
a. putting the largest number first and smallest in the last
b. putting the smallest number first and the largest number in the last
c. putting the numbers in any way you desire
d. None of these
6. _____ GCD of two numbers is
a. the smallest number which is a common factor of the given numbers
b. the largest number which is a common factor of two given numbers
c. 1 is the GCD for all numbers
d. None of these
7. Product of matrices A (m x n) and B (n x p) will be matrix C with row and columns as
a. m and p
b. n and p
c. p and n
d. None of these
8. The product of all natural numbers from 1 to n is called
a. n!
b. n x n
c. nn
d. None of these
9. If a = -11 and b = -3, what is the value of a%b?
a. -3
b. -2
c. 2
d. 3
10. What would be the output of the following program?
sum = 0;
for (i = -100; i < 0; i++)
sum += abs(i);
printf ("%d", sum);
a. 100
b. 5050
c. -5050
d. -100
II. Fill in the Blanks out of the following:
a. subscripts
b. integer
c. single valued
d. sub program
e. null
f. arrays
g. commas
h. prototype
i. multi-valued
j. call by value, call by reference
k. local
l. global
1. The values used to initialize an array are separated by _____ and surrounded by braces.
2. All strings must end with a _____ character.
3. If an array is two-dimensional then two _____ are used to reference an element in the array.
4. _____ can be stored in the memory column major order or in row major order.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 147
Institute for Competitive Exams
5. A _____ is a name given to a set of instructions that can be called by another program.
6. The main() function returns _____ value to the operating system.
7. The variable declared outside any function is known as a _____ variable.
8. A function can be called either by _____ or _____ or both.
9. The declaration of a function in the calling program is known as _____.
10. Return statement returns only _____ expression.
Answers
I.
1. c
2. c 3. c 4. b 5. b 6. b 7. a 8. a 9. c 10. a
II.
1. g
2. e 3. a 4. f
5. d 6. b 7. 1
8. j
9. h 10. C
I. Multiple Choice Questions SET 4
1. Arrays can be initialized provided they are:
a. Automatic
b. External
c. Static
d. All of the
above
2. Array is a collection of
a. identical data objects
b. different data objects
c. both a and b
d. None of these
3. When one-dimensional character array of unspecified length is assigned an initial value,
a. an arbitrary character is automatically added to the end of the string.
b. '\0' is added at the end of the string.
c. length of the string is added to the end of the string
d. None of these.
4. When multidimensional arrays are assigned initial value
a. Rightmost subscript increases most rapidly
b. Leftmost subscript increases most
rapidly.
c. Rightmost subscript increases least.
d. None of these.
5. It is necessary to declare the type of a function in the calling program if
a. the function returns an integer
b. the function returns a non-integer value
c. the function is not defined in the same file
d. None of these
6. The declaration void function(int) indicates function which
a. has no arguments
b. returns nothing
c. both a and b
d. None of these
7. Recursive functions are executed in a
a. Last in first out order
b. First in first out order c. Parallel fashion
d. One of these
8. What computing is done by the following function?
test(n)
int n; {
int i;
long int prod = 1;
if (n > 1)
for (i = 2; i <= n; i++)
prod* = i;
return(prod); }
a. calculates the product of any n positive integers
b. calculates the value of factorial n
c. checks whether n is a non-negative integer
d. none of these.
9. What is being done by the following function?
test (a, b)
int a, b;
{
int z = (abs(a) >= abs(b)) ? a:b;
return(z);
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 148
Institute for Competitive Exams
}
a. finds the larger of a and b
minimum of a and b
c. returns the member whose absolute value is largest d. None of these
10.
void summation(n)
int n;
{
int i;
sum = 0;
i = 1;
for (i=1; i<=n; i++)
sum +=I;
}
The above program returns
a. The sum of n numbers b. the nth number
c. sum of 1, 2, …, n
Answers:
1. d 2. a
3. b
Computer and IT
4. a
5. b
6. b
7. a
8. b
9. c
b. returns the
d. none of these
10. d
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 149
Institute for Competitive Exams
Data Structures through C
1. How would a binary tree look if the input were already in ascending order?
Ans. If the input were already ordered in ascending order, the left subtree of the root will be
empty. Also, the left subtree of all the nodes in the tree will be empty.
2. What is the maximum possible number of nodes in the binary tree at level 5?
Ans. Maximum number of nodes at any level n in a binary tree is given by 2 n. Therefore, the
maximum possible number of nodes in the binary tree at level 5 is 25 = 32
3. What is shell sort?
Ans. Shell sort is a modification of insertion sort, proposed by D. L. Shell in 1959. In case of
insertion sort, we can move entries only one position because it compares only adjacent keys. If we
take the item at a particular distance (increments) then we can compare items which are far apart
and we can sort them. Afterwards, we decrease the increment and repeat the process again. Finally
we take the increment 1 to ensure that the file is completely sorted.
4. What is Garbage collection?
Ans. Suppose some memory space in the computer becomes reusable because a node is deleted
from a list or an entire list is deleted from a program. Clearly, we want the memory space into the
free storage list. The operating system of a computer may periodically collect all the deleted
memory space onto the free storage list. A technique which does this collection is called garbage
collection. Under this method, nodes no longer in use remain allocated and undetected until all
available storage has been allocated. Garbage collection usually takes place in two steps. In first
step, called marking phase, it will sequentially visit all nodes in the memory and mark them which
are used in the program. In second step, called collection phase, it will collect all unmarked nodes
in memory which are allocated but not used m programs and place them in free storage area.
5. Explain First Fit, Best Fit and Worst Fit methods of Garbage collection.
Ans. Different methods for assigning requested memory from tree block are:
• First Fit method: In First fit method of memory allocation, the first entry, which has free block
equal to or more than required one is taken.
• Best Fit method: In best fit method of memory allocation the entry which is smallest, amongst
all the entries which are equal or bigger than the required one is chosen.
• Worst Fit method: In worst fit method, the system always allocates a portion of the largest free
block in memory.
6. What is pattern matching?
Ans. Pattern matching is the problem of finding whether or not a given string pattern P appears in
a string text S. We assume that the length of P does not exceed the length of S. For example, Let us
take a pattern for matching P = “Kumar”, in a given string text S = “Vivek Kumar Singh”.
Now we want to find whether string P is in string S or not and also what is the starting position of
P in S. Here, the length of P should be less than or equal to S.
Many string searching algorithms have been developed till date. However, the performance of
these algorithms depends on the nature of the string and the pattern to be searched.
7. Write an algorithm to evaluate an expression given in postfix form.
Ans. Clear the stack
symb = next input character
while not end of input {
If symb is an operand
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 150
Institute for Competitive Exams
push onto the stack
else {
Pop two operands from the stack
Result = opl symbol op2
Push result onto the stack
}
symb = next input character
}
return (pop stack)
8. What is spanning tree of a graph?
Ans. A spanning tree of a graph is an undirected tree consisting of only those edges that are
necessary to connect all the vertices in the original graph. A spanning tree has a properly that for
any pair of vertices there exists only one path between them and the insertion of any edge to a
spanning tree forms a unique cycle.
T is said to be a spanning tree of connected graph G, if T is a sub graph of G and T contains all
vertices of G. An edge in a spanning tree T is called branch of T. An edge of G that is not in a given
spanning tree T is called a chord.
9. Explain Prim's Algorithm for finding a shortest spanning tree in a graph.
Ans. In Prim's algorithm, an arbiter node is chosen initially as the tree root. The nodes of the
graph are then appended to the tree one at a time until all nodes of the graph are included.
Step 1: Select an arbitrary vertex v1 and the edge x1 with minimum weight incident with v1.
Step 2: Having selected the vertices of v1, v2, … … vk and edges x1, x2, .... xk-1 select an edge xk such
that xk connects a vertex of { v1, v2, … … vk } and a vertex of V - { v1, v2, … … vk } and of all such edges xk
has minimum weight.
Step 3: Stop if n-1 edges have been selected. Otherwise go to step 2.
10. What is AVL-tree?
Ans. AVL tree is a binary tree in which the difference in heights between the left and the right
subtree is not more than one for every node. The height of a tree is the number of nodes in the
longest path from the root to any leaf.
11. Define stack. What are the advantages and disadvantages of implementing a stack
using an array or a linked list?
Ans. Stack is defined as a list in which we can insert or delete the element only at the top of the
stack. It is also called LIFO structure.
A stack is often implemented as an array or a linked list.
The array implementation is efficient because the most recently inserted item is placed at the end
of the array, where it is also easy to delete it. Stack overflow can occur, but it is not likely if the
array is reasonably sized, because stacks seldom contain huge amount of data.
If the stack will contain a lot of data and the amount cannot be predicted accurately in advance, a
linked list is a better choice than an array. A linked list is efficient because item can be inserted and
deleted quickly from the head of the list. Stack Overflow does not occur (unless the entire memory
is full). A linked list is slightly slower than an array because memory allocation is necessary to
create a new link for insertion, and de-allocation of the link is necessary at some point following
removal of an item from the list.
12. Write an algorithm for the following:
Ans.
(a) Push operation on a stack
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 151
Institute for Competitive Exams
BEGIN
PUSH (STACK, TOP, MAXSTK, ITEM)
(This procedure pushes the ITEM onto a stack)
Step l. (Is stack already filled?)
IF TOP = MAXSTK then print stack OVERFLOW and Return
Step 2. Else Set TOP := TOP + 1 {Increase TOP by 1}
Step 3. Set STACK [TOP] := ITEM {Insert ITEM in new TOP position}
Step 4. Return END
(b) Pop operation on stack
BEGIN
POP (STACK, TOP, ITEM)
(This procedure deletes the TOP element of the STACK and assigns it to a variable ITEM)
Step 1. (Is there an Item in STACK for removal?)
IF TOP = -1 then print UNDERFLOW and Return
Step 2. Else Set ITEM := STACK [TOP] {assign TOP element to ITEM};
Step 3. Set TOP := TOP -1 {Decrease Top by 1}
Step 4. Return END
13. What a traversing a tree means? What are different ways to traverse a tree?
Ans. Traversing a tree means visiting each node in a specified order. There are three simple ways
to traverse a tree. These are pre-order, inorder and postorder.
Preorder:
1. Process the root R
2. Traverse the left subtree of R
3. Traverse the right subtree of R
Inorder:
1. Traverse the left subtree of R
2. Process the root R
3. Traverse the right subtree of R
Postorder:
1. Traverse the left subtree of R
2. Traverse the right subtree of R
3. Process the root R
14. What is hashing function? Explain different hashing functions.
Ans. Conversion of the key to an address is done by a relation (formula) which is known as
'hashing' function. A hashing function is actually just a relation which operates on a key to give its
hash value (a number). It converts key to yield a location (position) at which the record should be
found. The hash function is used to generate the location at which a record will be inserted. During
retrieval, the same hash value is used to find the location at which the record is stored.
Alphanumeric keys are usually converted into numeric keys before the hashing function can
operate on it.
There are three different hashing functions. These are:
(a) Division/Remainder: In this method, primary key value is divided by an appropriate
integer and the remainder is used as the relating address for the record. If D is the divisor, then
remainder always falls between 0 and D (both inclusive). It is a common practice to add 1 to the
remainder. Then the maximum number of addresses it can produce is D.
(b) Mid Square: In Mid square hashing function method the key is multiplied by itself (squared)
and the middle few digits of square are used as address. In order to calculate the address of the
main memory where the record will be stored, we use the following algorithm:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 152
Institute for Competitive Exams
Step l: Square the key value of the record
Step 2: Extract the number of digits from the middle of the squared value to get the address of the
memory.
(c) Folding: In the folding method a key is partitioned into a number of parts. Each part has the
same length as that of the required address except the last part. The parts are then added together,
ignoring the last carry.
15. Define hash collision. What are the basic methods for dealing with hash
collision?
Ans. Two records cannot occupy the same position in memory and such a situation is called hash
collision. There are three basic methods of dealing with hash collision.
(a) Linear Probing: A simple approach to resolving collisions is to store the colliding record
(element) into the next available space. This technique is known as linear probing.
(b) Chaining: The second technique, called chaining, builds a linked list of all items whose keys
hash to the same values. During search, the short linked list is traversed sequentially for the
desired key. This technique involves adding an extra link field to each table position.
(c) Bucketing: Another approach similar to chaining is to use an array at each location in the
hash table, instead of a linked list. Such arrays are called buckets. This approach is not as efficient
as the linked list approach. However, because of the problem of choosing the size of buckets. If
they are too small they might overflow and they waste memory.
16. What is threaded binary tree?
Ans. When a binary tree is represented using pointers then pointers to empty sub-trees are set to
null. That is, the 'left' pointer of a node whose left child is an empty subtree is normally set to
NULL. Similarly, the 'right' pointer of a node whose right child is an empty subtree is also set to
NULL. Thus, a large number of pointers are set to NULL. It will be useful to use these pointer
fields to keep some other information for operations in binary tree. Traversing is the most
common operation in binary tree. We can use these pointer fields, to contain the address pointer
which points to the nodes higher in the tree. Such pointer which keeps the address of the nodes
higher in the tree is called thread. A binary tree which implements these pointers is called threaded
binary tree.
17. What is binary search tree?
Ans. A binary search tree is a binary tree that is either empty or in which each node possesses a
key that satisfies the following conditions:
(a) Every element has a key and no two elements have the same key.
(b) The key (if any) in the left subtree are smaller than the key in the root.
(c) The keys (if any) in the right subtree are equal to or larger than the key in the root.
(d) The left and right subtrees are also the binary search trees.
18. Find the preorder, inorder and postorder traversal of tree given in figure 1:
Ans: Preorder: A, B, C, D, E, F, G, H, J, K, L, M, P, Q, N
Inorder: C, D, E, B, G, H, F, K, L, P, Q, M, N, J, A
Postorder: E, D, C, H, G, Q, P, N, M, L, K, J, F, B, A
19. Write recursive functions of the following
Ans.
Inorder traversing
inorder (tree)
NODEPTR tree;
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 153
Institute for Competitive Exams
{
if (tree != Null)
{
inorder(tree -> left);
printf(“%C”, tree -> info);
inorder(tree -> right);
}
}
(b) Postorder traversing
postorder(tree)
NODEPTR tree;
{
if(tree != NULL)
{
postorder(tree -> left);
postorder(tree -> right);
printf(“%c”, tree -> into);
}
}
Figure
1
20. What is sorting? Why is there a need for sorting?
Ans. The process of arranging elements of a list in a specified order for some key value of each
element is called sorting.
Need for sorting: All practical data processing requires, accessing records quickly and
efficiently. Search algorithms are most efficient only when the records are sorted according to
some specified keys. If the records in a file were not sorted, searching for a particular record would
require checking every record until the match is made. This is unnecessary waste of precious
computer time, especially if the file to be searched is very large sized.
Consider, for example, a file consisting of 1000 unsorted records. To find a record in this file we
may, in worst case, need to make 1000 comparisons. If the same file is sorted on some key, then a
binary search algorithm can catch the record in less than 10 comparisons.
21. What do you mean by best case, worst case, average case results while analyzing
an algorithm.
Ans.
Best Case: Most of the algorithms behave in best case. In this case, algorithm searches the
elements in first time itself. For example, in linear search, if it finds the element at first time itself
then it behaves as best case. Best case takes shortest time to execute, as it causes the algorithms to
do the least amount of work.
Worst Case: In worst case, we find the element at the end or when searching of elements fails.
This could involve comparing the key to each list value for a total of N comparisons. For example,
in linear search, suppose the element for which algorithm is searching, it is the last element of the
array or the element is not available in the array then algorithm behaves as worst case situation.
Average Case: Analysing the average case behaviour of an algorithm is little bit complex than
best case and worst case. Here, we take the probability with list of data items. Average case of
algorithm should be the average number of steps but since data can be at any place, so finding
exact behaviour of algorithm is difficult. As the volume of data increases, average case of algorithm
behaves like worst case algorithm.
22. Compare Average and worst case of various sorting algorithms.
Ans. Comparison of sorting algorithms
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 154
Institute for Competitive Exams
1.
2.
3.
4.
5.
6.
7.
Sort Algorithm
Bubble
Selection
Insertion
Shell sort
Quick sort
Merge sort
Heap sort
Average
0(N2)
0(N2)
0(N2)
0(N3/2)
0(N*log N)
0(N*log N)
0(N*log N)
Worst
0(N2)
0(N2)
0(N2)
0(N3/2)
0(N2)
0(N*log N)
0(N*log N)
Comparison
Poor
Fair
Good
Good
Fair
Fair
Extra memory
No
No
No
No
No
Yes
No
23. What is abstract data type (ADT)?
Ans. A useful tool for specifying the logical properties of any data type is the abstract data type or
ADT. An abstract data type is a data structure and collection of functions and procedures which
can operate on that type of data structure. Thus, an abstract data type (ADT) is a way of looking at
the data arrangement (structure) focusing on what ADT does, and ignoring how it does. An
abstract data type can be defined as a data type; whose properties are specified independent of any
particular implementation.
24. What do you mean by primitive data structure?
Ans. The fundamental data types such as int, float, char and double are called primitive data
types. Other data structures can be built from one or more primitive data structure. Data
structures are classified into following two categories.
• Linear data structure
• Non linear data structure
25. Compare stacks with queues.
Ans.
STACK: A stack is a data structure similar to an array but in this elements are added to and
removed only from one end of the list called the top. In other words, stack provides the
information in the reverse of the entry order, so it is called the Last-In-First-Out (LIFO) list. A
stack is implemented as an array or a linked list. The array implementation is efficient because the
most recently inserted item is placed at the end of the array, where it is also easy to delete it. Stack
overflow can occur, but it is not likely if the array is reasonably sized, because stacks may contain
huge amount of data.
QUEUE: A queue is a data structure with the restriction that entries can be added or removed at
either end but not in the middle. A single-ended queue permits addition from one end, usually
through the queue head (front) and deletion from other end, the tail (rear). Queue is also called
First-In-First-Out (FIFO) list. A queue is used when you want access only to the first data item
inserted as it is a first-in-first-out (FIFO) structure.
26. Write short notes on:
Ans.
(a) Priority Queue:
Priority queue is a more specialized data structure than a stack or a queue. It is a useful tool in a
number of situations. Like an ordinary queue, a priority queue has a Front and Rear. Items are
inserted in the Rear and removed from the Font. However, in a priority queue, items are ordered
by key or priority value, so that the item with the lowest key (or in some implementation the
highest key) is always at the front. Items are inserted in the proper position to maintain the order.
There are two types of priority queue: an ascending priority queue and a descending priority
queue. An ascending priority queue is a collection of items into which items can be inserted
arbitrarily and from which only the smallest item can be removed first. On the other hand, a
descending priority queue allows deletion of only the largest item.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 155
Institute for Competitive Exams
(b) Circular queue:
As in the circle, after last element, the first element occurs. So, when this technique is used to
construct a queue then also the queue is called circular queue. In other words, we can say that a
queue is called circular when the last element comes just before the first element.
(c) Advantages of circular linked list
Circular linked list has following advantages:
• Each node in a circular linked list can be accessed from any node or the circular linked list can be
traversed from any node.
• While deleting a particular node, we need the address of the previous node to the node to be
deleted. So, we have to first traverse through out the linked list to reach to this address and then
delete the node next to this address. But in a circular list, we can reach directly to this address and
hence reduce the effect of traversing from the start.
27. Write short note on symbol Table.
Ans. Data dictionary is used in database management applications. In computer science, we
generally use the term symbol table rather than dictionary to refer to the abstract data type (ADT).
Part of a compiler that keeps record of names of variable and their associated attributes or values
is known as symbol table.
28. Explain various types of linked list.
Ans. There are three types of linked lists. These are given below:
(a) Singly linked list: In this type of linked list, each node contains two fields i.e. data and a link
pointing to the next node in the list.
(b) Doubly linked list: In this type of linked list, each node contains data and two links, one link
pointing to the previous node and one link pointing to the next node.
(c) Circular linked list: Circular linked lists are the linked lists which are obtained by linking
the last node of the linked list to the first node of the list.
29. What is searching in a linked list?
Ans. Searching means to locate a specific node in a linked list containing the desired value in the
Info part of the node. Suppose we have a linked list and we have to search the element 72. Whether
the element 72 is present in the given linked list or not and if it is present, then at which node
location it is present. For searching the element, we need to traverse the linked list and while
traversing, we will compare the info part of each node with the desired value, which is say 72.
30. Write short note on Header linked list.
Ans. Header linked list is a linked list which always contains a special node called the header
node. Header node is at the beginning of the list. Dummy node placed as the first node of a list is
used to simplify linked list processing. It may or may not contain meaningful information. Header
node does not represent an item in the list. The Info portion of such a header node might be
unused.
31. Write a short note on
Ans.
(a) Red-Black Tree:
A Red-Black tree is a binary search tree with some special features. If data is inserted in a nonrandom sequence, the tree becomes unbalanced, degrading its performance. A Red-Black tree can
fix this by ensuring that the tree remains balanced all times. In the Red-Black balancing scheme,
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 156
Institute for Competitive Exams
each node is given a new characteristic: a colour that can be either red or a black i.e. the child
pointers of a node of a Red-Black tree are of 2 types Red or Black. If the child pointer was present
in the original 2-3-4 tree, it is black pointer otherwise, it is red pointer.
(b) 2-3-4 Tree:
It is a special case of B-Tree. The 2, 3 and 4 in the 2-3-4 tree refer to how many links to child node,
can potentially exist in a given node. For non leaf nodes, the following three arrangements are
possible:
• A node with one data item always has two children.
• A node with two data items always has three children.
• A node with three data items always has four children.
In other words, a non leaf node must always have one more child than it has data items.
32. What is a Graph?
Ans. A graph G is an ordered pair of sets (V, E), where V is a set of vertices or nodes and E is set of
edges or arcs. A graph is formally defined as a set of objects called nodes and edges. In this context,
a node is a data element of a graph, and an edge is a path between two nodes.
33. What are three major approaches to represent graphs?
Ans. There are three major approaches to represent graphs. These are:
• Adjacency Matrix: The nodes that are adjacent to one another are represented as matrix.
Thus, adjacency matrix is the matrix, which keeps the information of adjacent or nearby nodes. In
other words, we can say that this matrix keeps the information whether the node is adjacent to any
other node or not.
• Adjacency Lists: In adjacency list representation of graph, we will maintain two lists. First list
will keep track of all nodes in the graph and in the second list, we will maintain a list of adjacent
nodes for every node. Each list has a header node, which will be the corresponding node in the first
list. The header nodes are sequential providing easy random access to the adjacency list for any
particular vertex.
• Adjacency Multilists: When adjacency lists are maintained in a multi-list, the representation
is called adjacency multi-lists or adjacency multicasts.
34. Explain the graph traversal methods.
Ans.
Depth-first traversal:
Depth first traversal of a graph is roughly analogous to pre-order traversal of an ordered tree.
Suppose that the traversal has just visited a vertex V and let w 0, w1, … … wk be the vertices adjacent
to V. Then we shall next visit w0 and keep w1, … … wk waiting. After visiting w0 we traverse all the
vertices to which it is adjacent before returning to traverse w1, … … wk
Breadth-first traversal
Breadth-first traversal of a graph is roughly analogues to level by level traversal of an ordered tree.
If the traversal has just visited a vertex V, then it next visits all the vertices adjacent to V, putting
the vertices adjacent to these in a waiting list to be traversed after all vertices adjacent to V have
been visited.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 157
Institute for Competitive Exams
I. Multiple Choice Questions Set 1
1. Data structure
a. may be helpful to develop efficient algorithms in different phases of data processing.
b. need not give relationship between data items
c. is programming language dependent
d. none of these
2. Which is not true?
a. abstract data type is the useful tool for specifying the logical properties of data type.
b. while defining an abstract datatype as a mathematical concept, the space and efficiency is not a
major concern.
c. Every abstract data type can be implemented using any programming language
d. none of these
3. A data structure, in which an element is added and removed only from one end is known as:
a. Queue
b. Stack
c. Array
d. None of these
4. Queue
a. can be created by setting up an ordinary contiguous array to hold the items.
b. can take care of delete operation automatically
c. need a one pointer to handle addition and deletion of an item.
d. none of these.
5. Structured data type made up of finite collection of ordered elements, all of which are of the
same data type is
a. Record
b. Array
c. File
d. None of these
6. Implementation of list in a dynamic fashion is
a. to call upon the system to allocate and free storage may not be time consuming
b. a set of nodes and not reserved in advance for use.
c. the address computation is complex.
d. None of above
7. Memory allocation at the runtime is known as
a. static memory allocation
b. dynamic memory allocation
c. paging
d. none of these
8. Memory allocation at the compile time is known as
a. static memory allocation
b. dynamic memory allocation
c. paging
d. none of these
9. Most appropriate data structure in C to represent linked list is
a. array
b. struct
c. union
d. none of these
10. Part of a compiler that keeps record of names of variables and their associated
attributes/values is known as a
a. parser
b. symbol table
c. lexical analyzer
d. None of these
Answers:
1. a
6. b
2. c
7. a
3. b
8. c
4. a
9. b
5. B
10. A
II. Fill in the Blanks out of the following:
a. linked list
b. Front
c. Abstract
d. same
e. Data type
f. Index
g. One
h. Linked
i. Stack
j. Binary
1. Data structure, defined at logical level is called _____ data type.
2. The method of interpreting a bit pattern is called a _____.
3. To implement dynamic memory management _____ data structure is required.
4. Array has elements of _____ data type.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 158
Institute for Competitive Exams
5. Array may be accessed by _____.
6. The term _____ head of the queues same as the term of the queue.
7. A data structure, in which an element is added and removed only from one end, is known as
_____.
8. Besides data field, each node of linked list contains at least _____ more field.
9. In a _____ tree, each node can have at most 2 offspring.
10. Generally stack data structure is represented through arrays but can also be possible through
_____ list.
Answers
I.
1. a
6. b
II.
1. c
6. b
2. c
7. b
3. b
8. a
4. a
9. a
5. b
10. b
2. e
7. i
3. a
8. g
4. d
9. j
5. f
10. h
I. Multiple Choice Set 2
1. The set of native data types that a particular computer can support is determined by
a. type of hardware company.
b. what
functions are wired into hardware.
c. what software support is required.
d. None of these
2. While considering data structure implementation, the factors under consideration are:
a. time
b. time and space
c. time, space and process d. none of these
3. Pick out invalid statement from the following. Queues can be used for
a. the line printer
b access to disk storage
c. function call
d. none of these
4. Pick out invalid statement from following:
a. efficient
b. concise and compact
c. free of ambiguity
d. None of these
5. In top down approach
a. A problem is subdivided into sub problems; each one if attacked without worrying about other.
b. A problem is tackled from beginning to end in one go.
c. Sub problems are solved first; then all solutions of sub-problems are put together to solve the
main problem.
d. None of these.
6. In bottom up approach
a. a problem is subdivided into sub-problems; each one is attacked without worrying about others.
b. a problem is tackled from beginning to end in one go.
c. subproblems are solved first; then all solution of sub-problems are put together to solve the
main problem.
d. None of these.
7. Modular programming uses
a. only top-down method b. only bottom-up method c. both a & b
d. None of these
8. In analysis of algorithm, approximate relationship between the size of the job and the amount of
work required to do it is expressed by using
a. order of magnitude
b. central tendency
c. differential equation
d. None of these
9. Which is better computing time (in analysis of algorithm)?
a. O(N)
b. O(N2)
c. O(logN)
d. None of these
10. Which of the following is NOT a required feature of a good hashing algorithm. It should
a. be repeatable
b. allow even distribution of records through out the allocated space
c. Minimize synonyms
d. none of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 159
Institute for Competitive Exams
II. Fill in the Blanks out of the following:
a. Input data
b. Modular programming c. Coding
d. Vague
e. Algorithm
f. Performance
g. Array
h. Recursion
i. Product
j. Only one
k. many
1. _____ is a sequence of steps which creates the logic of program.
2. Performance of any algorithm depends upon the volume of _____
3. O notation is used to measure the _____ of any algorithm.
4. In _____ we divide the big problem into smaller ones which are totally different from each
other.
5. Factorial of any number n is the value of _____ of numbers form n to 1.
6. _____ is a very powerful technique to write a complicated algorithm in easy way.
7. An _____ is a collection of similar type of data items.
8. In top-down approach the main program should not become _____ entity whose task cannot
be described.
9. In top-down approach the main program should do _____ task but do it well.
10. _____ is the process of writing an algorithm in the correct syntax of a computer language.
Answers
I.
1. b
2. b
3. c
4. d 5. a
6. c
7. c
8. a
9. c 10. a
II.
1. e
2. a
3. f
4. b 5. i
6. h
7. g
8. d
9. j
10. c
I. Multiple Choice Questions SET 3
1. Elements of array are accessed by
a. accessing function in built-in data structure.
b. mathematical function.
c. index.
d. None of these.
2. Array is
a. linear data structure
b. non-linear data structure
c. complex data
structure
d. None of these
3. Row-major order in two dimensional array refers to
a. all elements of a row are stored in memory in sequence followed by next row in sequence and so
on.
b. all elements of a row are stored in memory in sequence followed by next column in sequence
and so on.
c. all elements of a column are stored in memory in sequence followed by next column in sequence
and so on.
d. None of these.
4. Which is not a representation of graph?
a. Adjacency matrix
b. Edge list
c. Adjacency list
d. All of these
5. String concatenation means:
a. combining two strings
b. extracting a substring out of a string
c. partitioning a string into two strings
d. None of these
6. A sparse matrix is better represented using a/an:
a. array
b. binary tree
c. multi-linked list
d. stack
7. Row major ordering of a rectangular array means:
a. columns are stored before rows
b. rows are stored in a sequence starting from the first element
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 160
Institute for Competitive Exams
c. greatest element of each row is stored first in memory.
d. none of these
8. A is an array of size m x n, stored in the row major order. If the address of the first element in
the array is M, the address of the element A(i, j) (A(0,0) is the first element of the array and each
element occupies one location in memory) is
a. M + (i-j)*m + j-1
b. M + i*m + j
c. M + (j-l)*m + i-1
d. M + (i-l)*n +
j-1
9. Array is a collection of
a. identical data objects
b. different data objects
c. both a & b
d. none of these
10. When one dimensional character array of unspecified length is assigned an initial value
a. an arbitrary character is automatically added to the end of the string
b. ‘\0’ is added at the end of the string.
c. Length of the string is added to the end of the string
d. none of these
II. Fill in the Blanks out of the following:
a. Similar data items
b. Strlen (name)
c. Less
d. Size
e. Commas
f. Arrays
g. Null
h. subscripts
i. element
j. brackets
k. more
1. The expression used to find the length of the string name is _____.
2. An array is a collection of _____.
3. Each of the separate variable in the array is called a/an _____
4. The _____ indicates to the compiler that we are dealing with an array.
5. The largest element of an array is one _____ than size of array.
6. C programming language does not give any indication when an array subscript exceeds the
_____ of the array.
7. The values used to initialize an array are separated by _____ and surrounded by braces.
8. All strings must end with a _____ character.
9. If an array is two-dimensional then two _____ are used to reference an element in the array.
10. _____ can be stored in the memory column major order or in row major order.
Answers
I.
1. c
2. a
3. a
4. b 5. a
6. c
7. b
8. d
9. a 10. b
II.
1. b
6. d
2. a
7. e
3. i
8. g
I. Multiple Choice Questions SET 4
1. The element at the root of heap is
a. largest
b. smallest
c. depending on type of heap it may be smallest/largest
2. Stack is a
a. static data structure
b. dynamic data structure c. in built data structure
3. In a queue (where q.rear and q.front are pointer to the two ends of a queue)
a. the number of total elements is fixed
b. if q.rear > q.front, it is empty
c. the number of elements at any time is (q.rear - q.front -1)
d. none of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
4. j
9. h
5. c
10. f
d. None of these
d. None of these
Page 161
Institute for Competitive Exams
4. Queue
a. can be created by setting up an ordinary contiguous array to hold the items
b. can take care of delete operation automatically
c. need a one pointer to handle addition and deletion of an item.
d. none of these
5. As on date, the best sorting algorithm has performance.
a. n O (log n)
b. O (n log n)
c. O (log n)
d. none of these
6. "Get a node, store new element and insert the new node at the top" refers to insert operation in
non empty
a. stack
b. queue
c. array
d. none of these
Answers:
1. c
2. b
3. d
Computer and IT
4. a
5.b
6. a
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 162
Institute for Competitive Exams
Programming with C++ Language
1. What are the reasons for considering C++ as a better programming language as
compared to programming language C?
Ans. C++ is considered a better programming language as compared to C because:
(a) C++ being an object-oriented programming language, its programs have a close match with the
objects in the real world. Hence, all advantages of object-oriented programming languages are also
available to C++.
(b) Code Reusability: Once a class has been written, created and debugged, it can be given to other
programmers for use in their programs.
(c) Inheritance: The concept of inheritance allows programmers to take an existing class and,
without modifying it, add additional features and capabilities to it using the concept of inheritance.
(d) Using the concept of operator overloading, we can give special meaning to existing operators,
such as +, =, - etc., so that they operate on the new data types in C++.
(e) C++ includes an improved approach to input/output programming.
2. What does the following declarations do?
int *pOne;
int vTwo;
int *pThree = &vTwo;
Ans.
int *pOne;
declares pOne to be a pointer variable that can store the address of an integer.
int vTwo;
declares an integer variable vTwo.
int *pThree = &vTwo;
declares pThree to be a pointer variable that can store the address of an integer and also at the
same time assigns it the address of variable vTwo. This is known as initialization at run-time of
declaration.
3. Differentiate between class and structure in C++.
Ans. Class differs from structure in the following ways:
Class
Structure
Members are private by default.
Members are public by default.
Classes are normally used to group both data Structures are normally used to group only data
and functions.
(although it is possible, to group both data and
functions within a structure)
4. What is an object and how an object is defined in C++? How does an object differs
from a class?
Ans. Object is some part of reality and it exists in time and space. An object has state, behaviour
and identity. The concept of a class is best understood with an analogy. Out of several objects in a
room, let us talk about the picture on the wall. There is a class, which we can call the class of
“Pictures” of which the picture on the wall is called an object in C++ terminology. The picture in
the room belongs to the class of pictures, which contains all pictures everywhere. Thus, in C++, it
is said “an object is an instance of a class”, which means in our example that the “picture on the
wall” is an occurrence of the idea “picture”. The following statement will declare an object, called
cursor of class point.
point cursor;
A class definition acts like a template for defining the characteristics of objects. It is a user defined
data type which holds both the data and functions. And objects are variables of the data type.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 163
Institute for Competitive Exams
5. Explain the term inheritance. What are the advantages of using the concept of
inheritance in object oriented programming such as C++?
Ans. Inheritance is defined as the property of objects by which instances of a class can get access
to data and program contained in a previously defined class, without those definitions being
restated. The advantages of using the concept of inheritance are:
(a) Inheritance provides facility of using prewritten programmes within minor changes.
(b) Inheritance provides easy distribution of class libraries.
6. How can we decide when to use which data types in our program?
Ans. When choosing the data type to represent something in a program, you should first consider
about the likely data range that variable may be made to hold or given. For example, if a variable is
to hold student examination marks out of 100, then an int type will be more than sufficient.
However, if the variable is to hold, for example, the population of India, then the integer data type
will be too small, and a long int data type will be required.
7. What is the advantage of using const keyword rather than #define?
Ans. Although both #define and const are used to declare constants, we cannot specify the data
type of the constant using #define. This can lead to programming errors. With const, however, one
can specify the data type of the constant. Therefore, const is preferred over #define to specify
constants.
8. When are exception objects created?
Ans. Exception objects are created when a statement in the try block has caused some exception.
This can be a logically incorrect statement or a function call wherein the calling function has
thrown an exception. The thrown exception object is then matched with the subsequent catch
block(s). The catch block that first matches the type of object thrown is executed.
9. Why is it said that use of “goto” statement should be avoided?
Ans. goto statements are used to jump to any location in your source code, backward or forward.
A goto instruction points to a different part of the program without a guarantee of returning. If,
after branching to another routine, another goto instruction branches somewhere else, the logic of
the program can become very hard to follow and maintain. Indiscriminate use of goto statements
causes tangled, miserable, impossible-to-read programs known as “spaghetti code”.
10. What is wrong with the following program?
Ans.
1 class TV
2{
3 public:
4 void SetStation(int Station);
5 int GetStation() const;
6 private:
7 int itsStation;
8 };
9 main()
10 {
11 TV myTV;
12 myTV.itsStation = 9;
13 TV.SetStation(10);
14 TV myOtherTv(2);
15 }
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 164
Institute for Competitive Exams
Ans. The given program contains error in the following lines:
(a) Line 12, because the variable itsStation is private in the class TV and hence is not accessible
through the object.
(b) Line 13, because the method SetStation() cannot be accessed using the class name. It must be
accessed through the object.
(c) Line 14, because there is no constructor in class TV that accepts an integer argument.
11. Can all operators available in C++ be overloaded? If not then list the operators
that cannot be overloaded.
Ans.
No, all operators available in C++ cannot be overloaded. The list of the operators that cannot be
overloaded is given below:
• (dot operator)
•* (pointer-to-member selection)
:: (scope resolution operator)
?: (conditional operator)
12. What are the differences between the function prototype and the function
definition?
Ans. The declaration of functions consists of its return type, name and number of arguments.
Function declaration is also called function prototype. Function prototype is used to indicate In
C++ compiler, in advance, about some characteristics of function.
A function prototype takes the form:
return_type func_name(datatype argumentl, datatype argument2...)
Function definition includes the full implementation of the function in addition to the prototype.
The general format of the function definition is as follows:
return_type func_name(datatype argl,datatype arg2.. )
{
//body of the function …
return statement;
}
13. Write the prototype for a function named Perimet(), which returns an unsigned
long int and takes two parameters, both of the type unsigned short int.
Ans. The prototype for the given function is:
unsigned long int Perimet(unsigned short int a, unsigned short int b);
14. What are the advantages of passing function arguments by reference instead of
passing by value?
Ans. The main and the important advantage of passing variables by reference is that it avoids
creation of a new variable in the function, which consumes lot of memory. For example, when a
structure variable is passed by value, a new structure variable of the same size gets created. This
consumes memory. But, if the same structure variable is passed by reference then it occupies less
memory than pass by value. The second advantage is that we can modify the actual variable from
the called function.
15. Write a program using a function sum() to add numbers 1 to n.
Ans.
# include <iostream.h>
int sum(int n)
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 165
Institute for Competitive Exams
{
int s = 0;
for(int i = 1; i<=n; i++)
s = s + i;
}
void main()
{
int n;
cout«“Enter the value of n:”;
cin»n;
cout«“Sum of numbers 1 to”«n« “is”;
cout«sum(n);
}
16. What are the limitations of using constructors and destructors?
Ans. The limitations of using constructors are:
(a) They should be declared in the public section of the program.
(b) They do not have return types, not even void and therefore, they cannot return values.
The limitations of using destructors are:
(a) A destructor function must be declared with the same name as that of the class to which it
belongs. But the first character of the destructor name must begin with a tilde (~).
(b) A destructor function is declared with no return types specified (not even void).
(c) A destructor function cannot have return types, not even void and therefore, it cannot return
values.
17. Can a ‘friend’ function be used for overloading the assignment operator?
Ans. A friend function cannot be used for overloading the assignment operator. This is because,
the overloaded assignment operator function must be a member of the class, the objects of which it
is acting upon. And a friend function cannot be defined as a member of a particular class.
18. What is visibility in inheritance?
Ans. Visibility specifies whether a member function in the base class can be used by objects in the
derived class or not. The visibility mode is specified when the derived class is declared as follows:
class <sub_class>:<visibility_mode> <super_class>
The visibility mode can be private, public or protected. The default visibility_mode is private.
19. What is the role of protected members in inheritance?
Ans. A member declared as protected is accessible by the member functions within its class and
any class immediately derived from it. It cannot be accessed by the functions outside these two
classes. When a protected member is inherited in public mode, it becomes protected in the derived
class also. Therefore, it is accessible by the member functions of the derived class. It is also ready
for further inheritance. A protected member, inherited in the private mode derivation, becomes
private in the derived class. Although it is available to the member functions of the derived class, it
is not available for further inheritance because private members cannot be inherited.
20. Define a class Complex_Num which has 2 real numbers as private variables one
represents the real part and one for complex part. Define constructors to initialize
the object.
Ans.
# include <iostream.h>
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 166
Institute for Competitive Exams
class complex_no
private:
float real;
float imag;
public:
complex_no(float r, float i = 0.0)
{
real = r;
imag = i;
};
void display()
{
cout«real«“ +”«imag«“i\n”;
{
complex_no operator +(complex_no obj);
};
21. Distinguish clearly between ‘macros’ and inline functions?
Ans. A macro function is a symbol created using #define preprocessor directive, that takes an
argument much like a function does. The preprocessor will substitute the definition string for
whatever argument it is given. For example, we can define a macro TWICE as:
#define TWICE(x) ((x) * 2) and then in our code we write
The entire string TWICE(4) will be removed, and the value 8 will be substituted. This is because
when the precompiler sees 4, it will substitute: ((4) * 2)
Inline functions are like normal functions, except that they are declared using the keyword inline.
The compiler does not create a copy of inline function. It rather copies the code where the function
call has been made. In an inline function, if the function is called 5 times, the code of the function
is copied into the calling functions each of those 5 times.
22. What is a virtual function?
Ans. Virtual function is a function that allows derived class to provide different versions of a base
class function. We can declare a virtual function in a base class, then redefine it in any derived
class, the number and type of arguments being the same. The redefined function in the derived
classes overrides the base class function having the same name and the same number and type of
arguments.
If a function is virtual, the function associated with the actual type of the object is invoked at
runtime. The programming language C++ determines which function to use based on the type of
the object pointed to by the base class pointer, rather than the type of the pointer.
23. Why do we need the preprocessor directive #include<iostream.h> in a C++
program?
Ans. C++ uses preprocessor directives that processes a source file before the main compilation
take place. It automatically executes when we compile the program. The preprocessor directive
#include<iostream.h>
causes the preprocessor to add the contents of the iostream.h file in our program. The io in
iostream.h refers to input and output. C++’s input and output scheme includes several definition
(cin and cout) found in iostream.h file. Our main program needs these file to use the facility of cin
and cout. Moreover, #include preprocessor directive adds the content of iostream.h along with our
file and send it to the compiler to compile the whole program.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 167
Institute for Competitive Exams
24. What is literal constant? Why we do not use literal constant at all the time?
Ans. Literal constant is value which is typed directly into the program whenever it is needed. We
must avoid literal constant because when we use the value in many places in our program, we have
to type that particular value of the constant many times.
25. Write a program in C++ to call a function Con() to convert the temperature from
Fahrenheit to Celsius and then return it to the called function.
Ans.
#include <iostream.h>
float Con(float Fer)
{
return ((Fer - 32) * 5) / 9;
}
void main()
{
float Fer, Cel;
cout « “Please enter the temperature in Fahrenheit:”;
cin » Fer;
Cel = Con(Fer);
cout « “\nHere’s the temperature in Celsius: “«Cel«endl;
}
26. Is there any difference between default arguments and constant arguments? If
yes, then describe it.
Ans.
Default Arguments: A function without an explicit return value by default is assumed to return
a value of type int. A function that does not return a value should declare a return type of void. A
return statement terminates the function currently executing. Program control is returned to the
function from which the now-terminated function was called.
Constant Arguments: Whenever a reference (or pointer) argument is not intended to be
modified within the function, it is a good practice to declare the argument as const. This allows the
compiler to prevent unintentional changes from occurring, especially in a chain of function calls to
which the argument is passed.
27. What is a scope resolution operator?
Ans. The scope resolution operator (::) let us access a global variable even if a local variable uses
the same name. The syntax requires the placement of the double colon, ::, immediately in front of
the globally referenced identifier.
28. What is the size of an object of an empty class?
Ans. C++ allows us to create an object of an empty class which occupy some bytes of memory and
the minimum amount of memory it could reserve is 1 byte. Therefore, the size of an object of an
empty class is one byte.
29. Write a short note on the following:
Ans.
(a) Copy Constructor:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 168
Institute for Competitive Exams
Copy constructor is used whenever an object of a class needs to be created temporarily. Copy
constructor is used to initialize an object by another object of a similar class. The syntax of the copy
constructor is:
class_name :: class_name(class_name &ptr);
(b) Default Constructor:
The default constructor is a special member function with no arguments which initializes the data
members. That is, the default constructor accepts no parameters. For example, the default
constructor for class A is A(). If no constructor is defined for a class, then the compiler supplies the
default constructor.
30. What is operator overloading?
Ans. Operator overloading is a mechanism, in C++, which provides a special meaning to an
operator. The input and output operators («) and (») used in C++ for input or display, are good
examples of overloading. That, is, the left shift («) and right shift (») operators which are used to
left and right shift the bits, respectively are overloaded to perform a different function of input and
output when used with cin and cout. Operator overloading provides the ability to use the same
operator to perform different actions.
31. Give the advantages of operator overloading.
Ans. The following are the advantages of operator overloading:
(a) By making operators work on user-defined types, we can have a consistent approach.
(b) It is more intuitive to overload an operator rather than calling a function to perform the same
job.
(c) It provides clarity to the program. For example, if we have to add four objects of a class using
function, it would be like:
add(d, add (c, add(b, a)))
But, using operator overloading we just need to write:
a+b+c+d
32. Write short notes on the following:
Ans.
(a) Multiple Inheritance:
When a derived class is declared to inherit properties of two or more parent classes (base classes),
it is Multiple inheritance. Multiple inheritance can combine the behaviour of multiple base classes
in a single derived class. The base classes in a multiple inheritance are separated by commas. Such
a class, inherits the traits of all its base classes. That is, it can access the members of all the classes
it is derived from.
(b) Abstract Base Class:
There are cases where we need to define a base class of which no actual instances (objects) will be
created. Such a class is known as abstract class. Objects of abstract classes are not created.
However, it is used as a base class and inherited by other classes.
33. What do you understand by “pointers to pointers”?
Ans. A pointer to a pointer is a construct (i.e. sub program) used frequently in more complex
programs.
To declare a pointer to a pointer, place the variable name after two successive asterisks (**). For
instance
int **z; declares z to be a pointer to a pointer to an integer variable z.
34. What do you understand by the term stream manipulators?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 169
Institute for Competitive Exams
Ans. Stream Manipulators are the formatting instructions which an inserted directly into a
stream. These can be used to set the formatting and displaying characteristics and other attributes
of the stream objects. These manipulators provide almost the same functions which are provided
by ios formatting flags. However, they are more convenient to use. Some important manipulators
are as follows:
(a) ws turns on whitespace
(b) ends insert null character (‘\0’) to terminate an output string.
(c) flush flushes the output stream
(d) dec converts to decimal
(e) oct converts to octal
(f) hex converts to hexadecimal
(g) setw(int field-width) sets field width for output
(h) setfill(int fill-character) sets fill character for output (default character is space)
(i) setprecision(int precision) sets precision (precision determines the number of digits that will be
displayed)
(j) setiosflags(long formatting-flags) sets the specified flags
(k) resetiosflags(long formatting-flags) resets the specified flags.
35. What are exceptions? Give some reasons that cause exceptions.
Ans. A program execution many times returns an abnormal, unexpected answer at run-time.
Alternatively, it may violate the rules of the language or the constraints of C++ execution
environment. Such errors are known as Exceptions. It should be noted that exceptions are
different from syntax and logical errors which are detected at compile time. But, exceptions are
only checked at run-time. Some common reasons that cause exceptions are:
(a) out-of-bounds array subscript (i.e. trying to access a nonexistent array element),
(b) arithmetic overflow (i.e. a value outside the representable range of values),
(c) division by zero (i.e. trying to divide a number by 0),
(d) null pointer assignment,
(e) stack overflow,
(f) memory exhaustion.
36. What are templates? Do templates provide reusability?
Ans. Template is an advanced feature in C++ that allows a single function or class to handle more
than one data types. Templates provide reusability of the source code. It makes it possible for us to
write only a single function or class that works for different data types. This helps to reduce source
code size and increase code flexibility.
37. Write a note on “Template Overriding”.
Ans. A function generated from a template contains the same basic code. The only thing that
changes is the data type of the parameters. That is, for all data types, the same processing is carried
out. Suppose you want that a particular template function should behave differently with a
particular data type, say int. This is possible using function overriding.
That is, using over-riding, we can provide a special processing for a specific parameter type. For
this, we simply define a normal C++ function that has the same name as the function template but
uses specific fixed data types rather than template types. This function will override the function
template. That is, if we pass parameters of the types specified in the normal function, the compiler
will call this function rather than generating a function based on the template.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 170
Institute for Competitive Exams
I. Multiple Choice Questions SET 1
1. Sharing of common information is achieved by the concept of
a. Virtual Copying
b. Encapsulation
c. Inheritance
d. None of these
2. The characteristic that data can be manipulated only through member functions
which are part of the class is called
a. Encapsulation
b. Data dependency
c. Inheritance
d. Instantiation
3. Operator overloading is
a. giving new meaning to the operator.
b. making new operator.
c. deleting existing C++ operator.
d. none of these.
4. In a class, only the member function can access data which is not accessible to
outside. This feature is called
a. Data hiding
b. Data security
c. Data manipulation
d.
Data
definition
5. One of the major disadvantages with late binding is:
a. source code should be made available at compile time.
b. the program
runs slower.
c. dynamic variables can not be used in the program d. static variable cannot be used
6. A relational operator
a. yields a Boolean result b. compares two operands c. both (a) and (b) above d. none of these
7. What will be the value of green after execution of the following function:
enum colors {red, blue, white = 5, yellow, green, pink}
a. 2
b. 5
c. 7
d. 1
8. Identify the error in the following function:
int emp sal(basic, da, hra, cca=1000, conveyance) {....}
a. One cannot assign values in the functional arguments
b. cca is a default argument hence it should be at the extreme right or conveyance also should have
default values
c. cca is a default argument hence the rest of the arguments also should have default values
d. cca is a default argument hence it should be at the extreme left or basic, da, hra also should have
default values.
9. Which of the following is not an escape sequences?
a. \0
b. \b
c. \c
d. \\
10. A constructor which can be used to open an output file is
a. cout
b. ofstream
c. fstream
d. none of these
II. Fill in the Blanks out of the following:
a. call-by-value
b. public
c. cout
d. execution
e. private
f. virtual
g. compile
h. pointers
i. shallow copy
j. copy
k. inline
l. overloaded
m. default constructor
n. unary operator o. underloaded
1. Defining a member function within a class declaration makes the member function as _____.
2. In the _____ functional call, only a copy of the actual variables are copied into the arguments.
3. A private member function can be invoked only by another _____ member function of the same
class.
4. When an object is used to initialize another object during declaration, the constructor invoked is
known as _____ constructor.
5. The copy operation involved in passing of variables to arguments in a simple call by value
functional call is known as _____
6. The protected variable behaves like a _____ variable within the scope of that class.
7. The duplication of inherited member due to the multiple paths arising out of multiple
inheritances can be avoided by declaring the common base class as _____ base.
8. An abstract class cannot have objects but can have _____ to objects.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 171
Institute for Competitive Exams
9. In C++, cin and cout perform the necessary conversions at _____ time.
10. The corresponding code of the virtual function is linked during _____ time.
Answers:
I.
1. c
2. a 3. a 4. a 5. b 6. c 7. c
8. b 9. c 10. b
II.
1. k
2. a 3. b 4. j
5. i
6. e 7. f
8. h 9. g 10. d
I. Multiple Choice Questions SET 2
1. When multidimensional array is accessed, each array index is
a. separated by commas
b. surrounded by brackets
c separated by commas and surrounded by brackets d. none of these
2. In C++, the keyword auto can be used for
a. automatic assignment of data to objects during instantiation
b. automatic call of a function
c. to declare a local variable
d. none of these
3. Which of the following is a reserved word in C++:
a. template
b. throw
c. this
d. all of the
above
4. The 'goto' statement causes control to shift to
a. an operator
b. a label
c. a variable
d. none of these
5. A variable defined within a block is visible
a. within a block
b. within a function
c. both (a) and (b) above d. none of these
6. In a simple if statement with no else, what happens if the condition following the if is false?
a. The program searches for the last else in the program.
b. Nothing
c. Control falls through to the statement following the if statement
d. Both (b) and (c)
7. The main difference in operation between if statement and while statement is:
a. The conditional expression following the keyword is evaluated differently.
b. The while loop body is always executed, the if loop body only if the condition is true.
c. The body of the while statement may be executed many times, the body of the if statement only
once.
d. The conditional expression is evaluated before the while loop body is executed but after the if
loop body.
8. The advantage of a switch statement over an else-if construction is:
a. A default condition can be used in the switch.
b. The switch is easier to understand.
c. Several different statements can be executed for each case in a switch.
d. Several different conditions can cause one set of statements to be executed in a switch.
9. Which of these are invalid reasons for using functions?
a. They use less memory than repeating the same code.
b. They run faster.
c. They keep different program activities separate.
d. They keep variables safe from other parts of the program.
10. Which of the following are valid reasons for using argument in a function?
a. To tell the function where to locate itself in memory.
b. To convey information to the function that it can operate on.
c. To return information from the function to the calling program.
d. (b) and (c) above
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 172
Institute for Competitive Exams
II. Fill in the Blanks out of the following:
a. bound
b. 4
c. inline
d. data type
e. private
f. address
g. static member data
h. any data type
i. class member
j. internal
k. member function
l. public
1. A pointer to void data type can hold pointer to _____.
2. The contents of two pointers that point to adjacent variables of type float differ by _____ bytes.
3. The member functions defined within the class definition are implicitly _____.
4. A pointer variable can be assigned _____ of ordinary variable.
5. The protected specifier allows to create a _____ that is accessible within a class hierarchy.
6. Member functions defined inside a class specifier are _____ by default.
7. Each pointer is _____ to the type of variable to which it points.
8. A static member function can access only _____ from the class.
9. Two pointer variables can be compared provided both point to an object of the same _____.
10. A function defined in a class is _____ of the class.
Answers
I.
1. b
2. c 3. d 4. b 5. a 6. c 7. c
8. b 9. b 10. b
II.
1. h 2. b 3. c 4. f
5. i
6. e 7. a 8. g 9. d 10. k
I. Multiple Choice Questions SET 3
1. Which of the following cannot be passed to a function via arguments?
a. constants
b. variables (with values)
c. preprocessor directives
d. expressions (that evaluate to a value)
2. A function's single most important role is to
a. reduce a program size
b. accept arguments and return value
c. give a name to the block
d. none of these
3. Which of the following is invalid for function declaration?
a. function name
b. return type
c. number of arguments d. none of these
4. When an argument is passed by reference
a. the function work with the original value
b. a temporary variable is created to hold the value
c. sometimes it works with original value and sometimes it works with temporary variable
d. all of the above are false
5. The function definition must match the function prototype in
a. return type
b. function name
c. parameter list
d. all of the
above
6. Function names can be overloaded by changing the
a. number parameters
b. type of parameters
c. function name
d. (a) and (b)
7. Which of the following is true for return statement?
a. return 2;
b. return (x > 2);
c. return (func());
d. all are valid
8. In a class, only the member function can access data which is not accessible to outside. This
feature is called
a. data security
b. data manipulation
c. data hiding
d. data definition
9. In C++, a function contained within a class is called
a. a member function
b. a class function
c. an operator
d. none of these
10. The members of a class can be made private by
a. declaring them private
b. by default they are private
c. by declaring them in the beginning of the program immediately after the main()
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 173
Institute for Competitive Exams
d. none of these
II. Fill in the Blanks out of the following:
a. braces
b. try
c. catch
d. protected
e. abstract
f. multiple inheritance
g. "is a kind of"
h. overloaded
i. derived
j. functional declaration k. definition
l. underived
1. Exceptions are thrown in the _____ block.
2. The prototype of the function is the _____ before its definition.
3. Exceptions are trapped in the _____ block.
4. Class hierarchy describes _____ relationship.
5. A child class is said to be _____ from a base class.
6. To be accessed from a member function of the derived class data or functions in the base class
must be public or _____.
7. No actual instances of _____ classes are created.
8. When a derived class is declared to inherit properties of two o more parent classes, it is _____.
9. A function is delimited by _____.
10. _____ function have the same name.
Answers
I.
1. c
2. a 3. d 4. a 5. d 6. d 7. d 8. c 9. a 10. b
II.
1. c
2. j
3. b 4. g 5. i
6. d 7. e
8. f
9. a 10. h
I. Multiple Choice Questions SET 4
1. Private and protected data members can be accessed
a. only from base class itself
b. only from
derived class
c. both from the base class and its derived class
d. none of these
2. The technical difference between class and structure is
a. class members are private by default whereas structure members are public by default
b. class members are public by default whereas structure members are private by default
c. there is no relation between them
d. none of these
3. :: is known as
a. scope resolution operator
b. global operator
c. both a and b
d. none of these
4. A default constructor
a. has no return type
b. has no arguments
c. has one argument
d. has one argument but no return type
5. The default argument has a value that
a. may be supplied by the calling program
b. must be constant
c. must be variable
d. none of these
6. new operator is used to
a. dynamically allocate storage
b. statically allocate storage
c. allocate storage for a new variable
d. none of these
7. A function that is automatically called when an object is created is known as:
a. instantiation
b. function prototype
c. constructor
d. structure
8. A function that is automatically called when an object is destroyed is known as:
a. destroy
b. prototype
c. constructor
d. destructor
9. When an object initializes another object the under-mentioned functions is invoked:
a. copy constructor
b. new
c. instantiaition
d. none of these
10. The copy operation by a simple assignment
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 174
Institute for Competitive Exams
a. causes no effect
c. creates new
b. creates copy, exactly the same as original
d. calls no copy constructor
Answers:
I
1. c
6. c
2. a
7. c
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
3. b
8. d
4. b
9. a
5. a
10. d
Page 175
Institute for Competitive Exams
JAVA Programming
1. Distinguish between an Java applets and Java applications.
Ans. The differences between Java Applications and Java Applets are:
Java Applets
Java Applications
Applets can be embedded in HTML pages and
Applications have no special support in HTML
downloaded over the Internet or Intranet.
for embedding or downloading
Applets can only be executed inside a JavaApplications can be executed from the
compatible container, such as a modern Web
command line using Jview.exe or Java.exe
Browser.
Applets execute under strict security limitations Applications have no security restrictions.
and are not permitted to access files or systems
services on the user's computer.
2. How does Java implement the portability of code?
Ans. Java is designed to support applications that are deployed into heterogeneous networked
environment. In .such an environment, application programs must be executable on a variety of
hardware architecture. For this, Java code must be portable. This is accomplished as follows:
(a) Java compiler generates Bytecodes. Bytecode is an architecture neutral intermediate format
designed to transport code, efficiently to multiple hardware and software platforms. The same
bytecode can run on any platform and thus independent of system.
(b) Java strictly specifies the size of its basic data types and the behaviour of its arithmetic
operators. The Java programs are thus, same on every platform—there are no data type
incompatibilities across different hardware and software architectures.
3. Write a Java program to convert meters to kilometers and display the Output in
kilometers.
Ans.
//the value to be converted is taken as a command line argument
class ToKilo
{
public static void main(String args[])
{
float k = Float.parseFloat(args[0])/1000;
System.out.println(k);
}
}
4. When is import statement used?
Ans. The statement import is used when we want to use classes defined outside the package we
are working on. That is, we may require classes located in other packages. In such cases, we do
require the import statement. The import statement enables us to import classes from other
packages into the current working file.
5. aba.cada is a package name. What will the following import statements do?
(i) import aba.cada;
(ii) import aba.cada.*;
(iii) import aba.cada.Example;
Ans. The statement
import aba.cada;
will give an error because aba.cada is not a class. The statement import is used to import classes
and not packages.
import aba.cada.*;
will import all the classes in the aba.cada package.
import aba.cada.Example;
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 176
Institute for Competitive Exams
will import the Example class of aba.cada package.
6. Where throw is used? Give structure of its usage?
Ans. The statement throw is used to explicitly make use of throw-exceptions. We explicitly throw
exceptions when we like to reflect it to the caller method. By throwing an exception, we give the
exception handler in the caller a chance to handle it. Exceptions go all the way up to the chain of
method-calls this way. If it is not handled by any of them, the system will handle it itself by
aborting the program and printing an error message (the default handling).
An exception (say ab) is thrown as follows:
throw ab;
7. How is string implemented in Java? What is the difference between the String and
StringBuffer class?
Ans. In Java, string is implemented as an object and not as an array of characters like in other
object-oriented programming languages. String objects are constant, i.e. they cannot be modified.
StringBuffer objects are not constant and hence can be modified.
8. List methods defined in the StringBuffer class.
Ans. The methods defined in the StringBuffer class are:
*length(), capacity(), ensureCapacity(), insertQ, append(), reverse(), *replace(), *charAt(),
setCharAt(), delete(), deleteCharAt(), substring()
9. What are the reasons which led to the popularity of object-oriented programming?
Ans. The reasons which led to the popularity of object-oriented programming are as follows:
(a) It is easier to conceptualize an object-oriented program and reuse the code with minor changes
only.
(b) Object-oriented systems support inheritance between classes and super classes and allow
objects to send messages.
(c) Object-oriented program and its data are modeled as a group of autonomous objects that
respond to messages sent by one object to another object.
10. What do you mean by numeric promotion of data types?
Ans. Numeric promotion is the conversion of a smaller numeric data type to a larger numeric
type, so that integer and floating point operations may take place. In numerical promotion, byte,
char and short int data values are converted to int values. The int values are also converted to long
int values, if necessary. The long int and float data type values are converted to double data type
values, as required by the compiler.
11. What will be the result of the following expressions?
10 * 2 / 3 < 128 / 10 + 3 | 100 / 20 * 3 > 25
Ans. The given expression can be rewritten using parenthesis (taking into consideration the order
of precedence) as follows:
{ [ (10 * 2 ) / 3 ] < [ (128 / 10 ) + 3 ]} | { [ (100 / 20) * 3 ] > 25 }
= { [20/3] < [12 + 3]} | { [5 * 3] > 25}
= {6<15} | {15>25}
= true | false
= true
Therefore, the expression will give the result true.
12. Mention the relative advantages and disadvantages of GIF and JPEG file formats.
Which file format is preferred on the Internet?
Ans. GIF image format makes it possible for images to be viewed while online (i.e. while on the
Internet). GIF file format supports only a maximum of 256 colours.
The JPEG file format maintains the quality and colours of the images. Consequently, it takes
longer time to download graphic files that use JPEG format. Hence, GIF file format is preferred on
the Internet.
13. What is the purpose of MediaTracker class? Explain the term Double Buffering.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 177
Institute for Competitive Exams
Ans. MediaTracker class helps when multiple images are to be displayed. An object of type
MediaTracker can check the status of a number of images in parallel.
Use of media tracker helps the programmers to know when exactly certain images have been
transferred and are ready for use. This enables them to display another equivalent output or do
certain actions depending on whether the images have finished transferring or not. For example,
you-can display a text message (say "Loading Image....") informing the user that the images are
still in the process of loading. This solves the problem of drawing partially transferred images.
Double Buffering: The users often want to see smooth and complete images and not cut-pieces
of an image. One solution to this problem is to store the portions of the graphics in a buffer and
then display this buffer at a later time. In this way, the image is seen only when it is completely
loaded. Such an offscreen buffering is known as double buffering.
With the technique of double buffering, while the program renders one image on the screen, it can
build the next image in an off-screen buffer. And then, when it is time for the next image to be
displayed, it can be placed on the screen smoothly, Thus, the double buffering technique uses two
buffers, the - screen (buffer of pixels) and the offscreen image.
14. Write a Java program to find out whether a given file is existing on your system
or not.
Ans.
import Java.io.*;
class Test
{
public static void main(String nrgs[])
{
String file = "mes.txt";
File f = new File(file);
if(f.exists())
System.out.println("The given file exists");
Else
System.out.println("The given file does not exists");
}
}
15. What is JDBC and what are their types?
Ans. JDBC (Java Database Connectivity) is used to execute SQL (Structured Query Language)
statements. It provides a set of classes and interfaces that can be used to write database
applications. JDBC connectivity are of the following four types:
(a) JDBC-ODBC bridge (connection through ODBC driver)
(b) Native-API (partly-Java driver)
(c) JDBC-net (pure Java driver)
(d) Native-protocol (pure Java driver)
16. List two byte-oriented I/O classes and two character-oriented I/O classes.
Ans. Two byte-oriented I/O classes are InputStream and Output-Stream. Two character-oriented
I/O classes are InputStreamReader and OutputStreamWriter.
17. Write short notes on the ImageObserver class.
Ans. The ImageObserver class is useful when a large image (that takes a long time to download) is
to be displayed. It is passed as an argument to the drawImage() method. The drawImage() method
is used to display a loaded image. Using this argument it is possible that a program starts
displaying portions of the image before it is completely downloaded. The ImageObserver object is
automatically notified to update the image, a portion of which is already displayed, when the
remainder of the image is loaded.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 178
Institute for Competitive Exams
The ImageObserver interface declares only one method and that is the imageUpdate() method. A
class that implements this interface must provide the definition for the method. It is of the
following form:
boolean imageUpdate(Image obj, int flag, int x, int y, int width, int height)
18. What is the usage of the ServerSocket class?
Ans. The ServerSocket class is used to create servers that listen to either local or remote client
programs to connect to them on published ports.
ServerSockets are different from normal Sockets. When you create a ServerSocket, it will register
itself with the system as having an interest in client connections. The constructor for ServerSocket
specifies the server's port number, i.e. the port on which it will accept connections. Also one can
specify the queue-length. The queue length tells the system as to how many client connections it
can leave pending before it should start refusing connection-requests. The default length is 50.
19. What are packages as applicable to Java programming?
Ans. Packages are the powerful measures of grouping related classes and interfaces together into a
single unit. Packages provide a mechanism for managing a large group of related classes and
interfaces and also to avoid naming conflicts. This is similar to the grouping of related files into a
folder, where the names of files can be repeated in different folders and thus resolve nameconflicts. Packages also resolve class name conflicts. For example, suppose you named a class
containing details of students as class Student. Later one day you realized that you need to create
another class containing details of students of a different school. You cannot name this class as
Student. You will have to devise some other descriptive name for this class. Such situations are
avoided in Java, using the mechanism of packages.
20. What is classpath?
Ans. The specific location where Java compiler looks for a class for running it is known as the
classpath. If we have created classes so that they belong to a particular package, then it is very
necessary that we change the classpath to include the location of the directory of the package. For
example, to include a directory "employee" (c:\Java\programs\employee) in the classpath, we
need to give the following command at the command prompt:
set classpath= ; c:\Java\Programs; c:\Java\programs\employee
and press.the key <Enter>
21. Write short notes on:
Ans.
(a) Proxy Servers
Proxy servers act as the secure gateway to the Internet for client computers. They are transparent
to client computers. This means that the user interacting with the Internet through a proxy server
is not aware of the fact that a proxy server is handling the requests. Similarly, the Web server
receiving the requests is unware of the fact that the proxy server is sending the interpretedrequests and not the client computer(s).
Proxy server can be used to secure private networks connected to the unsecure Internet. They
monitor and manage network access, i.e. they act as a security agent for a private network.
(b) Characteristics of Java
Java has the following main characteristics which make it effective and distinct language from
other high-level
languages:
• Simplicity: Java is easier to learn and use than other high-level languages such as C and C++
and C# because Java does not use pointers.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 179
Institute for Competitive Exams
• Networking features: Java supports networking and distribution of objects in an enterprise
environment. Java library includes a package called java.net that enables network computing
easier.
• Interpretation of programs: Java compiler translates Java source code into bytecode rather
than an executable binary code.
• Robustness: Java platform is so designed that Java programs run correctly and do not fail.
• Portability: Java is architecture-neutral which means Java programs can run on any
microprocessor, operating system and hardware-platform.
• Multithreaded: Java includes classes that specifically support multithreaded programs.
Multithreading refers to the concurrent execution of different segments of a single program,
simultaneously.
22. Is JavaScript a subset of Java? Give reasons.
Ans. No, JavaScript is not a subset of Java. Programming language JAVA was developed by Sun
Microsystems and JavaScript was developed by NetScape corporation of USA. The two languages
are not related in any way.
JavaScript source code is embedded within an HTML tag and it is executed at the client machine,
whenever the corresponding webpage is loaded in the Web browser such as Netscape Navigator.
The entire web page is downloaded by the browser and the JavaScript code is executed when an
event is triggered. Thus, JavaScript is used to extend the usefulness of a web page. It can be used to
perform functions like ensuring that user is entering data into the forms correctly, to create pop up
windows, etc.
23. Explain Wrapper classes. Give an example.
Ans. Wrapper classes are classes that provide object versions of the fundamental datatypes. For
example, there is an Integer class for the int datatype, Character class for the char datatype,
Double class for the double datatype etc.
24. Applets are event-driven programs. Discuss.
Ans. Applets are event-driven programs. This means that they wait for some event to occur before
performing any action. Events, such as clicking with a mouse inside the applet's window, pressing
a key, etc. are notified to the applet by AWT (Abstract Window Toolkit). Once notified, the applet
performs the desirable action and returns control to the AWT.
25. Write short notes on the following classes:
Ans.
(a) Vector
Vector class is a class that implements the dynamically-allocated list of objects. This class attempts
to optimize storage by increasing the capacity of the list only when needed. And when it
increments capacity, it allocates space for more than one object. With this mechanism, there is
usually some excess capacity in the list. When this capacity is exhausted, the list is reallocated to
add another block of objects at the end of the list. Because of this dynamic mechanism, the
capacity (available space in the Vector object) and the size (space currently occupied in the Vector
object) usually are not the same.
(b) Stack
Stack class implements objects as Last In, First Out (LIFO). Even though, it is based on (extends)
Vector class, Stacks are not accessed in a direct fashion. Instead, values are pushed into stack and
popped-off from the top of the stack. The net effect is that values that were most recently pushed
are the first to be popped (taken out).
(c) Dictionary
Dictionary class is an abstract class. It is used as a base for other utility classes. The Dictionary
class implements a data structure that allows a collection of key and value pairs to be stored. Any
type of object can form the keys or the values. Typically, the keys are used to find a particular
value.
26. Write a short note on the Object class.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 180
Institute for Competitive Exams
Ans. An Object class is the superclass of all Java classes. All the classes that we develop will inherit
the variables and methods of Object class. The Object class implements the following important
methods:
Object clone()
boolean equals(Object obj)
int hashCode()
final Class getClass()
String toString()
27. Give the output of the following program:
class Bit
{
public static void main (String args[])
{
int x = 5, y = 6;
System.out.prmtln("x = "+x);
System.out.println("y = "+y);
System.out.println("x & y = "+(x&y));
System.out.println("x | y = "+(x | y));
System.out.println("x ^ y = "+(x ^ y));
}
}
Ans. The output of the given program will be as follows:
x=.5
y=6
x&y=4
x|y=7
x^y=3
28. Write a Java application to generate the following output:
Hello World
Hello Everyone
Ans.
class HelloW
{
public static void main(String args[])
{
System.out.println("Hello World");
System.out.println("Hello Everyone");
}
}
29. Write a Java program that will check the equality of two strings passed as
command-line arguments.
Ans.
class Test
{
public static void main(String args[])
{
if(args[0].equals(args[1]))
System.out.println("The two strings are equal");
Else
System.out.println("The two strings are not equal");
}}
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 181
Institute for Competitive Exams
30. Write short notes on garbage collection in Java?
Ans. Memory is allocated for an object using the new operator. But how is memory deallocated
when an object is no longer required. Unlike C/C++, where objects must be destroyed manually
using the delete operator, Java handles memory deallocation automatically, by a process called
garbage collection.
When no reference to an object exists, then that object is considered to be no longer required and
hence becomes a suitable candidate for garbage collection.
31. What is the purpose of:
Ans.
(a) Compiler Class:
Compiler class provides the framework for native Java code compilers and related services. Java
runtime system looks for a native code compiler on start-up. This is then called to compile Java
bytecode classes into native code. The class Compiler is not normally used in programming.
(b) Thread Class
Thread class of java.lang package provides the overhead necessary to manage threads executing in
a process. This class is the basis for multithreaded programming in Java.
32. How are Observer and Observable used in Java?
Ans. Objects that subclass the Observable class maintains a list of observers. When an Observable
object is updated it invokes the update() method of each of its observers to notify the observers
that it has changed state. The Observer interface is implemented by objects that observe
Observable objects.
33. Which java.util classes and interfaces support event handling?
Ans. The EventObject class and EventListener interface support event processing.
34. Write a Java program to create a directory.
Ans.
import Java.io.*;
class Test
{
public static void main(String args[])
{
String file = "f:/java/mes";
File f = new File(file);
boolean b = f.mkdir();
if(b)
System.out.println("Directory successfully created");
Else
System.out.println("Error in creating Directory");
}
}
35. What is swing? What are the functions that Java swings can perform?
Ans. Swing is a set of classes that provides more powerful and flexible components than are
possible with the AWT (Abstract Windows Toolkit). It supplies buttons, check-boxes, labels,
tabbed panes, scroll panes, trees, tables, dialog boxes etc. That is, it provides a large number of
GUI controls. Swing is compatible with AWT, and swing components can be used interchangeably
with AWT components, swings can only be used with the JDK 1.1 (and above) event model. It does
not support the JDK 1.0 event model.
Most of the swing components are contained in javax.swing package. Therefore, to use swing
components, in your application, you must import the javax.swing package. The package contains
classes and interfaces that support and manage the GUI components.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 182
Institute for Competitive Exams
I. Multiple Choice Questions Set 1
1. A good reason to use an object-oriented language is that
a. you can define your data types
b. program statements are simpler than in procedural languages
c. an object-oriented program can correct its own mistakes
d. it is easier to conceptualize an object-oriented program and reuse the code
2. Which of the following is a wrapper class?
a. String
b. Integer
c. Float
d. none of these
3. The characteristic that data can be manipulated only through member functions that are part of
the specified class is called
a. Encapsulation
b. Data dependency
c Inheritance
d. Instantiation
4. In order for the source code file, containing the public class Test to successfully compile, which
of the following must be true:
a. it must import java.lang
b. it must declare a public class named Test
c. it must be named Test.java
d. all of the
above
5. Which of the following is a valid main() method?
a. public static void main()
b. public static void main(String s[])
c. void main(String args[])
d. none of these
6. Which one of the following manages the JDBC drivers
a. class SQL
b. class DriverManager
c. jdbcodbc
d. none of these
7. The method that can be used in situations where no results are expected except a row-count
status is:
a. executeQuery()
b. execute()
c. both a and b
d.
executeUpdate()
8. Select the wrong statement:
a. JDBC stands for Java Database Connectivity
b. JDBC was developed by Sun
Microsystems
c. JDBC is implemented through java.sql package
d. all of the above are true
9. The class used to perform basic console I/O is
a. System
b. SecurityManager
c. Math
d. Runtime
10. The protocol used to communicate between different types of machines and networks is
a. client-server
b. TCP/IP
c. java.net
d. SMTP
II. Fill in the Blanks out of the following:
a. bytecode
b. Web browser
c. application programs
d. portability
e. independent
f. insensitive
g. .jav
h. JavaScript
i. .Java
j. applets
k. sensitive
l. encapsulation
m. .class
n. insensitive
o. sensitive
1. Java has greater _____ across different platforms than 'C++' programming language.
2. _____ can be embedded in HTML pages.
3. _____ are executed from the command-line.
4. The Java compiler compiles the source file into _____ and these are then interpreted by the
JVM.
5. _____ is the gathering of related data members and methods together to achieve data hiding.
6. _____ can load and interpret the Java class files.
7. Java is architecture _____.
8. Java filenames are case _____.
9. Java program files must have the extension _____.
10. Java compiled programs have an extension _____.
Answers
I.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 183
Institute for Competitive Exams
1. d
6. b
II.
1. d
6. b
2. b
7. d
3. a
8. b
4. c
9. a
5. b
10. b
2. j
7. e
3. c
8. k
4. a
9. I
5. l
10. m
I. Multiple Choice Questions Set 2
1. Which of the following is a valid Java comment?
a. \\This is a comment
b. /*This is a comment*/
c. /**This is a comment
d. \*This is a comment*\
2. Which of the following will cause the String object referenced by s to be changed?
a. s.concat()
b. s.toUpperCase()
c. both a and b
d. s.replace()
3. The method called upon when a portion of the window needs to be redrawn is:
a. repaint()
b. drawlmage()
c. paint()
d. none of these
4. Which of the following is the most correct statement?
a. all variables must be declared before they are used in Java
b. the data type of variables is assigned dynamically in Java
c. all variables can be declared at the end of the Java program
d. all of the above
5. The following is one of the ternary operators provided by Java
a. ?
b. ::
c. «
d. &&
6. Which of the following is a reserved word in Java:
a. template
b. throwing
c this
d. both b and c
7. Which of the following is a valid Java identifier?
a. %id
b. #$id
c. _id
d. #id
8. Which of the following is a primitive data type?
a. byte
b. String
c. integer
d. float
9. What is the range of the char data type?
a. 0 to 216
b. 0 to 216 – 1
c. 0 to 215
d. 0 to 215-1
10. Which of the following is a valid double literal?
a. 10 ed
b. 1e-5D
c. e2D
d. 1De
II. Fill in the Blanks out of the following:
a. 0 to 9
b. StringBuffer
c. constant
d. String
e. keyword
f. curly braces
g. data type
h. toString()
i. identifier
j. type casting
k. Unicode
l. comment
m. 1 to 10
n. ascii
o. white space
1. _____ are reserved identifiers that cannot be used to name user-defined variables or methods.
2. _____ is used to force a conversion from one data type to another.
3. _____ is a two-byte character code set used by Java.
4. Array elements must all be of the same _____.
5. The elements of a ten-element array are numbered from _____.
6. A block of code is delimited by _____.
7. _____.is a value that does not change during the execution of the program.
8. _____.supports growable, modifiable strings.
9._____.literals are specified using double quotes.
10. The Object class provides the _____.method to convert other objects to string objects.
Answers
I.
1. b
2. c
3. d
4. a 5. a
6. d
7. c
8. a
9. b 10. b
II.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 184
Institute for Competitive Exams
1. e
6. I
2. j
7. c
3. k
8. b
4. g
9. d
5. a
10. h
I. Multiple Choice Questions Set 3
1. What is the value of the expression "9 + 8 % 7 + 6"?
a. 17
b. 16
c. 13
d. 4
2. An expression in Java
a. evaluates to a numerical value
b. indicates the emotional state of the
program
c. always occur outside a function
d. may be a part of a statement
3. Images are objects of the class:
a. ImageObserver
b. ImageProducer
c. Image
d. Canvas
4. Select out of the following, the flag that indicates that some more pixels needed to draw an
image has been received:
a. SOMEBITS
b. MOREBITS
c. ALLBITS
d. none of these
5. The output of the following program when it is invoked using the command line is:
Java Test this is a test?
class Test
{
public static void main(String s[])
{
System.out.println(s[0]);
}
}
a. this
b. is
c. this is a test?
d. none of these
6. What will be the output of the following program?
class Test
{
public static void main(String args[]) {
byte[] b = new byte[2];
b[l] = 2;
b[2] = b[l]*5;
System. out.println(b[l]); }}
a. 0
b. 10
c. null
d. none of these
7. What is the result of the following program?
class Test
{
public static void main(String args[])
{
int i = 7; int j = 8;
int n = (i | j)%(I & j);
System.out.print(n);
}}
a. 0
b. 15
c. generates run-time error d. -15
8. A file format that is most suitable for Internet is:
a. GIF
b. JPG
c. TIFF
d. BMP
9. Which Component method is used to access a components' immediate Container?
a. getVisible()
b. getlmmediate()
c. getParent()
d. getContainer()
10. The method used to set the text of a JLabel object is
a. setTextLabel()
b. setLabel()
c. setText()
d. setLabelText()
11. In a for loop with a multi-statement loop body, semicolons should appear after
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 185
Institute for Competitive Exams
a. the for statement itself
b. the closing brace in a multi-statement
loop body
c. each statement within the loop body
d. none of these
12. A variable defined within a block is visible
a. from the point of definition onwards in the program b. from the point of definition in the
function
c. from the point of definition onwards in the block
d. none of these
13. Select the correct statement:
a. A dialog can have a menu bar
b. JMenuItem extends JMenu
c. A menu item can be added to a menu
d. both a and c
14. Which of the following is/are by default window based programs:
a. Java Applications
b. Java Applets
c. Both
d. None of these
15. The method called upon when a portion of window needs to be redrawn is:
a. update()
b. repaint()
c. paint()
d. none of these
II. Fill in the Blanks out of the following:
a. white space
b. unary
e. three
f. operand
i. 8 bit
j. ++
m. ensureCapacity()
n. _
c. \n
g. precedence
k. constant
o. +
d. delete()
h. literals
l. 16 bit
1. _____ are also known as constants.
2. Every Java operator has a _____ associated with it.
3. Ternary operators require _____ operands for calculations.
4. The compiler removes all _____ before compilation.
5. Character literals represent _____ Unicode characters.
6. The _____ operator increments the value of an integer variable by one.
7. _____ operator acts on single integer.
8. The character representation of new line is _____.
9. _____ deletes a sequence of characters from the invoking string.
10. _____ method ensures that the capacity of the invoking string is initially equal to the specified
capacity.
Answers
I.
1. b
2. d
3. c
4. a 5. a
6. b
7. c
8. a
9. c 10. c
11. c
12. c
13. c
14. b 15. a
II.
1. h
2. g
3. e
4. a 5. l
6. j
7. b
8. c
9. d 10. M
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 186
Institute for Competitive Exams
Visual Basic Programming
1. What is Visual Basic?
Ans. "Visual" in Visual Basic refers to the method used to create the graphical user interface
(GUI). Rather than writing many lines of code for the appearance and location of interface
elements used in a program, you can simply add pre-built objects on the screen.
The "Basic" in Visual Basic refers to the popular known BASIC (Beginners All-Purpose Symbolic
Instruction Code) language, used by many programmers. Visual Basic has thus evolved from the
original BASIC language and now contains several hundred statements, functions and keywords,
many of which relate directly to the Windows GUI. Beginners can create applications by learning
just a few of the keywords.
2. What are the different versions of Visual Basic?
Ans. Visual Basic is available in three versions. Each version is geared to meet a specific set of
development requirements.
• Visual Basic Standard or Learning edition allows programmers to easily create powerful
applications for Microsoft Windows and Windows 2000.
• The Professional edition of Visual Basic provides a full-featured set of tools for developing
solutions for professionals. It includes all the features of the Learning edition, plus additional
ActiveX controls, the Internet Information Server Application Designer, integrated Visual
Database Tools and Data Environment.
• The Enterprise edition of Visual Basic allows professionals to create robust distributed
applications in a team setting. It includes all the features of the Professional edition, plus Back
Office tools such as SQL Server, Microsoft Transaction Server, Internet Information Server, Visual
SourceSafe, SNA Server, etc.
3. What is integrated development environment? Write about the different elements
of IDE.
Ans. Building an application comprises writing a piece of code and thereafter compiling it. The
written code needs to be debugged, deployed, and maintained by the developer. To achieve this,
the developer requires tools that provide an environment conducive to writing a program. For
instance, the SDK (Software Development Kit) provides you with the compiler, that compiles your
program, and a debugger, that debugs your program. This software is generally categorized as
Integrated Development Environment (IDE).
Visual Basic integrated development environment (IDE) consists of the following elements:
(a) Menu Bar
(b) Context Menu
(c) Toolbars
(d) Toolbox
(e) Project Explorer Window
(f) Properties Window
4. Write short notes on:
Ans.
(a) Project Explorer
Project Explorer window lists the forms and modules in your current project. A project file
contains the list of files and the disk locations of all such files needed for the project. The same
form can be added to more than one project file. Any changes made to a common form in one
project file will also be reflected in other project file(s).
(b) Properties Windows
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 187
Institute for Competitive Exams
Properties window lists the property settings for the selected form or control. Property is the
characteristic of an object. For example, the size, caption, or colour of an object. When you select
multiple controls, the Properties window contains a list of properties which are common to all the
selected controls.
(c) Form Layout Window
Form Layout Window allows you to position the forms in your application using a small graphical
representation of the screen. When you re-size the Form Layout window, each form is sized
relative to the size of the design window. The upper left corner of the client area represents the
coordinates (0, 0) of the desktop. You can change the resolution using the Resolutions Guides
command on the shortcut menu.
5. What is the difference between SDI and MDI Interface?
Ans. Two different styles are available for the Visual Basic IDE: single document interface (SDI)
or multiple document interface (MDI). With the SDI option, all of the IDE windows are free to be
moved anywhere on screen; as long as Visual Basic is the current application. They will remain on
top of any other applications. With the MDI option, all of the IDE windows are contained within a
single resizable parent window.
6. Write short notes on
Ans.
(a) Editor Format Tab
This tab specifies the appearance of the Visual Basic code. Various Tab Options are as follows:
• Code Colors: It determines the foreground and background colours used for the type of text
selected in the list box.
• Font: Specifies the font used for all code.
• Size: Specifies the size of the font used for code.
• Margin Indicator Bar: Makes the margin indicator bar visible or not visible.
• Sample: Displays sample text for the font, size, and color settings.
(b) Docking Tab
Docking tab allows you to choose which windows you want to be dockable. When you move a
dockable window, it "snaps" to the location. A window is not dockable when you can move it
anywhere on the screen and leave it there.
7. What is an Event in Visual Basic?
Ans. An event is an action recognized by a form or the control. Event-driven applications execute
Basic code in response to an event. Each form and control in Visual Basic has a predefined set of
events. If one of these events occurs and there is code in the associated event procedure, Visual
Basic invokes that code.
8. What is the difference between a Function procedure and a Sub procedure?
Ans. A Sub procedure is a block of code that is executed in response to an event. By breaking the
code in a module into Sub procedures, it becomes much easier to find or modify the code in an
application. Sub procedures are classified into two types:
(a) General procedures
(b) Event procedures
A Function procedure is a separate procedure that can take arguments, perform a series of
statements, and change the value of its arguments. Unlike a Sub procedure, a Function procedure
can return a value to the calling procedure. The syntax for a Function procedure is as follows:
[Private|Public] [Static] Function procedurename (arguments) [As type]
statements
End Function
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 188
Institute for Competitive Exams
9. Differentiate between Standard and Class modules?
Ans. Difference between standard and class modules are given below:
Class Modules
Standard Modules
Public variables in a class module can only be Variables declared Public in a standard module
accessed if you have an object variable are visible from anywhere in your project.
containing a reference to a particular instance of
a class.
Class modules are an implementation of object Standard modules are an implementation of
oriented programming language.
procedural language.
All the objects have their own copies of member Only one copy of global variables exists.
data.
10. Explain the term Scope of a variable? What are the different levels of Scope in
Visual Basic?
Ans. When you declare a variable within a procedure, only code within that procedure can access
or change the value of that variable. It has a scope that is local to that procedure. The scope of a
variable determines the sections of an application in which the variable can be used.
In Visual Basic variable is scoped as follows:
Private: They are available only to the module in which they are declared.
Module-Level: They are available to all procedures in that module but not by procedures in other
modules.
Public: They are available to all procedures in all modules in all applications.
11. What is an array? What types of arrays are available in Visual Basic?
Ans. An array is an ordered series of data values, called elements that are referenced by number.
Because arrays exist in memory, they provide fast data access and ease of manipulation. You can
easily specify, locate, or manipulate elements in an array. For example, you cannot have one
element of the Integer data type and another of the Boolean data type in the same array. In Visual
Basic there are three types of arrays:
(a) Fixed-size Array which always remains of the same size, and
(b) Dynamic Array whose size can change at run-time, and
(c) Multidimensional Array allow you to keep track of related information in an array.
12. Explain PaintPicture method.
Ans. PaintPicture method helps to draw the contents of a graphics file (.bmp, .wmf, .emf, .cur,
.ico, or .dib) on a Form, PictureBox, or Printer. Syntax:
object.PaintPicture picture, xl, yl, widthl, heightl, x2, y2, width2, height2, opcode
For example, you can use the PaintPicture method to create multiple copies of the same bitmap,
and tile them on a form. Using this method is faster than moving picture controls on a form.
13. What is control's DrawMode property?
Ans. DrawMode property determines what happens when you draw one pattern on top of another.
Although changing the Draw-Mode property usually has some effect (especially with color
systems), it is often not necessary to use this property when you are drawing on a blank or pure
white background, or on a background of undifferentiated color.
14. Explain the Refresh method and Transparent Drawing?
Ans. Refresh method forces a complete repaint of a form or control. The Paint event is invoked
when the Refresh method is used. If the AutoRedraw property is set to True, repainting or
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 189
Institute for Competitive Exams
redrawing is automatic, so no Paint events are necessary. Using a Refresh method in a Resize event
procedure forces repainting of the entire object every time a user resizes the form.
Setting the BackStyle property of the control object to Transparent allows whatever is behind your
control to be seen. When the BackStyle property is set to Transparent, the BackColor and Picture
properties of the control are ignored. Setting BackStyle to Transparent may affect the performance
of your control.
15. What is Multiple Document Interface (MDI)?
Ans. The multiple-document interface (MDI) allows you to create an application that maintains
multiple forms within a single container form. Applications such as Microsoft Excel and Microsoft
Word for Windows use multiple-document interfaces.
16. Write a short note on API Viewer?
Ans. API Viewer application enables you to browse through the declares, constants, and types
included in any text file or Microsoft Jet database. After you find the procedure you want, you can
copy the code to the Clipboard and paste it into your Visual Basic application. You can add as many
procedures as you want to your application.
17. Explain ActiveX Document.
Ans. An ActiveX document is an application that runs inside a container, such as Internet
Explorer, instead of running as a standalone program.
ActiveX documents get their names from their similarity to word processing documents (.DOC) or
spreadsheet documents (.XLS). These files must be viewed using a container program such as
Microsoft Word or Microsoft Excel. Files that need containers to be viewed cannot be launched
independently of the required viewer. For example, you can view a spreadsheet created in Excel
only on machines that have Excel installed on them.
The key item to note about ActiveX documents is that they are entire applications. Unlike ActiveX
controls that are placed on a form to create an application, ActiveX documents are form objects
that have controls placed on them to create the user interface. This method of creating applications
allows the developer to create ActiveX documents that can be treated as objects to create
applications that are component based.
18. Explain the debugging tools with their functions?
Ans. Debugging tools and their function are given below:
Debugging tool
Purpose
Breakpoint
Defines a line in the Code window where Visual Basic suspends execution of
the application.
Step Into
Executes the next executable line of code in the application and steps into
procedures.
Step Over
Executes the next executable line of code in the application without stepping
into procedures.
Step Out
Executes the remainder of the current procedure and breaks at the next line
in the calling procedure.
Locals Window
Displays the current value of local variables.
Immediate
Allows you to execute code or query values while the application is in break
Window
mode.
Watch window
Displays the values of selected expressions.
Quick Watch
Lists the current value of an expression while the application is in break
mode.
Call Stack
While in break mode, presents a dialog box that shows all procedures that
have been called but not yet run to completion.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 190
Institute for Competitive Exams
19. What do you mean by ADO (ActiveX Data Objects)? Explain the components of
the ADO model?
Ans. ADO is a set of objects that allow programmers to code their data access logic from languages
like Visual Basic as well as scripting languages. ADO is a higher-level model than OLE DB, which
means that it simplifies some of the complexities of programming with OLE DB. Thus, ADO is
much easier to use than OLE DB.
The three main components of the ADO model are:
(a) Connection Object: ADO provides the Connection object for establishing and managing
connections between your applications and OLE DB compliant data .sources or ODBC compliant
databases. The Connection object features properties and methods you can use to open and close
database connections, and to issue queries for updating information.
(b) Command Object: The Command object represents an SQL statement, stored procedure, or
any other command that can be processed by the data source. It is used to build queries, including
user-specific parameters, in order to access records from a data source. Typically, these records are
returned in a Recordset object.
(c) Recordset Object: For retrieving data, examining results, and making changes to your
database, ADO provides the Recordset object. As its name implies, the Recordset object has
features that you can use, depending on your query constraints, for retrieving and displaying a set
of database rows, or records. The Recordset object maintains the position of each record returned
by a query, thus enabling you to step through results one item at a time.
20. Explain different types of cursors in ADO?
Ans. There are four different types of cursors. These are as follows:
• Dynamic cursor that allows you to view additions, changes, and deletions by other users. It
allows all types of movement through the Recordset that does not rely on bookmarks. It also allows
bookmarks if the provider supports them.
• Keyset cursor that behaves like a dynamic cursor, except that it prevents you from seeing
records that other users add. It prevents access to records that other users delete. Data changes by
other users will still be visible. It always supports bookmarks and therefore allows all types of
movement through the Recordset.
• Static cursor that provides a static copy of a set of records for you to use to find data or
generate reports. It always allows bookmarks and therefore allows all types of movement through
the Recordset cursor Additions, changes, or deletions by other users will not be visible. This is the
only type of cursor allowed when you open a client-side Recordset object.
• Forward-only cursor which behaves identically to a static cursor except that it only allows you
to scroll forward through records. This improves performance in situations where you need to
make only a single pass through a Recordset.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 191
Institute for Competitive Exams
Visual Basic Programming
I. Multiple Choice SET 1
1. Visual Basic is a tool that allows you to develop applications in
a. Real time
b. Graphical User Interface (GUI)
c. Menu driven
d. None of these
2. IDE stands for
a. Internet Development Environment
b. Integrated Dual Environment
c. Integrated Development Environment
d. Integrated Desktop Environment
3. Which window displays a list of all forms and modules making up your
application?
a. Project window
b. Properties window
c. Form Layout window
d. All of the above
4. From the Project window you can also obtain a view of
a. Form or Code windows
b. Properties window
c. Immediate window
d. All of the above
5. Properties can be viewed in two ways
a. Alphabetic and Numeric
b. Numeric and Alphanumeric
c. Alphabetic and Categorized
d. None of these
6. Which of the following windows is the central to the development of Visual Basic
applications
a. Project window
b. Form window
c. Properties window
d. All of the above
7. Which of the following provides quick access to commonly used commands in the
programming environment:
a. Toolbox
b. Object Browser
c. Toolbars
d. None of these
8. If you declare an array in a Module and you want every procedure to access it,
then declare it as:
a. Private
b. Public
c. Private or Public
d. None of these
9. To find the upper and lower limits of an array in terms of elements use
a. Ltrim and Rtrim function
b. Lbound and Ubound functions
c. LowerVal and UpperVal functions
d. All of the above
10. What is the output of the following code?
Mystring = "Hello World"
LeftString = Left (MyString, 3)
a. Hel
b. Hello World
c. World
d. Wor
II. Fill in the Blanks out of the following:
a. Drop-down lists
b. Properties window
c. Form Layout window
d. BASIC
e. Form Designer
f. Project Explorer
g. Code Editor
h. Controls
i. Object Browser
j. Alphabetic and Categorized
k. Project
window
1. Visual Basic is based on ._____.
2. The Menu bar has ._____ from which you control operation of Visual Basic environment.
3. The _____ window lists the forms and module in your current project.
4. The _____ is used to establish initial property values for objects.
5. _____ serves as window, which helps you to design the interface for your application.
6. The Visual Basic ____ is a window where you write code for the project.
7. The _____ shows where (upon program execution form will be displayed relative to monitor's
screen)
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 192
Institute for Competitive Exams
8. Properties window has two tabs: _____ and _____
9. _____ is used for finding out about objects, properties and methods.
10. The buttons in the toolbox depict _____.
Answers SET 1
I.
1. b
2. c 3. a 4. a 5. c
6. b 7. c
8. b 9. b 10. a
II.
1. d 2. a 3. f
4. b 5. e 6. g 7. c
8. j
9. i
10. h
I. Multiple Choice SET 2
1. A project under the following application runs in the environment of a container
that supports hyper linking.
a. Standard EXE
b. ActiveX EXE
c. ActiveX Document
d. All of these
2. Which of the following is not general tab control for default setting
a. Error trapping
b. Show ToolTips
c. Tab Width
d. Notify before State Loss
3. Which of the following is not the feature of the editor tab.
a. Auto Syntax Check
b. Form Grid Settings
c. Auto List Members
d. Auto Quick Info
4. To access code window, the key to be pressed is
a. F1 key
b. F5 key.
c. F7 key
d. None of these
5. To create group of controls, you place them on another control called
a. Group
b. Container
c. Collection
d. None of these
6. MouseDown event takes place when you
a. Click the left mouse button
b. Press the mouse button
c. Mouse is moved over a control
d. All of the above
7. The option that does not belong to the Environment tab is
a. When Visual Basic Starts
b. Window Settings
c. When Program Start
d. Show Templates For
8. The Form Module has file extension,
a. .frb
b. fra
c. .frm
d. fru
9. The elements of user interface are
a. Toolbox and Toolbar
b. Project and Module
c. Forms and Controls
d. None of these
10. Properties can be viewed in two ways
a. Alphabetic and Numeric
b. Numeric and Alphanumeric
c. Alphabetic and Categorized
d. None of these
II. Fill in the Blanks out of the following:
a. .vbp
b. Controls
c. General tab
d. The Editor tab
e. 2048, 32000
f. MaxLength
g. Forms, Controls
h. Frame
i. Editor Format tab
j. Auto Syntax Check
k. .vb
l. F1 key
1. The basic elements for creating user interface are _____ and _____.
2. Visual Basic maintains a project file with the extension _____
3. Customization of colours as well as the font used in a module of VBA (Visual Basic Application)
display is enabled with the help of _____
4. _____ specifies the code window and project window settings.
5. Text boxes, Labels, Scroll bars, Command buttons are known as _____.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 193
Institute for Competitive Exams
6. A Text box can hold as many as _____ characters for a single-line text and _____ characters
for a multi-line text.
7. _____ control is used to provide an identifiable grouping for other controls.
8. The _____ property is used to set the maximum length of a text, a textbox can hold.
9. Drag-and-drop text editing is contained in _____.
10. _____ tab option allows you to determine whether Visual Basic should automatically verify
correct syntax after you enter a line of code.
Answers
I.
1. c
2. c 3. b 4. c 5. b 6. b 7. b 8. c 9. c 10. c
II.
1. g
2. a 3. i
4. d 5. b 6. e 7. h 8. f
9. j
10. c
I. Multiple Choice SET 3
1. Following statements are true about variable names except
a. The first character must be a letter
b. They may include letters, numbers, and
underscore
c. Can be any length
d. You cannot use a reserved word
2. If variables are not implicitly or explicitly type, they are assigned the type by
default:
a. Character
b. Integer
c. Variant
d. None of these
3. ___ Procedure performs a task and does not report any thing to the calling
program
a. Subroutine
b. Function
c. Property
d. All of the above
4. What is the output of the following code?
Mystring = "Hello World"
Location = Instr (MyString, "rid")
a. 10
b. 9
c7
d. 11
5. Calling procedure from outside a module depends on one of the following:
a. The type of procedure
b. Where the procedure is located
c. Where the calling program is located
d. All of the above
6. For branching and decisions, the structure used is:
a. Do/Loop
b. For/Next
c. If/Then/Else/End If
d. None of these
7. What are the different types of Procedures?
a. Sub, Function, Property
b. Local, Global, Static
c. Numeric, String, Constant
d. All of these
8. All the following statements are true about variable scope except:
a. Local
b. Module
c. Global
d. Static
9. The variables that does not change the value during execution of a program is
a. Numeric
b. String
c. Constant
d. All of the above
10. ___ array is of multiple dimensions and size can vary during the course of
program
a. Multidimensional array
b. Dynamic array
c. One-dimensional array
d. All of the above
II. Fill in the Blanks out of the following:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 194
Institute for Competitive Exams
a. Procedure
b. Do/loop
c. Select Case/End Select d. Switch
e. Scope
f. Dim
g. For/Next
h. Event Name
i. Exit Statement
j. Public
k. Variables
l.
Sub
Procedures
1. An event procedure for a control combines the control's actual name, an underscore (_), and the
_____.
2. VB's CASE structure is the equivalent of C++'s _____ function.
3. _____ are used by Visual Basic to hold information needed by an application.
4. Following is the syntax of _____.
[Private | Public] [Static] Sub <procedure_name> (arguments)
<statements>
End Sub
5. To explicitly type a variable, you must first determine it’s _____
6. Within a procedure, variables are declared using the _____ statement.
7. _____is a self-contained segment of code that performs a specific task.
8. The _____ decision structure can be used when there are multiple selection possibilities.
9. Sub Procedures are by default _____ in all modules, which implies that they can be called from
anywhere in the application.
10. Looping is done with the _____ format.
Answers
I.
1. c
2. c 3. a 4. b 5. d 6. c 7. a 8. d 9. c 10. b
II.
1. h 2. d 3. k 4. l
5. e 6. f
7. a 8. c 9. j
10. b
I. Multiple Choice SET 4
1. When the form is first referenced in any manner by program, the triggered event
is
a. Load
b. Initialize
c. Activate
d. None of these
2. When the form is first placed in memory using Load statement or Show method,
the triggered event is
a. Load
b. Show
c. Activate
d. None of these
3. When the form receives focus from another form, the triggered event is
a. Load
b. Show
c. Activate
d. None of these
4. What is the sequence in which the following events are triggered when a form is
loaded?
a. Initialize, Resize, Paint and Load
b. Load, Initialize, Resize and Paint
c. Initialize, Load, Resize and Paint
d. Initialize, Paint, Load and Resize
5. What is the sequence of events when a form is unloaded?
a. QueryUnload, Unload, Terminate
b. Unload, QueryUnload, Terminate
c. QueryUnload, Terminate, Unload
d. None of these
6. The method, which loads the form into memory and displays it on-screen:
a. Load
b. Show
c. Display
d. All of these
7. What properties are required to be specified for a menu item?
a. Name
b. Caption
c. Both a & b
d. a or b
8. How can you enable the user to access a menu item from the keyboard?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 195
Institute for Competitive Exams
a. Define the Caption property
b. Define a shortcut key by setting the Shortcut
property.
c. The user can and use cursor keys
d. All of the above
9. All the following statements about access keys are true except
a. Alt plus a key to cause the drop down list of top-level menu to appear.
b. Alt + access key should be pressed to access an item on the list.
c. You can get multiple top-level items with the same access key.
d. An Ampersand [&] is placed in front of character to be used as an access key in the Caption
property.
10. Which of the following statements about pop-up menus are true?
a. A pop-up menu can not be used as a main menu
b. A pop-up menu can be created from a sub-level menu.
c. A pop-up menu should have only single levels.
d. All of the above.
1. b
2. a
3. c
Computer and IT
4. b
5. a
6. b
7. c
Answers
8. d 9. b
10. d
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 196
Institute for Competitive Exams
Unix and Shell Programming
1. What are the two primary objectives of having an operating system in a computer?
Ans. The two primary objectives of an operating system are:
(a) To enable running of Application programs.
(b) To manage the different computer resources.
2. What is a PCB (Process Control Block)? What does it contain?
Ans. The Operating System (OS) records all information that it needs about a particular process
into a data structure called a process descriptor or PCB (Process Control Block). Whenever a
process is created (or initialized), the OS creates a corresponding PCB to store its description.
When the process terminates, its PCB is released. A process in dormant state has no PCB. A
process becomes known to the OS and thus eligible to compete for the system resources only when
it has an active PCB associated with it.
A Process Control Block (PCB) contains the following pieces of information about a process:
(a) Process ID
(b) Priority
(c) State
(d) Hardware state
(e) Scheduling information
(f) CPU usage statistics
(g) Memory management information
(h) I/O status
(i) File management information
3. List out some of the hardware and software facilities required for a
multiprogramming system to work properly.
Ans. The salient hardware and software facilities required for a multiprogramming system to
work properly are given below:
(a) Large sized main memory
(b) Memory protection algorithm
(c) Job status preservation
(d) Proper job mix
(e) CPU Scheduling algorithm
4. What is the difference between cp and mv commands? Explain with an example.
Ans. The command cp is used to copy a file into another. MS-DOS equivalent for cp is the COPY
command. Like in DOS, the cp command requires two arguments - a source filename, the contents
of which are to be copied, and a target filename, to which the contents are to be copied.
For example, to copy the file January into another file, say March, type the following command:
$ cp January March [Enter]
A file can be shifted from one directory to another by using the mv command. Equivalent
command in DOS is MOVE. The following command will displace the directory north from "sales"
directory to the directory "/usr/mini".
$ mv north /usr/mini/north [Enter]
The above command does not create a copy of "north" but displaces it.
5. What is. UNIX file system? Explain briefly the three types of files.
Ans. A UNIX file is a storehouse of information, which is simply a sequence of bytes. Since
everything is treated as a file in UNIX, input-output devices connected to the system are also files
in UNIX. For example, all information going to the VDU (Video Display Unit), is treated as if it
were being sent to a file called vdu.
Hence, whether it is a C language program under execution, or a directory that we use to keep the
groups of such programs, they are all files in the UNIX system. The three file types are:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 197
Institute for Competitive Exams
(a) Ordinary files / Regular Files: All files created by a user come under this category of files.
These include all data files, program files, object files and executable files. A user can make
changes to such files.
(b) Directory file: For each directory there is a file by the same name as the directory, which
contains information about files under that directory. For example, for the directory "mini", there
will be a directory file called mini in the directory /usr. This file contains information on all the
files and sub-directories under the directory "mini". A directory file is automatically created by
UNIX whenever a directory is created.
(c) Device files: Device files are special files typically associated with input-output devices, such
as printers, tapes, hard-disks, floppy disks, CD-ROMs etc. The output directed to device file is
transmitted onto the respective physical device associated with the file name. The kernel is
responsible for mapping the file names to their respective devices.
6. Distinguish between:
Ans.
(a) cat and more command
To create a file, type the command cat at the shell prompt, followed by a > character and the
filename. Its function is very similar to the command in DOS. For example, to create a file called
January under the current directory, enter the following command.
$ cat > January [Enter]
After you press Enter key, you will be prompted to enter the contents of the file. Type the required
data and press [Ctrl] + [D] keys together to terminate the command line. more command allows
you to view the output one screen at a time. For example, to view the output of ls command,
operated on uni01 file, one screen at a time, type the command.
$ more uni01.txt [Enter]
After each screen is displayed press [Enter] key to display the next line or press the spacebar key to
display the next screen full.
(b) tail and head command
Another command called, tail displays the bottom of a file. The following command will display
last 3 lines of file uni01:
$ tail -3 uni01 [Enter]
When used without arguments, it displays the last ten lines. To display the top of a file, the head
command is used. For example the following command will list the first six lines of file uni01.
$ head -6 uni01 [Enter]
When used without option, the head command will display first ten lines.
7. List out the different options ls command.
Ans. Following lists shows the different options of Is command and their uses:
Option Purpose
-x
get multi-columnar output.
-r
list files and sub-directories in reverse order.
-t
list files and sub-directories with time order.
-a
list all files, including the normally hidden files.
-A
list all files excluding . and .. .
-c
list files by inode modification time.
-i
list the inode for each file.
-l
display permissions, owner, size, modification time etc, alongwith file and directory
names
-h
display names of hidden files also
-q
display filenames having non-printable characters
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 198
Institute for Competitive Exams
8. What is the significance of the following directories in UNIX?
Ans.
(a) /usr: This directory contains the home directories of the users, source text for the online
manual (man) pages, games and other directories. There is one home directory for each user. For
example, for a user called "mini", there will be a directory with the same name in usr directory. The
directory mini will contain all the files and sub-directories created by the user "mini".
(b) /bin: This directory contains executable program files (binary files). In this directory, one can
find the files for the UNIX commands. It is similar to command.com file in DOS.
(c) /etc: This directory contains all the system-wide configuration information as text files.
(d) /lib: This directory contains the library files. Library files contain the reusable functions and
routines for the programmer to use.
(e) /dev: This directory contains the special device files. For example, the printer may be a file
known as prn in this directory, the .hard disk may be hda file and its first partition would be hda0.
9. What are the four components of a UNIX file system?
Ans. A UNIX file system consist of the following components:
(a) Boot Block: The boot block occupies the beginning of a file system.
(b) Super Block: The super block describes the state of a file system. It comprises of global
information about the file system.
(c) Inode Block: Inode block contains a table for every file of the file-system.
(d) Data Block: Data block contains data and programs created by the user.
10. Explain what are the operations performed by a UNIX system when you give the
following command:
$ Cat Stuff [Enter]
Note that file stuff is present in the directory sales.
Ans. When we give the command cat stuff, UNIX will first check whether we have read permission
to the "sales" directory or not. If yes, it will then check whether "sales" directory has "stuff" entry in
it or not. If yes, the system will take out the inode number of "stuff" file from the "sales" directory.
This inode number acts as an index to the inode table of the file system. The corresponding inode
entry is located and from this all the information about the file is obtained.
From the file access permission entry, the UNIX OS checks whether we have a read permission to
the file or not. If yes, then using the disk address given in the inode entry of "stuff" the contents are
accessed from the disk and displayed on the monitor.
11. What is the ideal directory permission? What operations can be performed by
user, group and others in a directory with ideal permission?
Ans. An ideal directory permission is rwxr-xr-x. This set of permission allows the owner, group
and others to list the contents of the directory and view the files in it. But it does not allow-anyone,
except the owner, to delete or add files or subdirectories.
12. How can you access ex commands in vi Editor?
Ans. Ex commands can be given to vi editor by pressing a colon (:) key before giving the
command. When you type the (:) character, it is echoed at the beginning of the bottom line of the
screen. Whatever you type now, till you press the [Enter] key, is interpreted as a command to the
ex line editor and is acted upon accordingly. This is how vi editor has access to all powerful ex lineeditor's commands such as the command for global substitution (:s). Some other commands such
as the IU command of ex editor which is used for write operation, is used in vi editor for saving a
file. Similarly, to exit from vi editor the q command is used, which is the same as giving quit
command in ex.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 199
Institute for Competitive Exams
13. How will you move to the hundredth line and then copy that line and the
subsequent remaining lines to a separate file?
Ans. To move to the 100th line use "100G". To copy this line and the remaining lines to a separate
file (say new.file), we can give the following command at ex mode.
:., $w new.file <Enter>
The dot (.) represents the current line and dollar ($) represent the last line of the file. The "w"
command will save the specified lines to the file new.file.
14. How will you.make the following pattern?
*_#*_#*_#*_#*_#*_#*_*_#*_#*_#*_#*_#.....
Ans. In order to generate the given pattern, go to the beginning of a line. Then press the character
key a to enter into insert mode. Now type *_# and press (Esc) key to move back to command
mode. Now go on pressing • (dot) to repeat the pattern as many times as you want.
15. Give the syntax for opening a file in vi editor. Also explain the different options.
Ans. The syntax to open a file in vi is the following:
vi [options] <filename>
If no option is given, vi opens the file with the cursor at the first line.
16. List down the steps that the shell under Unix operating system will undergo in
order to execute a given command.
Ans. The shell will follow the following steps to execute the given command:
(a) The shell will first break the command line (e.g. rm <file-name>) into words, using spaces and
tabs as delimiters.
(b) All words preceded with a $ are considered as variables and their values are replaced in that
place. Similarly any words surrounded by backquotes (') are-considered as commands. These
commands are executed and their output is replaced at that place.
(c) The shell then looks for any redirection operators namely <, > or » to open the-files they point
to.
(d) The shell then searches for any wild cards in the command line. If any of them is encountered,
the corresponding list of filenames are replaced at that place. These filenames then forms the
arguments for the command.
(e) It then looks into the paths given in the PATH variable to search for the given command.
(f) These are then passed on to the kernel for execution.
17. What is the significance of the following shell variables?
PATH, TERM, PS1, PS2, HOME, LOGNAME
Ans. PATH Variable: PATH variable contains a list of pathnames. The system has to search in
these locations to find any executable command file. DOS also uses such a PATH variable except
that the delimiter in DOS is semicolon (;) while in UNIX systems the delimiter is colon (:). You can
see the contents of the PATH variable, just like any other variable, using the echo command as
follows:
$ echo $PATH [Enter]
TERM Variable: TERM variable holds the name of the terminal-type the user is using.
PS1 and PS2 variable: PS1 and PS2 variables determine the shell prompt. The primary prompt
is $ and is contained in PS1 variable. You have seen earlier that incomplete commands wait for
input by showing a right chevron (>) in the next line. This is the secondary prompt and is
contained in PS2 variable. You can change your shell prompt (primary and secondary) by changing
the values of these variables.
For example, if you want to change the primary prompt from '$' to "Hello", use the following
command:
$ PS1="Hello>"
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 200
Institute for Competitive Exams
HOME Variable: HOME variable contains the home directory path as its value. When you
display its value using the 'echo' command, absolute pathname of your home directory will get
displayed.
The value of this variable is set in the /etc/passwd file. You cannot change your home directory. If
you change the value of HOME variable, only the directory that 'cd' command (without any
arguments) switches to, changes. This is because 'cd' without arguments means cd $HOME.
LOGNAME Variable: LOGNAME variable contains the user-name of the currently logged-in
user.
18. What will happen if you give the command cat myfile > myfile?
Ans. The > operator removes the contents of myfile and then waits for you to write some new text
into the file "myfile". That is, contents of the file "myfile" gets lost and whatever you type now gets
saved into it.
19. How will you remove only the hidden files of your directory under Unix OS?
Ans. The command "rm .[!.]*" will remove all files beginning with a dot, followed by a non-dot
character and then any number of characters. The [!.] is given so that the . and .. files do not get
removed.
20. Illustrate the effect of using single quotes, double quotes and back quotes in a
command line?
Ans. The single quote (') is used when we want the shell to override the meaning of any meta
characters (such as the wildcards) in. your commands. For example, the ? (question mark) is a wild
card, but when enclosed in single quotes it becomes merely a ? symbol and loses its special
meaning.
The double quote (") character is used to enclose that part of the command line within which you
may use command substitution (using backquote), variable substitution (using $) and history
substitution. That is, double quotes allow the special characters ($, ' and \) to keep their special
meanings. Shell enables you to pass the output of one command to another. That is, argument of
one command is obtained from the output of another command. This is done by enclosing the
latter in backquotes (‘). For example, if you want to insert the value of current date into a variable
(say now), give the following command:
$ now = 'date' [Enter]
21. When a file that has been created in DOS is opened in vi editor, the characters
"^M" appear at the end of every line. How to remove these characters in one go?
Ans. "^M" can be deleted in one go by using the following substitution command in ex mode:
:1, $ s/\^M/ /q [Enter]
The escape character \ is used to disable the special meaning of ^.
22. You are writing a shell script in an editor, say vi. You want to exit temporarily to
the shell. How will you do it and then come back to vi again?
Ans. To temporarily exit vi and enter the shell, use the suspend character [Ctrl + Z]. This will take
you to the shell prompt. After finishing off with the work in the shell prompt, type fg to bring up vi
once again.
23. What is the difference between a process run with & and one run with nohup?
Ans. To run a command in the background, just add & at the end of the command line before you
press the [Enter] key. For example, to run a sort command in the background, type the command
as shown below:
$ sort name.txt > sorted.names.txt&
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 201
Institute for Competitive Exams
In normal circumstances, when you log out, all the background processes will get terminated. This
is because, all processes are children or grandchildren or grand grand-children of the sh process.
Therefore, when you log out, your sh process dies followed by the death of child processes invoked
by sh. But there exists a command called nohup that can be used to ensure that the background
processes do not die when we log out. Using this command, the background process will get
executed even if we log out.
24. Interpret the following crontab entry:
20 11 * 10 * cat /usr/mini/uni01.txt
Ans. The "cat /usr/mini/uni01.txt" command will run at 11:20 am every day, in the month of
October.
25. How will you ensure that an X-Client window shows a different name when
iconified?
Ans. We can ensure that an X-Client window shows a different name when iconified by using the name command-line option followed by the particular name we want (in double quotes) while
invoking the X-Client program. For example, to show the name "ABC-iconified" we should invoke
ABC as follows:
ABC -name "ABC-iconified"
26. Discuss the role of Window Manager.
Ans. The look and feel of X programs is determined not by the X Server but by a different product
called GUI (a client program). This GUI is known as the window manager.
Window manager is a client program that has the following role to play:
(a) controlling how windows should appear on the screen
(b) determining how users can interact through the windows
(c) determining how windows can be created and destroyed
(d) determining the mechanism for moving windows around the screen or changing their
appearance etc.
Some common window managers are twm, mwm and olwm.
27. Explain the use of .xinitrc file.
Ans. The .xinitrc file controls which of the applications are invoked at start-up. It contains
applications that start automatically. By default, the .xinitrc file contains lines that start a window
manager, a clock and an xterm window. You can add to this file any other application that you
would like to start at login. You can also change the defaults. For example, you can change the size
of the xterm window, .xinitrc file is in fact a shell script that runs when you start the windowing
system. When the .xinitrc script exits, the windowing system will close down and allow you to
logouts
28. What is the use of tr utility in Unix and output of the following?
(a) $ echo "hello world" | tr 'o' 'p'
(b) $echo"fred" | tr -d ‘f’
Ans. tr command can work on individual characters in a file. It takes two expressions as input. It
translates each character of the first expression with its counterpart in the second expression. For
example, suppose we wish to translate all | in our book.lst file with ', ' and all / with -, then we have
to give the following tr command:
$ tr ' | /' ',-' < book.lst [Enter]
(a) hellp wprld
(b) red [-d option of tr command deletes the given string from the text]
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 202
Institute for Competitive Exams
29. What does the grep "^\*" do? Is the \ really necessary?
Ans. The command will select all those lines that start with an asterisk (*). The \ is not necessary
because the * loses its special meaning when not preceded by a character. If it had been preceded
by a character, it would be considered as a regular expression symbol and in that case the \ would
have been needed to indicate that this * is a character and not a regular expression symbol.
30. Write a sed command to insert two spaces at the end of each line of a file
"text.txt".
Ans. The command:
sed 's/$/ /' text.txt
will insert two spaces at the end of each line of a file "text.txt".
31. Write short notes on:
Ans.
(a) Use of regular expression: Regular expressions are like the wild-cards. While the
wildcards are used to match similar filenames with a single expression, regular expression is used
to match a group of similar patterns with a single expression. The regular expressions are listed
below:
Symbol
Description
*
matches zero or more occurrence of the previous
character
.
matches a single character x, y or z
[xyz]
matches a single character which is within the ascii
range
[cl-c2]
represented by characters cl and c2
[^xyz]
matches a single character which is not an x, y or z
^xyz
matches a pattern xyz at beginning of line
xyz$
matches a pattern xyz at the end of line
(b) Stream editor
sed stands for stream editor. There are many expressions used with sed command for performing
a wide variety of tasks. But, we will focus on using sed to substitute one pattern for another in a
file. The format of the sed command is sed followed by an expression in quotes and the name of the
file to read for input. For substitution, the expression will be the substitution command.
The general format of the substitution command is:
s/old/new/flags, where old is the existing pattern to be replaced by new pattern, s is the
abbreviation for the substitute command. And the two most helpful flags are g (to replace all
occurrences of the old pattern, in each line) and n (to replace only the n'h occurrence of the old
pattern, in each line).
32. Write an awk program to print the time when user mini logged into the system.
Give the output as username and time.
Ans. who | awk '$1 =="mini" { print $1, $5 }'
33. Write awk script to calculate the average number of words per line in the given
file FILE.
Ans. wc-lw FILE | awk' { print $2/$l }'
34. Write an awk program to print the first five executable files of a directory
"/home/mini/sales".
Ans. head-5 | ls –l /home/mini/sales | awk '{if($l ~ /???x*/) print $0}'
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 203
Institute for Competitive Exams
35. What is a system call?
Ans. A system call is a call to the Unix operating system that requests the kernel to carry out
certain low-level operations. Programmers can use the system calls read() and write() to perform
I/O operations. Each read/write request results in direct access of the disk or any other storage
device to fetch or put a specific number of bytes. Instead of file pointers we use file-descriptors
which give a unique integer number to identify each file.
36. What is a process table? What is it used for?
Ans. The process table is an important structure used by the kernel to manage the processes in the
system.
The. information in the process table allows the suspended process to be restarted at a later time,
from that point onwards where it had stopped. It is always resident in the computer's memory.
This is because the kernel is repeatedly querying and updating this table as it switches processes in
and out of the CPU.
37. You want to unmount a file system in Unix but are unable to do so. What could be
the possible reasons?
Ans. The reason could be one of the following:
(a) You are not logged in as the super user (root user)
(b) You are currently in a directory inside the file system which you want to unmount.
(c) Any other user has a file opened in it.
38. When a file is deleted, what change occurs in the inode?
Ans. When a file is deleted, the link count field in the inode gets decremented by one.
39. What are the steps to be followed to create a new user account without using
useradd command?
Ans. The steps to be followed to add a new user without using user-add command are:
(a) Add an entry for the new user in the /etc/passwd file in the following format:
username:password:user-id:group-id:Full name:home directory:login shell
(b) Choose the username and password for the new account
(c) Create a home directory, with mkdir command, for the user. Change the ownership of this
directory to that of the new user with chown command.
(d) Assign the login shell that the user needs.
40. List the main functions performed by a system administrator in UNIX?
Ans. The main functions performed by a system administrator in UNIX are:
(a) starting up and shutting down the UNIX system
(b) Adding and removing users
(c) mounting and un-mounting the file systems
(d) setting system date and time
(e) monitoring disk usage
(f) Ensuring system security
(g) taking frequent backups of users’ as well as system’s data
(h) providing assistance to users
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 204
Institute for Competitive Exams
UNIX and Shell Programming
I. Multiple Choice SET 1
1. In UNIX, a process is a
a. program in execution.
b. sub-program which can be called from other programs.
c. sequence of commands required to run a program.
d. None of these
2. A shell under Unix is a program which
a. reads a command line from the standard input and interprets it according to a fixed set of rules.
b. a framework into which functions or utilities can be added when required.
c. helps in the efficient running of a program.
d. all of the above
3. Which of the following is a UNIX shell?
a. Bourne shell
b. Korn shell
c. C shell
d. all of the above
4. In UNIX, information about a file is stored in a
a. file table
b. inode
c. file allocation table
d. None of these
5. UNIX system calls are used to
a. inform the system administrator about an abnormal condition.
b. obtain some service from the kernel.
c. execute a UNIX command from the shell.
d. None of these
6. Command used in shell to read a line from a terminal is:
a. rline
b. input
c. read
d. None of these
7. What will be the output of the following program?
i=3 j=i k=2
[$i = 5 -a $z -gt 5] echo $?
a. 0
b. 1
c. 2
d. None of these
8. The command “shift $n” will
a. shift positional parameters by the value of n b. shift positional parameters by 1.
c. not shift positional parameters.
d. result in an error.
9. What will be the output of the following program?
i=3
if[! -z $i ]
then
echo "Sun"
else
echo "Moon"
fi
a. Sun
b. Moon
c. difficult to find
d. None of these
10. What will be the response of the following program?
read ch
case $ch in
a | b | c) echo "a, b or c";;
[e-ir-z]) echo "between e to i or r to z";;
[A-Z]) echo "capital letter";;
esac
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 205
Institute for Competitive Exams
a. syntactically wrong
b. wait for the user to enter a character
c. shell prompt appears without displaying anything
d. None of these
II. Fill in the Blanks out of the following:
a. operating system
b. /
c. executable
d. Debugging
e. multiuser
f. Kernel
g. Linus Torvalds
h. \
i. application programs
j. Dennis Kitchie
k. sorting
l. system
programs
m. dynamic
n. page swapping
1. UNIX was conceived by _____.
2. Operating system is a collection of several _____.
3. Device drivers control the interaction between the hardware devices and _____.
4. In UNIX, directories use the _____ as separator.
5. /bin directory contains _____ files.
6. _____ accepts instructions from the shell and carries them out.
7. UNIX is a _____ operating system.
8. Finding and correcting errors in a program is a process called _____
9. Changing address-sensitive location at run time is known as _____ relocation.
10. _____ algorithm is likely to be a part of the operating system kernel.
Answers
I.
1. a
II.
1. j
2. a
3. d
4. b
5. b
6. c
7. b
8. a
9. a
10. b
2. 1
3. a
4. b
5. c
6. f
7. e
8. d
9. m
10. n
I. Multiple Choice SET 2
1. The UNIX command cp ch? book
a. copies all files starting with ch to the directory book.
b. copies all files with three-character names that start with ch to the directory book.
c. compares whether a file starting with ch exists in directory book.
d. None of these.
2. Hidden files in UNIX can be listed using
a. ls -t
b. ls -a
c. ls -h
d. None of these
3. In UNIX, the command to delete all files starting with sg and ending with hj is
a. rm sg*hj
b. rm sg?hj
c. rm -prefix sg -suffix hj
d. None of these
4. The UNIX command rm -r project will
a. delete the file project from the current directory.
b. delete all the files from the directory project.
c. recursively delete the directory project and all its subdirectories.
d. None of these
5. UNIX can have
a. one file system only
b. n file systems, if it had n hard disks
c. any number of file systems depending upon the number of partitions
d. None of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 206
Institute for Competitive Exams
6. Several UNIX commands can be given on the same line by separating them with
characters
a. ; (semicolon)
b. , (comma)
c. : (colon)
d. None of these
7. The UNIX command "ls | more" displays a list of
a. files in the current directory one line at a time.
b. files in the current directory one screen at a time.
c. all the files in the current directory and then waits for the next command.
d. None of these
8. Suppose that the current directory is /home/user/xyz/prog. A possible command
to change to a directory /home/user/abc/letters is
a. cd ../../abc/letters
b. cd ././abc/letters
c. cd ./home/user/abc/letters
d. None of these
9. The UNIX command rm chap*/xyz will delete all files
a. under directory chap*/xyz
b. with name xyz from sub-directories whose names begin with chap.
c. with names starting with chap and ending with xyz.
d. None of these.
10. In UNIX, full pathname originates from
a. your home directory
b. the root directory
c. your working directory
d. None of these
II. Fill in the Blanks out of the following:
a. 01
b. /dev
c. cat
d. hierarchical
e. /etc/passwd
f. C
g. lower
h. rm-r
i. three
j. command
k. Date
l. stderr
m. higher
n. stderror
o. time
1. The shell acts as the _____ interpreter.
2. The kernel processes have _____ priority.
3. The date is displayed by the _____ command.
4. There are _____ standard files in UNIX.
5. The three standard files are stdin (standard input), stdout (standard output) and _____
(standard error).
6. UNIX has a _____ file organization.
7. Most of the UNIX code is written in the high level language _____
8. The device information can be obtained from the _____ directory.
9. The command to remove a directory containing files is _____.
10. Two files can be merged together using the _____ command at the command line.
Answers
I.
1. b
2. b 3. a 4. c 5. C 6. a 7. b 8. a 9. b 10. b
II.
1. j
2. m 3. k 4. i
5. l
6. d 7. f
8. b 9. h 10. c
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 207
Institute for Competitive Exams
I. Multiple Choice SET 3
1. The chown command in UNIX changes the
a. home directory of a user.
b. access permissions of a file or directory
c. priority of a process.
d. None of these
2. The chmod command in UNIX
a. changes the current execution status from user mode to kernel mode.
b. makes the file hidden so that it cannot be seen using the ls command
c. changes the access permissions of a file or directory.
d. None of these
3. Which of the following commands will give the user read, write and execute
accesses and other users no access to the file myfile.exe?
a. chmod 660 myfile.exe
b. chmod 600 myfile.exe
c. chmod 700 myfile.exe
d. None of these
4. Which UNIX command would append a file called test to the end of a file called
output?
a. cat output » test
b. append output >> test
c. write output » test
d. cat test » output
5. Which out of the following commands would you use to change your password in
UNIX system?
a. pass
b. passwd
c. chpass
d. set pass
6. The default shell, which is to be used when a user logs in, is defined in the
a. /etc/passwd file
b. /etc/shell file
c. startup file in the user home directory
d. None of these
7. A write permission to a directory allows a user to:
a. edit and create files located in the directory b. edit but not create files located in the directory
c. search a directory for the presence of a file d. None of these.
8. The execute permission to a file allows a user to
a. execute the file
b. edit the file
c. list the contents of the file
d. None of these
9. To see first 3 lines of a file, we give the command:
a. tail +3 f 1
b. tail -3 f 1
c. head-3fl
d. head +3 fl
10. On changing the permissions of a file, the following field is modified:
a. File modify time
b. File access time
c. inode modification time
d. none of these
II. Fill in the Blanks out of the following:
a. rw
b. +x
c. /etc/profile
d. rwx
e. +wx
f. /etc
g. umask
h. tail
i. chmod u+t <dir name> j. cd
k. su
l. /etc/passwd
m. directory
1. The user passwords are kept in the _____ file.
2. A file in directory can be _____ itself.
3. When a file is created the default access permission is _____.
4. Most of the configuration files are present in _____ directory.
5. _____ can be used to change the default access-permission of a file.
6. To prevent a foreign user from deleting files from a directory to which he has access, the _____
is used.
7. chmod _____ f1, will make file f1 executable by all users.
8. _____ displays the last n lines of a file.
9. To know the home directory of a user in UNIX we may give _____ command followed by pwd.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 208
Institute for Competitive Exams
10. _____ is the command to become super user.
Answers
I.
1. d 2. c 3. c 4. d 5. b 6. a 7. a 8. a 9. c
II.
1. l
2. m 3. a 4. f
5. g 6. i
7. b 8. h 9. j
10. b
10. k
I. Multiple Choice SET 4
1. The vi program available under Unix can be used to
a. create plain ASCII files
b. create formatted documents with different font
sizes
c. open a virtual terminal
d. None of these
2. The ZZ command is used to
a. abort a vi session
b. move the contents of a file to another file
c. saves the file and remains in editing mode
d. quit vi editor after saving
3. What will be the output of the following program?
for i in a b c d e
do
echo $i
done
a. a b c d e
b. e
c. $i
d. None of these
4. To move to the end of a line, you have to use
a. $
b. e
c. E
d. ^
5. We can paste a deleted line using the command:
a. Y
b. p
c. cp
d. None of these
6. The key mapping can
a. create macros
b. create new keys
c. assign a key a particular function
d. None of these
7. vi abbreviations are defined in a file called .exrc located in the:
a. shell directory
b. bin directory
c. home directory
d. directory in which vi program is stored
8. Which UNIX command displays the information contained in a particular file?
a. more filename
b. type filename
c. file filename
d. None of these
9. Almost all computers store characters strings
a. as a sequence of ASCII coded binary strings
b. in BCD code
c. as a sequence of integers indicating the position of the characters in the alphabetical sequence
d. None of these
10. The instructions of a program which is currently being executed are stored in
a. Secondary memory
b. Main memory
c. Read-only memory
d. None of these
Answers
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 209
Institute for Competitive Exams
Computer Science and Engineering
I. Multiple Choice Questions
1. In a computer program, the speed of a car is denoted by N, speed varying from 20.5 to 60.5
km/hour. This is done by using the type declaration.
(a) INTEGER, N
(b) REAL, N
(c) REAL N
(d) REAL (N)
2. The Josephson tunnelling device illustrates principles associated with the advanced storage
technique:
(a) Cryogenics
(b) CCD
(c) EBAM
(d) Holographing
3. Two variable names COLOR and COLOUR can be treated as one variable with the help of
(a) COMMON statements
(b) EQUIVALENCE statements
(c) Declaration statement
(d) Substitution statement.
4. Which one of the following is an invalid integer variable?
(a) INTEGER
(b) JSUM
(c) MATRIX
(d) NUMBER
5. 200 numbers given in a matrix form of size (10 x 20) are READ by the statement
(a) READ (7, 25) [(N (I, J), J = 1, 30), I = I, 10]
(b) READ (7, 25)[(N (I, J),I=1,10), J = I, 20]
(c) READ (7, 25), [((N (I, J), J = 1, 20), I = I, 10]
(d) READ (7, 25), N (I, J), J = 1, 20, I = I, 10
6. Match the following:
Column I
Column II
A. Artificial Intelligence
1. First generation computers
B. ILLIAC
2. Main frame computer working on parallel architecture
C. ENIAC
3. Is a super computer
D. Super computers
4. Will be possible with fifth generation
(a) A: 1, B: 3, C: 2, D: 4
(b) A: 4, B: 3, C: 1, D: 2
(c) A: 1, B: 4, C: 3, D: 2
(d) A: 3, B: 2, C: 1, D: 4
7. The appropriate ASSIGN statement is
(a) ASSIGN 40 TO (ITEM)
(b) ASSIGN 40 TO ITEM
GO TO (ITEM) (20, 30, 40, 50)
GO TO ITEM (20, 30, 40, 50)
(c) ASSIGN 40 TO (ITEM)
(d) ITEM = 40
GO TO 20
GO TO 20
8. In a Fortran program
(a) All statements must be numbered
(b) Numbered statements must be referred
(c) The statements referred must be numbered
(d) All statements must be referred
9. The statements labels in a subroutine
(a) May be the same as in the main program
(b) Are always the same as in main program
(c) Cannot be the same as in the main program
(d) Cannot be used
10. Which of the following is a valid real constant
(a) 579.-E03
(b) 579.E
(c) E-03
(d) 357.E.03
11. For a statement, DO 100 1 = L, M, N, the number of iterations will be:
(a) (M-L)/N
(b) 1+ (M-L)/N
(c) 1-(M-L)/N
(d) 1+ (M + L)/N
12. Which one of the following Arithmetic IE statements is invalid?
(a) IF (M - N) 50, 60, 70
(b) IF (A-I) 10, 15, 20
(c) IF (A - B) 20, 30, 40
(d) IF (A - 4) 40, 40, 50
13. The expression, I = 8 + 7/4 will be computed as
(a) 3.75
(b) 9.75
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 210
Institute for Competitive Exams
(c) 9
(d) 3
14. Which of the following keeps track of instruction execution sequence?
(a) Accumulator
(b) Program counter
(c) Stack pointer
(d) Instruction register
15. Consider the following statements associated with microprocessors:
1. Debug is synonymous with exponent
2. Direct-Memory Access Channel (DMA) facilitates to move into and off the system without
program interruption
3. Double precision employs double signal speed
4. Dump means copying data from internal storage to external storage.
Of these statements
(a) 2 and 4 are correct
(b) 1, 2 and 4 are correct
(c) 2 and 3 are correct
(d) 1, 3 and 4 are correct.
16. In a completely connected graph having 'n' vertices, the total number of edges is equal to:
(a) n
(b) 2n
(c) 2n-l
(d) [n(n-l)/2]
17. The complexity of Floyd's shorted path algorithm is
(a) O (N)
(b) O (N2)
3
(c) O (N )
(d) O (N3.81)
18. Block search is used to locate a record in an ordered file consisting of N records. The optimum
size of the block is
(a) √(N)
(b) 3√ (N)
(c) (N/2)
(d) (N/3)
19. Consider the following statements:
1. A 33 MHz 486 has a higher MIPS rating than a 33 MHz 386.
2. A 33 MHz 486 has a higher MFLOPS rating than a 33 MHz 386
Of these statements
(a) both 1 and 2 are true
(b) both 1 and 2 are false
(c) 1 is true but 2 is false
(d) 1 is false but 2 is true
20. A personal computer has typically
(a) 5 to 10 kilobytes of main memory
(b) 10 to 100 kilobytes of main memory
(c) 100 to 256 kilobytes of main memory
(d) 256 kilobytes to 1 MB of main memory
21. A subroutine for the evaluation of the sum of numbers is to be used. The program segment
given below
SUBROUTINE XYZ (N)
I=1
SUM10.0
26 SUM = SUM + A (I)
I=I+1
IF (I. LE. N) GO TO 26
Calling the subroutine with CALL, XYZ (25), would compute the sum of
(a) 26 elements
(b) 25 elements
(c) 24 elements
(d) zero elements
22. The primary bit is added for ______ purposes
(a) Coding
(b) indexing
(c) Error-detection
(d) controlling
23. The FORTRAN statements, A = 2.5, J = 5 * A – 2 * * 4/2 will evaluate J as:
(a) 12
(b) 8.5
(c) 4.5
(d) 4
24. In FORTRAN, the number of logical values
(a) Is one only
(b) Is two only
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 211
Institute for Competitive Exams
(c) Is three only
(d) May be any number
25. T, evaluate under a condition, 100 < m < 200.
(a) IF (M. GE. 100 . AND . M. LE. 200)
(b) IF (M. GT. 100. AND. M. LT. 200)
(c) IF (M. LT. 100. AND . M. GT. 100)
(d) IF (M. LE. 200. AND M. GT. 100)
26. Consider the function below
Function calc (x, y: integer): integer; begin
if y =
then calc:= x
else calc:= (x, y - L) + x
end;
Assuming that the invocation call is "calc (a b)" and that “a” and “b” are positive integers what
result does this function return?
(a) a* (b-1)
(b) a*b
(c) a + b
(d) ab
27. Consider the following Pascal program fragment:
Var i, j: integer
Procedure Y (p, q: integer);
begin
p: q - q;
p: p + q;
p: q-p
end;
i: =2;
j: = 3;
Y(I, j);
If both parameters to Y are passed by reference, what are the values of i and j at the end of the
program fragment?
(a) i=0, j=2
(b) i=1, j=5
(c) i=2, j=3
(d) 1=3, j=2
28. Given that A = 20 and B = - 7 in PASCAL, the result of A MOD B is equal to:
(a) 6
(b) 2
(c) -1
(d) 3
29. The Intel Pentium processor address bus consists of two sets of signal: 29 address lines (A 31:
A 3) and 9 Byte Enable (BE 7 #: BE 7: BE 0#) lines. If the address on address line (A31: A3) is 000
0108 (H) and all Byte Enable lines (BE7 #: BE0 #) are asserted, then the processor's intention is to
address:
(a) One byte at address 0000 0108 (H)
(b) Eight bytes at locations 0000 0101 to 0000 010F (H)
(c) Eight bytes location 000 0108 (H) to 0000 010 F (H)
(d) One byte at location 0000 010 F (H)
30. If the value of x in decimal number is 3954, the value of y in
decimal number computed by the given flow chart is:
(a) 20
(b) 22
(c) 21
(d) 3954
31. In C language of f-=9 is equivalent to
(a) f = -9
(b) f = f-9
(c) f = 9-1
(d) -f = 9
32. A primitive computer uses a single register. The following
fragment of assembly code is written for the machine:
LOAD X
MULT Y
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 212
Institute for Competitive Exams
STORE T1
MULTI T1
STORE T1
LOAD Z
ADD Z
ADD T1
STORE R
Which one of the following expression is evaluated?
(a) R: = (XY) + Y = Z
(b) R: = (XY)2+ Y + Z
(c) R: = XY2 + Y + Z
(d) R: = XY2 ( Y+ Z)
33. A single edge is added to a tree without increasing the number of nodes. The number of cycles
in the graph is equal to:
(a) zero
(b) one
(c) two
(d) indeterminate
34. The prefix form the expression X + Y - Z is
(a) -+ XYZ
(b) +- XYZ
(c) XYZ-+
(d) XYZ+35. Consider the following statements: The horizontal micro instruction has:
(a) Longer control word than vertical microinstruction
(b) High degree of parallelism
(c) Slower execution than vertical microinstruction
Which of these statements is / are correct?
(a) 1 alone
(b) 2 alone
(c) l and 2
(d) 2 and 3
36. The logic operation that will selectively clear bits in register A in those positions where there
are 1 's in the bits of register B is given by
(a) A  A + B
(b) A  A B
(c) A  A + B
(d) A  A B
37. Which one of the following is loaded in the main memory by the bootstrap loader?
(a) system data
(b) User program
(c) BIOS
(d) Part of DOS
38. Which of the following conditional IF statement of Pascal are correct?
I. If condition 1 THEN statement 1
ELSE IF condition 2 THEN Statement 2 ELSE statement 3
II. IF condition 1 THEN IF condition 2
THEN statement 1
ELSE statement 2 ELSE statement 3
III. IF condition 1 THEN IF condition 2
THEN statement 1
ELSE statement 2
Select the correct answer using the codes given below:
(a) I and II
(b) II and III
(c) l and III
(d) I, II and III
39. In an assembler, which one of the following is required for variable names in symbol table?
(a) addresses
(b) values
(c) registers
(d) storage
40. Which of the following operations are performed on linear queues?
1. Testing a linear queue for underflow.
2. Enqueue operation.
3. Dequeue operation.
4. Testing a linear queue for overflow.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 213
Institute for Competitive Exams
Select the correct answer using the codes given below the lists?
(a) 1, 2 and 3
(b) 2, 3 and 4
(c) 1, 3 and 4
(d) 1, 2, 3 and 4
41. The micro programs provided by a manufacturer to be used on his
micro programmed computer are generally called:
(a) software
(b) netware
(c) firmware
(d) hardware
42. The control logic for a binary multiplier is specified by a state
diagram. The state diagram has four states and two inputs. To
implement it by the sequence register and decoder method
(a) tow flip-flops and 2x4 decoders are needed
(b) four flip-flops and 2x4 decoders are needed
(c) two flip-flops and 3x9 decoders are needed
(d) four flip-flops and 3x9 decoders are needed
43. What will be values of A and B, respectively, when printed for the
given flow chart?
(a) 10 and 20
(b) 5 and 15
(c) 20 and 10
(d) 15 and 5
44. Consider the following C structure and declaration:
1. Struct data {
2. int day;
3. int month
4. int year;
5. }; Struct data *pd;
Which of the following is the correct method to refer to the year
member?
(a) (*pd) year
(b) (*pd) *year
(c) (*pd)  year
(d) pd  year
45. The different classes of formal parameters used in PASCAL are:
(a) Value and variable parameters
(b) Procedure and function parameters
(c) Value, variable, procedure & function parameters
(d) Variable, procedure & function parameters
46. Which of the following is not a linear data structure?
(a) Array
(b) Linked list
(c) Stack
(d) Tree
47. A data structure in which insertions and deletions are possible at either end, is called a
(a) queue
(b) deque
(c) stack
(d) enque
48. Which one of the following correctly defines a C macro for computing the square?
(a) # define sqr (x) x*x
(b) # define sqr (x) (x*x)
(c) # define sqr (x) ((x) * (x))
(d) # define sqr (x) (x) * (x)
49. Consider the following declaration of C:
int (*p) ( );
Which of the following is true for the above declaration?
(a) P is pointer to function returning integer
(b) P is pointer to an array of integers
(c) P is an array of pointers
(d) P is a function returning pointer to integer.
50. Consider the following C program:
# include <stdio.H>
main ( )
{
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 214
Institute for Competitive Exams
float total = 0.0, q = 1.0, p = 2.0;
while (p/q > 0.001)
{
q = p + q;
total = total + p/q ;
printf ("%f/n", total);
}
}
Which one of the following is the integer that best approximates the last number printed?
(a) 0
(b) 1
(b) 2
(d) 3
51. Which of the following correctly declares a pointer to an array of integers in C?
(a) int* P [20]
(b) int* P
(c) int (*P) [20]
(d) int * (P[20])
52. Consider the assembler directives.
ORG
8000
T: DW
0FAOFH
Which one of the following is correct?
(a) The contents of the location 8000 and 8001 get erases.
(b) The contents of the locations 8000 and 8001 remain unchanged.
(c) The least significant byte OF will be stored at location 8000 and the most significant byte FA
will be stored at location 8001.
(d) The least significant byte OF will be stored at location 8001 and the most significant byte FA
will be stored at location 8000.
53. Consider the following information
An array A [1…m] is said to be p- ordered if
A [i-p]  A[i]  [i + p]
For each i such that p < i I  m-p. For example, the array 14 2 6 3 7 5 8 is 2-ordered. In 2-order
array of 2N elements, what is the maximum number of positions that an element can be from its
position if the array were 1-ordered ?
(a) 1
(b) 2
(c) N/2
(d) N
54. What is the depth of a complete binary tree with 'n' nodes?
(a) log2(n+1)-1
(b) log2(n-1)+1
(c) log2(n) + 1
(d) log2 (n)-1
55. Given three integer variables a, b, c where each one will take positive value.
Which one of the following expressions in C avoids overflow?
(a) a + b - c
(b) b + a - c
(c) b - c + a
(d) c + a + b - c - c
56. X: = 1; y: = o
While y < k do
begin X: = 2 * x; :y: = y+1 end;
For the above Pascal program fragment involving integers x, y, and k, which one of the following is
a loop invariant; i.e. true at the beginning of each execution of the loop and at the completion of
the loop?
(a) x = 2y
(b) x = y + 1
(c) x = (y+1)2
(d) x = (y+1)2y
57. Consider the following 'C program:
main ( ) {
pri(); pri( ); pri();
}
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 215
Institute for Competitive Exams
pri() {
static int k;
print("%d", ++k);
}
Which one of the following is correct in respect of the program given above?
(a) It prints 012
(b) It prints 123
(c) It prints 111
(d) It prints 3 random consecutive numbers
58. Consider a complete graph with n vertices. What is the total number of spanning trees?
(a) n (n-1)/2
(b) 2n-1
(c) n!
(d) nn-2
59. It is given that two pointer variables p and q are of the same type and p < q. Which one of the
following operations is logically not correct?
(a) p-q
(b) p + q
(c) p-5
(d) p + +
60. In a 500 x 500 matrix, 95% of the elements are zeros and these elements are randomly
distributed. Which is an appropriate data structure to store this efficiently?
(a) An array
(b) A tree
(c) A list
(d) A stack
Answers (Computer Science and Engineering)
1. c
6. b
11. b
16. d
21. c
26. b
31. b
36. d
41. c
46. d
51. c
56. a
2. a
7. b
12. d
17. b
22. c
27. d
32. b
37. c
42. a
47. d
52. c
57. d
3. b
8. c
13. c
18. a
23. d
28. a
33. b
38. a
43. d
48. a
53. c
58. d
4. a
9. a
14. b
19. a
24. b
29. a
34. a
39. c
44. a
49. a
54. d
59. b
5. b
10. d
15. a
20. d
25. b
30. c
35. b
40. d
45. c
50. d
55. c
60. a
Answers with Description
Computer Science and Engineering
1. Since N has to store real valves, it must be declared as REAL N
3. The EQUIVALENCE statements in FORTRAN are used to treat two variable names as same.
4. Since INTEGER is a reserved word in FORTRAN, we can't use it as integer variable
9. The statements labels in a subroutine may be the same as in the main program because the
Fortran Compiler deals with one module at a time.
10.
(a) 579. -, E03 Minus sign cannot precede E, hence incorrect
(b) 579 .E, E must be followed by some two digital integer value
(c) E = 03, Some real value must precede E, hence incorrect
Hence only statement (d) is correct
11. Here L represents the initial value and M represent the greatest values which 1 can have and N
is the increment given to I every time:
21. Since after calculating the sum 1 is incremented by 1 and then compared with N and N is 25
here, so the sum 24 elements will be computed.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 216
Institute for Competitive Exams
26. The function reflects a recursive definition of multiplication by repeated addition. The product
a * b, where a and b are positive integers, may be defined as a added to itself b times. In other
words a * b = a if b = 1
= a*(b - a) + a if b>1
27. P = 2 - 3 = -1
q = -1 + 3 = 2
p=2+1=3
therefore i = 3, j = 2
28. Given, A = 20, B = -7
Dividing 20 by -7, Quotient = -2, Remainder = 6
A Mod B = 6
30.
x = 3954
y=0
p = remainder of (3954 / 10) = 4
x=
3954
= 395
10
y=0+=4
in loop as x  0,
p = 9, x = 3,y = 18 + 3 = 21
31. f -= 9=>f = f-9
32. Y1 = XY
R = (XY)2 + Y + Z
34. Prefix form of the expression X + Y - Z is, -(+XY) =-+XYZ
42. For the binary multiplier, the sequence register and decoder method uses a register for the
control stales and a decoder to provide an output corresponding to each of the states. For 2n states,
nFFs and an n x 2n line decoder is needed.
43.
Z = A + B = 5 + 15 = 20
M = X * Y = 10 x 20 = 200
Next A = A-B = 5- 15 = -10
X = X x Y = 10 x 20 = 200
Next B = A+B= -10 + 15 = 5
Y = A.B = -10 x 5 = -50
Again Y = X + Y = 200 - 50 = 150
A = B - A = 15 = 5 - (-10) = 15
therefore A =15, B = 5 , X = 200, Y = 150
50. P = 2-3 = -1
q = -1+3 = 2
p=2+1 = 3
therefore i = 3, j = 2
58.
Number of tree for a given by
T = nn-2
Where, n = number of Nodes in a graphs
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 217
Institute for Competitive Exams
Microprocessors
I. Multiple Choice Questions
1. Consider the following instructions executed in 8086
PUSH AX; AX has 20 Hex in it
PUSH BX; BX has 43 Hex in it
POP AX;
ADD AX, BX
POP G
The value stored in G would be
(a) 20 Hex
(b) 43 Hex
(c) 54 Hex
(d) 68 Hex.
2. If a RAM has 34 bits in its MAR and 16 bits in its MDR, then its capacity will be:
(a) 32 GB
(b) 16 GB
(c) 32 MB
(d) 16 MB
3. In 8086, if the content of the code segment register is 1FAB and the content of the IP register is
10A1, then the effective memory address is:
(a) IFBCO
(b) 304C
(c) FDB5
(d) 20B51
4. The 54/74164 chips has an 8-bit serial-input-parallel- output shift register. The clock is 1 MHz.
The time needed to shift an 8-bit binary number into the chips is
(a) l μs
(b) 2 μs
(c) 8 μs
(d) 16 μs
5. The frequency of the driving network connected between pins 1 and 2 of a 8085 chips must be:
(a) equal to the desired clock frequency
(b) twice the desired clock frequency
(c) four times the desired clock frequency
(d) eight times the desired clock frequency
6. The 8086 arithmetic instructions work on
1. Signed and unsigned numbers.
2. ASCII data.
3. unpacked BCD data.
selected the correct answer
(a) l and 2
(b) 2 and 3
(c) 1 and 3
(d) 1, 2 and 3
7. Which of the following are required for a multimedia PC?
1. CD-ROM drive, speaker and sound card.
2. modem and network card
3. hardware needed to display videos and animation.
4. software needed to display videos and animation, select the correct answer
(a) 1, 2 and 3
(b) 1, 2, 3 and 4
(c) 1, 2 and 4
(d) 1, 3 and 4
8. Effective address is calculated by adding or subtracting displacement value to:
(a) immediate address
(b) relative address
(c) absolute address
(d) base address
9. Consider the following registers:
1. Accumulator and B register
2. B and C registers
3. D and E registers
4. H and L registers
Which of these 8-bit registers of 8085 μP can be paired together to make a 16-bit register?
(a) 1, 3 and 4
(b) 2, 3 and 4
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 218
Institute for Competitive Exams
(c) l and 2
(d) 1, 2 and 3
10. Consider the following instructions of 8085 μP:
1. MOV M, A
2. ADD C
3. MVI A, FF
4. CMP M
Which of these cause change in the status of flag (s)?
(a) l and 2
(b) 1, 2 and 3
(c) 3 and 4
(d) 2 and 4
11. A Read/Write memory chip has a capacity of 64 k Bytes. Assuming separate data and address
lines and availability of chip enable signal, what is the minimum number of pins required in the IC
chip?
(a) 28
(b) 26
(c) 24
(d) 22
12. The computer program which converts statements written in high level language to object code
is known as:
(a) Assembler
(b) compiler
(c) Disassembler
(d) operating system
13. The use of cache in a computer system increase the
(a) Available memory space for the program
(b) Available memory space for data
(c) Average speed of memory access
(d) Addressing range of CPU
14. Consider the following:
1. Input device
2. Arithmetic and logic unit
3. Control unit
4. Auxiliary memory
5. Main memory
6. Active hub
Which of these form part of CPU?
(a) 1, 4 and 6
(b) 2, 3 and 6
(c) 2, 4 and 5
(d) 2, 3 and 5
15. Which one of the following is not a characteristic of RISC processor design?
(a) One instruction per cycle
(b) Register-to-register operations only
(c) Simply address modes
(d) Register-to-memory operations only
16. The following micro operations are part of interrupt cycle of control units:
1. MAR  save-address
2. PC  routine-address
3. MBR  (PC)
4. Memory  (MBR)
Which one of the following is the correct order of their occurrence?
(a) 1, 2 and 3
(b) 2, 3 and 1
(c) 2, 1 and 3
(d) 3, 1 and 2
17. Which of the following is not a characteristic of transparent DMA mode of I/O operation?
(a) The external logic steals cycles from the CPU
(b) The normal rate of execution is slowed
down
(c) Only one word can be transferred at a time (d) Data is transferred to/from memory directly
18. A typical cell, for a dynamic RAM can be implement-led by using how many MOS transistors?
(a) Six
(b) Five
(c) One
(d) Two
19. The contents of accumulator in an 8085 microprocessor are altered after the execution of the
instruction?
(a) CMPC
(b) CP13A
(c) \NISC
(d) ORAA
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 219
Institute for Competitive Exams
20. In an 8085 microprocessor after the execution of \XRAA instruction:
(a) The carry flag is set
(b) The accumulator contains FFH
(c) The content of accumulator is shifted by one (d) The zero flag is set.
21. A microprocessor has 24 address lines and 22 data lines. If it uses 10 bits of op code, the size of
its. Memory Buffer Register is
(a) 22 bits
(b) 24 bits
(c) 32 bits
(d) 14 bits
22. In the 8086 instruction ADD, DX, [BX] [CI], the addressing mode of source operand is
(a) Register
(b) Register Indirect
(c) Based
(d) Direct
23. The MODEM is used with a personal computer to do which of the following?
(a) Convert from serial to parallel and vice versa
(b) Convert signals between TTL and Rs 232 C Standard and vice versa
(c) Convert from digital to analog signals and vice versa
(d) To convert the computer to a long distance communication link
24. The technology used for display in PC note-books (lap-top computers) is:
(a) Light Emitting Diodes display
(b) Liquid Crystal display
(c) CRT display
(d) Plasma display.
25. Consider the following:
1. Sign Flag
2. Zero Flag
3. Carry Flag
4. Parity Flag
Which of the above flag of 8085 get affected by the instruction SUB B?
(a) 1 and 2
(b) 1 and 3
(c) 3 and 4
(d) 1, 2, 3 and 4
26. Which of the following area included on the architecture of computer?
1. Addressing modes, design of CPU
2. Instruction set, data formats
3. Secondary memory, operating system.
Select the correct answer:
(a) 1 and 2
(b) 2 and 3
(c) 1 and 3
(d) 1, 2 and 3
27. The first machine cycle of an instruction is always.
(a) A memory read cycle
(b) A fetch cycle
(c) An I/O read cycle
(d) A memory write cycle
28. Match List I (Type of Memory) with List II (Used as) and select the correct answer using the
codes given below the Lists:
List I (Type of Memory)
A. DRAM
B. ST AM
C. Parallel Access registers.
D. ROM
A
B
C
D
(a)
1
2
3
4
(b)
2
1
4
3
(c)
1
2
4
3
(d)
2
1
3
4
29. Consider the following program:
PUSH
a
POP
PUSH
b
ADD
PUSH
c
POP
AX
Computer and IT
List II (Used As)
1. Cache memory
2. Main memory
3. BIOS memory
4. CPU REGISTERS
BX
AX, BX
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 220
Institute for Competitive Exams
POP
BX
SUB
AX, BX
The expression computed by the above program and stored in AX is
(a) a + b - c
(b) c + b - a
(c) c - b + a
(d) c - b - a
30. Match List I (8085 Register) with List II (8086 Register) and select the correct answer using
the codes given below the Lists:
List I (8085 Register)
List II (8086 Register)
A. A
1. CH
B. H
2. AL
C. L
3. BL
D. B
4 BH
A
B
C
D
(a)
4
2
3
1
(b)
2
4
1
3
(c)
4
2
1
3
(d)
2
4
3
1
31. Consider the Motorola 68008, 68010, 68012 and 68020 microprocessors. In systems that are
severely constrained by the space available for the printed circuit board, it is better to use.
(a) 68008
(b) 68010
(c) 68012
(d) 68020
32. Consider the following features in an 8085 microprocessor system with memory mapped I/O:
1. Input devices have 16 - bit address
2. Input devices are accessed using IN and OUT instructions.
3. There can be a maximum of 256 input devices and 256 output device.
4. Arithmetic and logic operations can be directly per formed with the input data.
Select the correct answer using the codes given below.
(a) 1, 2 and 4
(b) 1, 3 and 4
(c) 2 and 3
(d) 1 and 4
33. In 8085 microprocessor the value of the most significant bit of the result following the
execution of any arithmetic or Boolean instruction is stored in:
(a) The carry status flag
(b) The auxiliary carry status flag
(c) The sign status flag
(d) The zero status flag.
34. In a microprocessor when a CPU is interrupted, it
(a) Stops execution of instructions
(b) Acknowledges interrupt and branches of subroutine.
(c) Acknowledges interrupt and continues.
(d) Acknowledges interrupt and waits for the next instruction from the interrupting device.
35. A ROM is to be used to implement a “squarer” which outputs the square of a 4-bit number.
What must be the size of the ROM?
(a) 16 address lines and 16 data lines
(b) 4 address lines and 8 data lines
(c) 8 address lines and 8 data lines
(d) 4 address lines and 16 data lines.
36. Which one of the following statements is correct?
(a) PROM contains a programmable 'AND' array and a fixed 'OR' array
(b) PLA contains a fixed 'AND' array and a programmable 'OR' array
(c) PROM contains a fixed 'AND' array and a programmable 'OR' array
(d) PLA contains a programmable 'AND' array and a programmable 'NOR' array
37. Given a 32-bit processor with 16 MB main memory, 32 kB 4-way set-associative on-chip cache
and a cache block size (or line size) of 16 words. What is the total number of tag bits in the memory
address format?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 221
Institute for Competitive Exams
(a) 9
(b) 20
(c) 11
(d) 24
38. A particular parallel program computation requires 100 seconds when executed on a single
processor. If 40 percent of this computation is 'inherently sequential', them what are the
theoretically best elapsed times for this program running with 2 and 4 processor, respectively?
(a) 20 and 10 seconds
(b) 30 and 15 seconds
(c) 50 and 25 seconds
(d) 70 and 55 seconds
39. Consider the following statements:
The advantage of cycle stealing in DMA is that
1. It increase the maximum I/O transfer rate.
2. It reduce the interference by the DMA controller in the CPU's memory access.
3. It is beneficially employed for I/O device with shorter bursts of data transfer.
Which of the statements given above are correct?
(a) 1 and 2
(b) 1 and 3
(c) 2 and 3
(d) 1, 2 and 3
40. Consider the following statements:
The 8085 microprocessor will not enter into bus idle machine cycle whenever
1. INTR interrupt is recognized.
2. RST x.5 is recognized.
3. DAD rp instruction is executed.
Which of the statement given above is/are correct?
(a) 1 only
(b) 2 only
(c) 1 and 2
(d) 2 and 3
41. Consider the following program:
ORG
7000 H
BEGIN:
LXI
H, 7000 H
MOVE
A, L
ADD
H
JM
END
RST
O
END:
PCHL
HLT
Which one of the following statements is correct?
(a) The program will halt the processor
(b) The program will be repeated infinitely
(c) The program will branch to 0007 H after JM END
(d) The program will branch to 0000 H after JM END
42. Consider the following program intended to transfer a block of 5 bytes from A000H to 9000H:
START:
LXI
B, 9000H
LXI
H, A000H
MVI
C, 05H
LOOP:
MOV
A, M
STAX
B
INX
B
INX
H
DCR
C
JNZ
LOOP
HLT
The above program will not work because
(a) C register is used as counter
(b) DCR C instruction will not affect zero flag
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 222
Institute for Competitive Exams
(c) JNZ instruction is used instead of JZ
(d) The first two instructions in loop should have been LDAX D and MOV M, A
43. Match List I with List II and select the correct answer using the codes given below the lists:
List I
List II
A. Immediate addressing
1.LDA30SC
B. Implied addressing
2. MOV A, B
C. Register addressing
3. LXI 11, 2050
D. Direct addressing
4.RRC
A
B
C
D
(a)
3
4
2
1
(b)
2
1
3
4
(c)
3
1
2
4
(d)
2
4
3
1
44. Consider a function g which is taking a parameter f of type pointer to function?
(a) g can make modification in the definition of f and the change is visible after return form g.
(b) g can dynamically test f can modify it.
(c) Functionality of g gets customized through functionality of f.
(d) f can dynamically test g and modify it.
45. A disc rotates at a speed of 7200 rpm. It has 4000 cylinders, 16 surface and 256 sectors per
track. What is the average latency time of the disk?
(a) 8.33 ms
(b) 4.166 ms
(c) 41.66 ms
(d) 4.33 μs
46. Consider the following statements:
1. Cache memory is low cost and fast memory.
2. Cache memory is fast but costly memory.
3. Performance of cache during program execution is measured by hit ratio.
4. Cache size is very large.
Which of the statements given above are correct?
(a) 1 and 2
(b) 2 and 3
(c) 3 and 4
(d) 1 and 4
47. Consider the following statements:
The SIM instruction outputs the contents of accumulator to define.
1. Interrupt mask bit.
2. Interrupt pending bit
3. Serial input data line
4. Serial output data line
Which of the statements given above are correct?
(a) 1 and 2
(b) 2 and 3
(c) 3 and 4
(d) 1 and 4
48. Match List I (2 pine of 8086) with List II (Status) and select the correct answer using the code
given below the lists:
List I (2 Pine of 8086)
List II (Status)
A
What is read / written?
0
BHE
A. 0
0
1. 1 byte from/to odd address
B. 0
1
2. byte from / to even Address
C. 1
0
3 1 16Obit word
D. 1
1
4. 1 4. NOP
A
B
C
D
(a)
4
2
1
3
(b)
3
1
2
4
(c)
4
1
2
3
(d)
3
2
1
4
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 223
Institute for Competitive Exams
49. What are the number of machine cycles n, and the types of machine cycles carried out for
PUSHB?
(a) n = 2, fetch and memory write
(b) n = 3, fetch and 2 memory write
(c) n = 3, fetch, memory write and read .
(d) 7 = 3, fetch and 2 memory read
50. The following sequence of instructions is executed by an 8085 micro processor:
1000 LXI SP,
27 FF
1003 CALL
1006
1006 POP
H
What are the contents of the steak pointer (SP) and the HL register pair after completion of
execution of these instructions?
(a) SP = 27FF, HL = 1003
(b) SP = 27FD, HL= 1003
(c) SP = 27FF, HL =1006
(d) SP = 27FD, HL= 1006
Answers (Microprocessors)
1.
6.
11.
16.
21.
26.
31.
36.
41.
46.
Computer and IT
a
d
a
a
d
a
d
c
d
b
2.
7.
12.
17.
22.
27.
32.
37.
42.
47.
a
d
b
b
c
b
d
a
b
b
3.
8.
13.
18.
23.
28.
33.
38.
43.
48.
d
d
c
a
c
c
c
b
a
d
4.
9.
14.
19.
24.
29.
34.
39.
44.
49.
c
b
b
c
b
c
d
d
c
b
5.
10.
15.
20.
25.
30.
35.
40.
45.
50.
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
b
d
d
d
d
d
d
c
b
c
Page 224
Institute for Competitive Exams
Answers with Description
Microprocessors
3.
Effective memory address, (i.e., 20 bit physical address),
I F A B 0 H
+ 1 0 A 1 H
2 0 B 5 1 H
4.
It will need 8 clock pulses. Therefore T = 8 x T0 =8 μs
5.
A crystal (or RC, LC network) is connected at these two points. The frequency of which is twice of
the desired clock frequency.
6.
The 8086 has instructions to add, subtract multiply and divide. It can operate on signed or
unsigned binary numbers, BCD numbers, or numbers represented in ASCII.
8.
The addressing modes described in the following section are used to specify the location of an
operand in memory. To access data in memory, the 8086 must also produce a 20-bit physical
address. It does this by adding a 16-bit value called the effective address to a segment base address
represented by the 16-bit number in one of the four segment register. The effective address (EA)
represents the displacement or offset of the desired operand from the segment base.
9.
The 8085 has six general purpose registers to store 8 bit these are identified as B, C, D, E, H, and
L, They can be combined as register pairs BC, DE, and HL - to perform some 16 bit operations .The
programmer can use these registers to store or copy data into the registers by using data copy
instructions.
11.
Number of pins =
16 addressing line (64 K)
+ 8 data line (byte)
+ 1 (CE)
+ 1 (RD/ W R )
+ 1 (S0)
+1 (S1)
= 28
12.
A compiler reads entire program called a source code and then translates the program into the
machine language, which is called an object code.
13.
The cache in a system such as this consists of perhaps 32 or 64 Kbytes of high-speed SRAM. The
main memory consists of a few megabytes or more of slower but cheaper DRAM. Te general
principal of a cache system is that code and data sections currently being used are copied from the
DRAM of the high speed SRAM cache, where they can be accessed by the processor with no wait
states. A cache system takes advantage of the fact the most microcomputer programs work with
only small section of code and data at a particular time. The fancy term for this is "locality of
reference." Here's how the system works. When the microprocessor output an address, the cache
controller checks to see if the contents of that address have previously been transferred to the
cache. If the addressed code or data word is present in the cache, the cache controller enables the
cache memory to output the addressed word on the data bus. Since this access is to the fast SRAM,
no wait states are required. TF the addressed word is not in the cache, the cache controller enables
the DRAM controller. The DRAM controller then sends the address on to the main memory to get
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 225
Institute for Competitive Exams
the data word. Since the DRAM main memory, it not only goes to the microprocessor, it is also
written to the cache. If the processor needs to access this data word again, it can then read the data
directly form the cache with no wait states. The percentage of accesses where the microprocessor
finds the code or data word it needs in the cache is called the hit rate. Current systems have
average hit rates greater than 90 percent.
15.
RISC stands for Reduced Instruction Set Computer. CISC stands for Complex Instruction
Set Computer. There are two approaches of the design of the control unit of a microprocessor:
hardware approach and software approach. To execute an instruction a number of steps are
required. For each step a number of control signals are generated by the control unit of the
processor. To execute each instruction, if there is a separate electronic circuitry in the control unit,
which produces all the necessary signals, this approach. It is also called hard-wired approach.
Microprogramming is not used. If the instruction are more, then this approach becomes complex.
SO RISC processor used a small number of simple instruction and a few addressing modes. They
are faster than CISC processors. Each instruction is executed in one clock cycle. Most RISC
instruction use register-to-register operations. Memory access is limited only to load and store
instructions. For this purpose they employ a larger number of general-purpose registers. Large
cache memory is used. Examples of RISC processors are DEC's Alpha 21064, 21164 and 21264
processor, SUN's SPARC and ULTRASPARC, PowerPC processors, etc
20.
X-OR gives output zero when both input are same which result all bit zero to after X-OR AA
therefore zero flag is set.
22.
Based indexed Addressing
8086 the operand's offset is the sum of the content of a base register or BP and an index register SI
or DI
Offset = [BX or BP] + [SI or DI]
BX is used as a base register for data segment, and BP is used as a base register for stack segment.
Examples are:
1. ADD, AX [BX + SI]
2. MOV CX, [BX +SI]
23.
Modem is used as an interface between analog and digital system. It is used to convert digital to
analog signals and vice-versa
26.
In architecture of computer. Addressing modes, design of CPU, instruction set and data format are
the part of it.
27.
First machine cycle of an instruction is always a fetch cycle.
28.
Memory correct used is given below
DRAM  Cache memory
SRAM  Main memory
Parallel Access Register  CPU registers
ROM  BIOS memory
29.
AX  c; BX  b
SUB AX, BX  c - b
BX  a
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 226
Institute for Competitive Exams
ADD AX, BX  a + c - b c - b + a
30.
8085- 8086 Register
A – AL
H – BH
L – BL
B – CH
32.
Memory Mapped I/O In this some portion of the available memory address space is reserved
for input /output devices, while the rest is for RAM/ROM. One major advantage is that all the
instruction types including arithmetic and logic operation as also the different addressing modes
are available to I/O data transfer in contrast to just two, IN and OUT, instructions of isolated I/O.
Also data from any register can be moved to a port or data from a port to moved to any register. In
Isolated I/O mode data to and from pots have be routed through the Accumulator.
33.
S - Sign: The Sign flag is set if bit D7 of the result = 1: otherwise it is reset
34.
Microprocessor acknowledges interrupt through INTA and wait for the next instruction from the
interrupting device.
36.
PROM has fixed AND array and a programmable OR array.
46.
Following statements are correct i.e. cache memory is fast but costly memory and performance of
cache during program execution is measured by hit ratio.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 227
Institute for Competitive Exams
Artificial Intelligence
Multiple Choice Questions
1.
Artificial intelligence is
(a) the embodiment of human intellectual capabilities within a computer.
(b) a set of computer programs that produce output that would be considered to reflect intelligence
if it were generated by humans.
(c) the study of mental faculties through the use of mental models implemented on a computer.
(d) All of the above
(e) None of the above
2. Strong AI is
(a) the embodiment of human intellectual capabilities within a computer.
(b) a set of computer programs that produce output that would be considered to reflect intelligence
if it were generated by humans.
(c) the study of mental faculties through the use of mental models implemented on a computer.
(d) All of the above
(e) None of the above
3. Weak AI is
(a) the embodiment of human intellectual capabilities within a computer.
(b) a set of computer programs that produce output that would be considered to reflect intelligence
if it were generated by humans.
(c) the study of mental faculties through the use of mental models implemented on a computer,
(d) All of the above
(e) None of the above
4. Input segments of AI programming contain(s)
(a) sound
(b) smell
(c) touch
(d) sight and taste
(e) All of the above
5. Output segments of AI programming contain(s)
(a) printed language and synthesized speech
(b) Manipulation of physical object
(c) Locomotion
(d) All of the above
(e) None of the above
6. What of the following is considered to be a pivotal event in the history of AI.
(a) 1949, Donald O, The-organization of Behaviour
(b) 1950, Computing Machinery and Intelligence.
(c) 1956, Dartmouth University Conference Organized by John McCarthy
(d) 1961, Computer and Computer Sense.
(e) None of the above
7. In LISP, the square root of x, is referenced as:
(a) sqrt (x)
(b) (sqrt x)
(c) x/2
(d) x
(e) None of the above
8. In LISP, the addition 3 + 2 is entered as
(a) 3 + 2
(b) 3 add 2
(c) 3 + 2 =
(d) ( + 3 2)
(e) None of the above
9. How can you evaluate 1.25 + 1 4 4 in LISP?
(a) 1.25 + sqrt (144)
(b) (1.25 + sqrt (144))
(c) (+ 1.25 sqrt (144))
(d) All of the above
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 228
Institute for Competitive Exams
(e) None of the above
10. When a top-level function is entered, the LISP processor do(es)
(a) It reads the function entered
(b) It evaluates the function and the function's operands
(c) It prints the results returned by the function.
(d) All of the above
(e) None of the above
11. The traditional way to exit and LISP system is to enter
(a) quit
(b) exit
(c) bye
(d) ok
(e) None of the above
12. To invoke the LISP system, you must enter
(a) AI
(b) LISP
(c) CL (Common Lisp)
(d) both b and c
(e) None of the above
13. In LISP, the atom that stands for "true" is
(a) t
(b) nil
(c) y
(d) time
(e) None of the above
14. In LISP, the atom that stands for "False" is
(a) t
(b) nil
(c) y
(d) time
(e) None of the above
15. Which of the following function returns t if the object is a number in LISP?
(a) (number <object>)
(b) (numberp <object>)
(c) (numericp <object>)
(d) (numeric <object>)
(e) None of the above
16. The symbols used in describing the syntax of a programming language are
(a) ()
(b) {}
(c) " "
(d) <>
(e) None of the above
17. Which of the following function returns t if the object is a symbol in LISP?
(a) (* <object>)
(b) (symbolp <object>)
(c) (nonnumeric <object>)
(d) (constantp <object>)
(e) None of the above
18. In LISP, which of the following function assigns the value 10 to the symbol a?
(a) (setq a 10)
(b) (a = b) where b = 10
(c) (a = 10)
(d) (setq 10 a)
(e) None of the above
19. In LISP., she function assigns the value of a to b is
(a) (setq a b)
(b) (setq b a)
(c) (b = a)
(d) (set b = a)
(e) None of the above
20. In LISP, the function assigns the symbol x to y is
(a) (setq y x)
(b) (set y = ‘x’)
(c) (setq y = ‘x’)
(d) (setq y ‘x’)
(e) None of the above
21. In LISP, the function evaluates both <variable> and <object> is
(a) set
(b) setq
(c) add
(d) eva
(e) None of the above
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 229
Institute for Competitive Exams
22. In LISP, the function evaluates <object> and assigns this value to the unevaluated <sconst>.
(a) (constant <sconst> <object>)
(b) (defconstant <sconst> <object>)
(c) (eva <sconst> <object>)
(d) (eva <object> <sconst>)
(e) None of the above
23. In LISP, the function returns the first element of a list is
(a) set
(b) car
(c) first
(d) second
(e) None of the above
24. In LISP, the function returns the list that results after the first element is removed (the rest of
the list), is
(a) car
(b) last
(c) cons
(d) cdr
(e) None of the above
25. In LISP, the function returns t if <integer> is even and nil otherwise:
(a) (evenp <integer>)
(b) (even <integer>)
(c) (numeven <integer>;
(d) (numnevenp <integer>)
(e) None of the above
26. IBM is ready to release a speech recognition system which contains a purpose built processor
for manipulating streams of speech and uses statistical-routines to match patterns of sound,
syntax and grammar, What is the name of this system?
(a) Fisher
(b) Tangora
(c) markov
(d) Basica
(e) None of the above
27. The first widely-used commercial form of Artificial Intelligence (Al) is being used in many
popular products like microwave ovens, automobiles and plug in circuit boards for desktop PCs. It
allows machines to handle vague information with a deftness that mimics human intuition. What
is the name of this AI?
(a) Boolean logic
(b) Human logic
(c) Fuzzy logic
(d) Functional logic
(e) None of the above
28. In 1985, the famous chess player David Levy beat a world champion chess program in four
straight games by using orthodox moves that confused the program. What was the name of the
chess program?
(a) Kaissa
(b) CRAY BLITZ
(c) Golf
(d) DIGDUG
(e) None of the above
29. What is the name of the computer program that simulates the thought processes of human
beings?
(a) Human Logic
(b) Expert reason
(c) Expert system
(d) Personal information
(e) None of the above
30. The new organization established to implement the Fifth Generation Project is called:
(a) ICOT (Institute for New Generation Computer Technology)
(b) MITI (Ministry of International Trade and Industry)
(c) MCC (Microelectronics and Computer Technology Corporation)
(d) SCP (Strategic Computing Program)
(e) None of the above
31. The integrated circuit was invented by Jack Kilby of:
(a) MIT
(b) Texas Instruments
(c) Xerox
(d) All of the above
(e) None of the above
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 230
Institute for Competitive Exams
32. High-resolution, bit-mapped displays are useful for displaying:
(a) clearer characters
(b) graphics
(c) more characters
(d) All of the above
(e) None of the above
33. The Personal Consultant is based on:
(a) EMYCIN
(b) OPS 5
(c) XCON
(d) All of the above
(e) None of the above
34. Which of the following is an advantage of using an expert system development tool?
(a) imposed structure
(b) knowledge engineering assistance
(c) rapid prototyping
(d) All of the above
(e) None of the above
35. LISP was created by:
(a) John McCarthy
(b) Marvin Minsky
(c) Alan Turing
(d) Allen Newell and Herbert Simon
(e) None of the above
36. The first AI programming language was called:
(a) BASIC
(b) FORTRAN
(c) IPL
(d) LISP
(e) None of the above
37. For speech understanding systems to gain widespread acceptance in office automation, they
must feature:
(a) speaker independence
(b) speaker dependence
(c) isolated word recognition
(d) All of the above
(e) None of the above
38. Which technique is being investigated as an approach to automatic programming?
(a) generative CAI
(b) specification by example
(c) All of the above
(d) non-hierarchical planning
(e) None of the above
39. Decision support programs are designed to help managers make:
(a) budget projections
(b) visual presentations
(c) business decisions
(d) vacation schedules
(e) None of the above
40. Programming a robot by physically moving it through the trajectory you want it to follow is
called:
(a) contact sensing control
(b) continuous-path control
(c) robot vision control
(d) pick-and-place control
(e) None of the above
41. A robot's "arm" is also known as its:
(a) end effector
(b) actuator
(c) manipulator
(d) servomechanism
(e) None of the above
42. Which approach to speech recognition avoids the problem caused by the differences in the
way words are pronounced according to context?
(a) continuous speech recognition
(b) connected word recognition
(c) isolated word recognition
(d) speaker-dependent recognition
(e) None of the above
43. Natural language understanding is used in:
(a) natural language interfaces
(b) natural language front ends
(c) text understanding systems
(d) All of the above
44. The expert system developed at MIT to solve mathematical problems is known as;
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 231
Institute for Competitive Exams
(a) RAND
(b) ISIS
(c) MACSYMA
(d) MOLGEN
(e) CMU
45. A process that is repeated, evaluated and refined is called:
(a) diagnostic
(b) descriptive
(c) interpretive
(d) iterative
(e) None of the above
46. In a rule-based system, procedural domain knowledge is in the form of:
(a) production rules
(b) rule interpreters
(c) meta-rules
(d) control rules
(e) None of the above
47. Texas Instruments Incorporated produces a low-cost LISP machine called:
(a) The Computer-Based Consultant
(b) The Explorer
(c) Smalltalk
(d) The Personal Consultant
(e) None of the above
48. The Al researcher who co-authored both the Handbook of Artificial Intelligence and The Fifth
Generation is:
(a) Bruce Lee
(b) Randy Davis
(c) Ed Feigenbaum
(d) Mark Fox
(e) None of the above
49. In his landmark book Cybernetics, Norbert Wiener suggested a way of modeling scientific
phenomena using not energy, but:
(a) mathematics
(b) intelligence
(c) information
(d) history
(e) None of the above
50. In the 16th century, a Czech rabbi reportedly created a living clay man whose name has
become a synonym for an artificial human. The clay man's name was:
(a) Frankenstein
(b) Golem
(c) Paracelsus
(d) Hal
(e) None of the above
51. The area of AI that investigates methods of facilitating communication between people and
computers is:
(a) natural language processing
(b) symbolic processing
(c) decision support
(d) robotics
(e) None of the above
52. One definition of AI focuses on problem-solving methods that process:
(a) smell
(b) symbols
(c) touch
(d) algorithms
(e) None of the above
53. A bidirectional feedback loop links computer modeling with:
(a) artificial science
(b) heuristic processing
(c) human intelligence
(d) cognitive science
(e) None of the above
54. Which of the following have computers traditionally done better than people?
(a) storing information
(b) responding flexibly
(c) computing numerically
(d) both a and c
(e) None of the above
55. The field that investigates the mechanics of human intelligence is:
(a) history
(b) cognitive science
(c) psychology
(d) sociology
(e) None of the above
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 232
Institute for Competitive Exams
56. In LISP, the function returns t if <object> is a CONS cell and nil otherwise:
(a) (cons <object>)
(b) (consp <object>)
(c) (eq <object>)
(d) (cous = <object>)
(e) None of the above
57. In LISP, the function (copy-list <list>)
(a) returns a new list that is equal to <list> by copying the top-level element of <list>
(b) returns the length of <list>
(c) returns t if <list> is empty.
(d) All of the above
(e) None of the above
58. In LISP, the function (endp <list>)
(a) returns a new list that is equal to <list> by copying the top-level element of <list>
(b) returns the length of <list>
(c) returns t if <list> is empty
(d) All of the above
(e) None of the above
59. In LISP, the function (list-length <list>)
(a) returns a new list that is equal to <list> by copying the top-level element of <list>
(b) returns the length of <list>
(c) returns t if <list> is empty
(d) All of the above
(e) None of the above
60. In LISP, the function minusp (-20 4 8 81) returns
(a) T
(b) F
(c). NIL
(d) -20
(e) None of the above
61. Computers normally solve problem by breaking them down into a series of yes-or-no
decisions represented by 1s and 0s. What is the name of the logic that allows computers to assign
numerical values that fall somewhere between 0 and 1?
(a) Human logic
(b) Fuzzy logic
(c) Boolean logic
(d) Operational logic
(e) None of the above
62. Japan's high-technology companies are doing lot of research on little worms in their quest to
create computers that could think like humans. In NEC's laboratories, a free living soil nematode
having a life of two weeks, a length of 0.6mm and 302 nerve cells has been chosen for research
work because it can do things which a modern computer cannot. Can you tell the name of this
nematode?
(a) Aplysia kurodai
(b) Helicotylenchus multicinctus
(c) Canorhabdities elegens
(d) Radopholus similis
(e) None of the above
63. What is the term used for describing the judgmental or commonsense part of problem
solving?
(a) Heuristic
(b) Critical
(c) Value based
(d) Analytical
(e) None of the above
64. Which particular generation of computers is associated with artificial intelligence?
(a) Second
(b) Fourth
(c) Fifth
(d) Third
(e) None of the above
65. MCC is investigating the improvement of the relationship between people and computers
through a technology called:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 233
Institute for Competitive Exams
(a) computer-aided design
(b) human factors
(c) parallel processing
(d) All of the above
(e) None of the above
66. The applications in the Strategic Computing Program include:
(a) battle management
(b) autonomous systems
(c) pilot's associate
(d) All of the above
(e) None of the above
67. The original LISP machines produced by both LMI and Symbolics were based on research
performed at:
(a) CMU
(b) MIT
(c) Stanford University
(d) RAMD
(e) None of the above
68. Expert Ease was developed under the direction of:
(a) John McCarthy
(b) Donald Michie
(c) Lofti Zadeh
(d) Alan Turing
(e) None of the above
69. In which of the following areas may ICAI programs prove to be useful?
(a) educational institutions
(b) corporations
(c) department of Defence
(d) All of the above
(e) None of the above
70. What stage of the manufacturing process has been described as "the mapping of function
onto form"?
(a) Design
(b) Distribution
(c) project management
(d) field service
(e) None of the above
71. If a robot can alter its own trajectory in response to external conditions, it is
(a) intelligent
(b) mobile
(c) open loop
(d) non-servo
(e) None of the above
72. Which type of actuator generates a good deal of power but tends to be messy?
(a) electric
(b) hydraulic
(c) pneumatic
(d) both b and c
(e) None of the above
73. A natural language generation program must decide:
(a) what to say
(b) when to say something
(c) why it is being used
(d) both a and b
(e) None of the above
74. Which approach to speech recognition avoids the problem caused by the variation in speech
patterns among different speakers?
(a) Continuous speech recognition
(b) Isolated word recognition
(c) Connected word recognition
(d) Speaker-dependent recognition
(e) None of the above
75. A problem is first connected to its proposed solution during the _____ stage.
(a) conceptualization
(b) identification
(c) formalization
(d) implementation
(e) testing
76. The explanation facility of an expert system may be used to:
(a) construct a diagnostic model
(b) expedite the debugging process
(c) explain the system's reasoning process
(d) All of the above
(e) both b and c
77. One of the leading American robotics centers is the Robotics Institute located at:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 234
Institute for Competitive Exams
(a) CMU
(b) MIT
(c) RAND
(d) SRI
(e) None of the above
78. The Newell and Simon program that proved theorems of Principia Mathematica was:
(a) Elementary Perceiver
(b) General Problem Solver
(c) Logic Theorist
(d) Boolean Algebra
(e) None of the above
79. Who is considered to be the "father" of artificial intelligence?
(a) Fisher Ada
(b) John McCarthy
(c) Allen Newell
(d) Alan Turning
(e) None of the above
80. Claude.Shannon described the operation of electronic switching circuits with a system of
mathematical logic called:
(a) LISP
(b) XLISP
(c) Boolean algebra
(d) neural networking
(e) None of the above
81. An AI technique that allows computers to understand associations and relationships between
objects and events is called:
(a) heuristic processing
(b) cognitive science
(c) relative symbolism
(d) pattern snatching
(e) None of the above
82. A computer program that contains expertise in a particular domain is called an:
(a) intelligent planner
(b) automatic processor
(c) expert system
(d) operational symbolizer
(e) None of the above
83. Which of the following have people traditionally done better than computers?
(a) recognizing relative importance
(b) finding similarities
(c) resolving ambiguity
(d) All of the above
(e) a and c above.
84. The primary interactive method of communication used by humans is:
(a) reading
(b) writing
(c) speaking
(d) All of the above
(e) None of the above
85. The primary method that people use in sense their environment is:
(a) reading
(b) writing
(c) speaking
(d) seeing
(e) None of the above
86. In LISP, the function   x  .( 2 x  1) would be rendered as
(a) (lambda (x) (+(*2 x ) 1))
(b) (lambda (x) ( + 1 (* 2x)
(c) (+ lambda (x) 1 (*2x))
(d) (* lambda(x) (+ 2 x 1)
(e) None of the above
87. In LISP, the function   x , y , z  .(1 0 x 2  3 x y  z 2 ) would be rendered as
(a) (lambda (x, y, z) (+(*10 x x )(*3 x y)(* zz)
(b) (lambda (x, y, z) (+(*10 x x) (-(*3 x y)) (*zz))
(c) lambda (x, y, z) (*(10 x x) (* 3 x y) (* zz)
(d) lambda (x, y, z ) (* (10 x x) (* 3 x y) (-(* zz))
(e) None of the above
88. The Law(s) of Robotics is (are) :
(a) A robot may not injure a human being, or through inaction, allow a human being to come to
harm.
(b) A robot must obey the orders given it by human beings except where such orders would conflict
with the First Law.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 235
Institute for Competitive Exams
(c) A robot must protect its own existence as long as such protection does not conflict with the
First or Second Law
(d) All of the above
(e) None of the above
89. Language-Oriented Machines
(a) Designed to execute, rapidly and efficiently, code written in a specific programming language
such as LISP or Prolog
(b) Normally thought of as numerical processing machines, but they can also be used for symbolic
processing.
(c) Designed to operate efficiently on such symbolic knowledge structures as trees, semantic
networks, and rule bases that utilize representations such as frames
(d) Perform actual parallel distributed processing by means of special processing units.
(e) None of the above
90. Connectionist Machines
(a) Designed to execute, rapidly and efficiently, code written in a specific programming language
such as LISP or Prolog
(b) Normally thought of as numerical processing machines, but they can also be used for symbolic
processing.
(c) Designed to operate efficiently on such symbolic knowledge structures as trees, semantic
networks, and rule bases that utilize representations such as frames
(d) Perform actual parallel distributed processing by means of special processing units.
(e) None of the above
91. Symbolic Processing Machines
(a) Designed to execute, rapidly and efficiently, code written in a specific programming language
such as LISP or Prolog
(b) Normally thought of as numerical processing machines, but they can also be used for symbolic
processing.
(c) Designed to operate efficiently on such symbolic knowledge structures as trees, semantic
networks, and rule bases that utilize representations such as frames
(d) Perform actual parallel distributed processing by means of special processing units
(e) None of the above
92. Super computers
(a) Designed to execute, rapidly and efficiently, code written in a specific programming language
such as LISP or Prolog
(b) Normally thought of as numerical processing machines, but they can also be used for symbolic
processing.
(c) Designed to operate efficiently on such symbolic knowledge structures as trees, semantic
networks, and rule bases that utilize representations such as frames
(d) Perform actual parallel distributed processing by means of special processing units.
(e) None of the above
93. The traditional CPU consists of a single CU (Control Unit) that can process one instruction at
a time by performing the _____ operations:
(a) Fetch from memory the next machine instruction to be executed
(b) Decode the instruction to determine its type and the number of operands
(c) Fetch the data specified by the operational and place these data in memory registers for the
ALU to operate on
(d) Store in memory the result produced by the ALU. The ALU performs the arithmetic and logic
operations indicated by the instruction
(e) All of the above
94. The cray X-MP, IBM 3090 and connection machine can be characterized as
(a) SISD
(b) SIMD
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 236
Institute for Competitive Exams
(c) MISD
(d) MIMD
(e) None of the above
95. The Cedar, BBN Butterfly, Cosmic Cube and Hypercube machine can be characterized as
(a) SISD
(b) MIMD
(c) SIMD
(d) MISD
(e) None of the above
96. How many control unit(s) is (are) available in SISD (single data stream, single data stream)
architecture?
(a) one
(b) two
(c) more than one
(d) None
(e) None of the above
97. How many ALU(s) is(are) control by one control unit is SIMD (single instruction stream,
multiple data stream) architecture?
(a) one or more ALUs
(b) One ALU
(c) Only two ALU
(d) Impossible to say
(e) None of the above
98. A series of AI systems developed by Pat Langley to explore the role of heuristics in scientific
discovery.
(a) RAMD
(b) BACON
(c) MIT
(d) DU
(e) None of the above
99. An AI system developed by Terry A. Winograd to permit an interactive dialogue about a
domain he called blocks-world.
(a) SHRDLU
(b) SIMD
(c) BACON
(d) STUDENT
(e) None of the above
100. An AI system developed by Daniel Bobrow to read and solve algebra word problems
(a) SHRDLU
(b) SIMD
(c) BACON
(d) STUDENT
(e) None of the above
101. A network with named nodes and labeled arcs that can be used to represent certain natural
language grammar to facilitate parsing.
(a) Tree Network
(b) Star Network
(c) Transition Network
(d) Complete Network
(e) None of the above
102. PROLOG is an AI programming language which solves problems with a form of symbolic
logic known as predicate calculus. It was developed in 1972 at the University of Marseilles by a
team of specialists. Can you name the person who headed this team?
(a) Alain Coimerauer
(b) Nicklaus Wirth
(c) Seymour Papert
(d) John McCarthy
(e) None of the above
103. Research scientists all over the world are aking steps towards building computers with
circuits patterned after the complex inter connections existing among the human brain's nerve
cells. What name is given to such type of computers?
(a) Intelligent computers
(b) Supercomputers
(c) Neural network computers
(d) Smart computers
(e) None of the above
104. What is the name of the computer program that contains the distilled knowledge of an
expert?
(a) Data base management system
(b) Management information System
(c) Expert system
(d) Artificial intelligence
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 237
Institute for Competitive Exams
(e) None of the above
105. If the English Philosopher Thomas Hobbes could be called 'grandfather' of artificial
intelligence, then who could be called its father?
(a) A.M. Turning
(b) John McCarthy
(c) Allen Newell
(d) Herbert Simon
(e) None of the above
106. A certain Professor at the Stanford University coined the word 'artificial intelligence' in 1956
at a conference held at Dartmouth college. Can you name the Professor?
(a) David Levy
(b) John McCarthy
(c) Joseph Weizenbaum
(d) Hans Berliner
(e) None of the above
107. The Strategic Computing Program is a project of the:
(a) Defence Advanced Research Projects Agency
(b) National Science Foundation
(c) Jet Propulsion Laboratory
(d) All of the above
(e) None of the above
108. A.M. Turing developed a technique for determining whether a computer could or could not
demonstrate the artificial intelligence. Presently, this technique is called
(a) Turing Test
(b) Algorithm
(c) Boolean Algebra
(d) Logarithm
(e) None of the above
109. The characteristics of the computer system capable of thinking, reasoning and learning is
known is
(a) machine intelligence
(b) human intelligence
(c) artificial intelligence
(d) virtual intelligence
(e) None of the above
110. A mouse device may be:
(a) electro-chemical
(b) mechanical
(c) optical
(d) both b and c
(e) None of the above
111. NLMenu, a natural language interface for the TI Explorer, is similar to:
(a) Ethernet
(b) NaturalLink
(c) PROLOG
(d) the Personal Consultant
(e) None of the above
112. The hardware features of LISP machines generally include:
(a) large memory and a high-speed processor (b) letter-quality printers and 8-inch disk drives
(c) a mouse and a specialized keyboard
(d) both a and c
(e) None of the above
113. KEE is a product of:
(a) Teknowledge
(b) IntelliCorpn
(c) Texas Instruments
(d) Teknowledge
(e) None of the above
114. In which of the following situations might a blind search be acceptable?
(a) real-life situation
(b) complex game
(c) small search space
(d) All of the above
(e) None of the above
115. The "Turing Machine" showed that you could use a/an _____ system to program any
algorithmic task.
(a) binary
(b) electro-chemical
(c) recursive
(d) semantic
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 238
Institute for Competitive Exams
(e) None of the above
116. The CAI (Computer-Assisted Instruction) technique based on programmed instruction is:
(a) frame-based CAI
(b) generative CAI
(c) problem-solving CAI
(d) intelligent CAI
(e) None of the above
117. The component of an ICAI (Intelligent Computer- Assisted Instruction) presenting
information to the student is the
(a) student model
(b) problem-solving expertise
(c) tutoring module
(d) All of the above
(e) None of the above
118. Which kind of planning consists of successive representations of different levels of a plan?
(a) hierarchical planning
(b) non-hierarchical planning
(c) All of the above
(d) project planning
(e) None of the above
119. Elementary linguistic units which are smaller than words are:
(a) allophones
(b) phonemes
(c) syllables
(d) All of the above
(e) None of the above
120. Visual clues that are helpful in computer vision include:
(a) colour and motion
(b) depth and texture
(c) height and weight
(d) a and b above
(e) None of the above
121. Which of the following is being investigated as a means of automating the creation of a
knowledge base?
(a) automatic knowledge acquisition
(b) simpler tools
(c) discovery of new concepts
(d) All of the above
(e) None of the above
122. Natural language processing can be divided into the two subfields of:
(a) context and expectation
(b) generation and understanding
(c) semantics of pragmatics
(d) recognition and synthesis
(e) None of the above
123. Ambiguity may be caused by:
(a) syntactic ambiguity
(b) multiple word meanings
(c) unclear antecedents
(d) All of the above
(e) None of the above
124. Which of the following is a component of an expert system?
(a) inference engine
(b) knowledge base
(c) user interface
(d) All of the above
(e) None of the above
125. Seymour Papert of the MIT AI lab created a programming environment for childrencalled:
(a) BASIC
(b) LOGO
(c) MYCIN
(d) FORTRAN
(e) None of the above
126. Arthur Samuel is linked inextricably with a program that played:
(a) checkers
(b) chess
(c) cricket
(d) football
(e) None of the above
127. Shaping teaching techniques to fit the learning patterns of individual students is the goal of:
(a) decision support
(b) automatic programming
(c) intelligent computer-assisted instruction
(d) expert system
(e) None of the above
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 239
Institute for Competitive Exams
128. Natural language processing is divided into the two subfields of:
(a) symbolic and numeric
(b) time and motion
(c) algorithmic and heuristic
(d) understanding and generation
(e) None of the above
129. One method of programming a computer to exhibit human intelligence is called modeling or:
(a) simulation
(b) cognitization
(c) duplication
(d) psychic amelioration
(e) None of the above
130. Graphic interfaces were first used in a Xerox product called:
(a) InterLISP
(b) Ethernet
(c) Smalltalk
(d) ZetaLISP
(e) None of the above
131. Which company offers the LISP machine considered to be "the most powerful symbolic
processor available"?
(a) LMI
(b) Symbolics
(c) Xerox
(d) Texas Instruments
(e) None of the above
132. A KES knowledge base contains information in the form of:
(a) associations
(b) actions
(c) free text
(d) schema
(e) All of the above
133. Prior to the invention of time sharing, the prevalent method of computer access was:
(a) batch processing
(b) telecommunication
(c) remote access
(d) All of the above
(e) None of the above
134. LISP machines also are known as:
(a) AI workstations
(b) time-sharing terminals
(c) super minicomputers
(d) All of the above
(e) None of the above
135. A Personal Consultant knowledge base contain information in the form of:
(a) parameters
(b) contexts
(c) production rules
(d) All of the above
(e) None of the above
136. ART (Automatic Reasoning Tool) is designed to be used on:
(a) LISP machines
(b) personal computers
(c) microcomputers
(d) All of the above
(e) None of the above
137. In AI programming, a list may contain:
(a) cells
(b) fields
(c) pointers
(d) All of the above
(e) None of the above
138. What part of the manufacturing process relate to each stage of the process and to the process
as a whole?
(a) field service
(b) design
(c) distribution
(d) project management
(e) None of the above
139. Which of the following are examples of software development tools?
(a) debuggers
(b) editors
(c) assemblers, compilers and interpreters
(d) All of the above
(e) None of the above
140. A computer vision technique that relies on image templates is:
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 240
Institute for Competitive Exams
(a) edge detection
(b) binocular vision
(c) model-based vision
(d) robot vision
(e) None of the above
141. People overcome natural language problems by:
(a) grouping attributes into frames
(b) understanding ideas in context
(c) identifying with familiar situations
(d) both b and c
(e) None of the above
142. The company that grew out of research at the MIT AI lab is:
(a) AI corp
(b) LMI
(c) Symbolics
(d) both b and c
(e) None of the above
143. Nils Nilsson headed a team at SRI that created a mobile robot named:
(a) Robitics
(b) Dedalus
(c) Shakey
(d) Vax
(e) None of the above
144. Which of these schools was not among the early leaders in AI research?
(a) Dartmouth University
(b) Harvard University
(c) Massachusetts Institute of Technology
(d) Stanford University
(e) None of the above
145. An expert system differs from a database program in that only an expert system:
(a) contains declarative knowledge
(b) contains procedural knowledge
(c) features the retrieval of stored information (d) expects users to draw their own conclusions
(e) None of the above
146. DARPA, the agency that has funded a great deal of American AI research, is part of the
Department of:
(a) Defense
(b) Energy
(c) Education
(d) Justice
(e) None of the above
147. DEC advertises that it helped to create "the world's first expert system routinely used in an
industrial environment," called XCON or:
(a) PDP-11
(b) R1
(c) VAX
(d) MAGNOM
(e) None of the above
148. Special programs that assist programmers are called:
(a) heuristic processors
(b) symbolic programmers
(c) intelligent programming tools
(d) program recognizers
(e) None of the above
149. The conference that launched the AI revolution in 1956 was held at:
(a) Dartmouth
(b) Harvard
(c) New York
(d) Stanford
(e) None of the above
150. What was originally called the "imitation game" by its creator?
(a) The Turing Test
(b) LISP
(c) The Logic Theorist
(d) Cybernetics
(e) None of the above
151. The "Carnegie-RAND" group at the conference consisted of:
(a) John McCarthy and Marvin Minsky
(b) Allen Newell and Herbert Simon
(c) Oliver Selfridge and Warren McCulloch
(d) Arthur Samuel and Alex Bernstein
(e) None of the above
152. The term "artificial intelligence" was coined by which of the conference organizers?
(a) John McCarthy
(b) Nathaniel Rochester
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 241
Institute for Competitive Exams
(c) Marvin Minsky
(d) Claude Shannon
(e) None of the above
153. An intelligent robot:
(a) responds to changes in its environment
(b) possesses no more intelligence than a dishwasher
(c) follows instruction mindlessly
(d) All of the above
(e) None of the above
154. The knowledge base of an expert system includes both facts and:
(a) theories
(b) heuristics
(c) analyses
(d) algorithms
(e) None of the above
155. The conventional sequential-processing computer that has only one CPU that can execute
only one machine instruction at a time, known as
(a) MIMD
(b) MISD
(c) Von Neumann architecture
(d) All of the above
(e) None of the above
156. A test for machine intelligence proposed by Alan Turing is known as
(a) debug
(b) intelligence testing
(c) turning test
(d) Tautology
(e) None of the above
157. A table that lists all possible combinations of truth values of a given logic statement, is
(a) Logic Table
(b) Condition Table
(c) Truth Table
(d) Complete Table
(e) None of the above
158. An AI problem-solving system was used for applications such as robot planning activities that
was developed by Richard Fikes and Nils Nilsson, is
(a) STRIPS
(b) STUDENT
(c) SHRDLV
(d) PLANNER
(e) None of the above
159. An AI application system developed by Roger Schank to understand certain newspaper
stories, is
(a) SAM
(b) PLANNER
(c) SHRDLU
(d) STUDENT
(e) None of the above
160. An AI system called PLANNER was developed to aid in problem solving by
(a) Daniel Bobrow
(b) Roger Schank
(c) Carl Hewitt
(d) Alan Turning
(e) None of the above
161. One of a class of search methods that utilize additional information to make the search
process more efficient, although a solution is not guaranteed, is
(a) sequential search
(b) Minimal Search
(c) Hill-climbing search
(d) Heuristic search
(e) None of the above
162. A search method that examines the values associated with the immediate successor nodes
and goes to the node with the highest value, is
(a) sequential search
(b) Minimax Search
(c) Hill-climbing search
(d) Heuristic search
(e) None of the above
163. A game search strategy wherein one player tries to move in such a way as to minimize the
maximal value that an opponent achieve in a subsequent move, is
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 242
Institute for Competitive Exams
(a) sequential search
(b) Minimax Search
(c) Hill-climbing search
(d) Heuristic search
(e) None of the above
164. A search method based on examining each item in a sequence until the desired item is found
or the sequence is exhausted, is
(a) Sequential search
(b) Minimax Search
(c) Hill-climbing search
(d) Heuristic search
(e) None of the above
Fill in the Blanks
1.
Comparing the human mind to a "meat machine" is a _____ view of the workings of the
mind.
2. The brain contains about _____ cells.
3. A key element of AI is a/an _____, which is a "rule of thumb".
4. Intelligent planning programs may be of special value to managers with _____
responsibilities.
5. Warren McCulloch and Claude Shannon contributed to a field called _____ a precursor
of artificial intelligence.
6. A _____ is an integral part of developing an expert system.
7. A problem is first connected to its proposed solution during the _____ stage.
8. A model-based expert system draws conclusions from knowledge of the _____ and _____
of a device.
9. A _____ is a series of slots that describes sequential events.
10. A _____ analysis relies on a dictionary of symbolic definitions.
11. A _____ analysis interprets a sentence according to meaning, rather than form.
12. Early attempts at machine translation failed because they assumed that translation without
_____ was possible.
13. Natural Link uses _____ to help you create sentences that the computer understands.
14. A speech recognition technique called _____ begins with the parts of a sentence that are
most likely to have been interpreted correctly.
15. The "Turning Machine" showed that you could use a/an _____ system to program any
algorithmic task.
16. In LISP, the _____ primitive assigns a value to a symbol.
17. PROLOG relies on _____ to solve problems
18. Property inheritance is one aspect of a _____ that simplifies the process of deduction.
19. The clause on the right-hand side of a production rule is called the _____ clause.
20. Reasoning from a goal statu towards an initial slate is called a _____
21. OPSS, the forerunner of OPSS+, was used to create the _____ expert system.
22. In the Personal consultant, you use _____ to enter production rules.
23. The LISP machines produced by LMI is called the _____, after a LISP procedure.
24. Using VLSI techniques, it is possible to combine over _____ components on a chip.
25. The speed of computers used for AI application its measured in _____ per second.
26. The Fifth generation project is based on the premise that _____ will become the basis of a
new economic order.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 243
Institute for Competitive Exams
Answers
Multiple Choice Questions
1. d
2. a
3. c
4. e
11. b
12. d
13. a
14. b
21. a
22. b
23. b
24. d
31. b
32. d
33. d
34. d
41. c
42. c
43. d
44. c
51. a
52. b
53. d
54. d
61. b
62. a
63. a
64. c
71. a
72. b
73. d
74. d
81. d
82. c
83. d
84. c
91. c
92. b
93. e
94. b
101. c
102. a
103. c
104. c
111. b
112. d
113. b
114. c
121. d
122. b
123. d
124. d
131. b
132. e
133. a
134. a
141. d
142. d
143. c
144. b
151. b
152. a
153. a
154. b
161. d
162. c
163. b
164. a
Fill in the Blanks:
1. mechanistic
3. heuristic
5. information science
7. formalization
9. script
11. semantic
13. explanations menus and windows
15. binary
17. logic
19. action
21. XCON
23. Lambda
25. logical inferences
Computer and IT
5. d
15. b
25. a
35. a
45. d
55. b
65. b
75. c
85. d
95. b
105. a
115. a
125. b
135. d
145. b
155. c
6. c
16. d
26. b
36. c
46. a
56. b
66. d
76. e
86. a
96. a
106. b
116. a
126. a
136. a
146. a
156. c
7. b
17. b
27. c
37. a
47. b
57. a
67. b
77. a
87. b
97. a
107. a
117. c
127. c
137. d
147. b
157. c
8. d
18. a
28. b
38. b
48. c
58. c
68. b
78. c
88. d
98. b
108. a
118. a
128. d
138. d
148. c
158. a
9. c
19. b
29. c
39. c
49.. c
59. b
69. d
79. d
89. a
99. a
109. c
119. d
129. a
139. d
149. a
159. a
10. d
20. d
30. a
40. b
50. b
60. a
70. a
80. c
90. d
100. d
110. d
120. d
130. c
140. c
150. a
160. c
2. 100 billion
4. decision-making
6. domain expert
8. behaviour, structure
10. lexical
12. understanding
14. island driving
16. SET
18. Semantic network
20. backward-chaining
22. Abbreviated Rules Language
24. 100,000
26. knowledge
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 244
Institute for Competitive Exams
100 Sample Questions for Computer Exam
1. The _____ states that a foreign key must either match a primary key value in another relation
or it must be null.
(a) entity integrity rule
(b) referential integrity constraint
(c) action assertion
(d) composite attribute
(e) None of these
2. An applet __________
(a) is an interpreted program that runs on the client
(b) tracks the number of visitors to a Website
(c) is a compiled program that usually runs on the client
(d) collects data from visitors to a Website
(e) None of these
3. A _____ sometimes called a boot sector virus, executes when a computer boots up because it
resides in the boot sector of a floppy disk or the master boot record of a hard disk.
(a) system virus
(b) Trojan horse virus
(c) file virus
(d) macro virus
(e) None of these
4. Which error detection method uses one’s complement arithmetic?
(a) Simply parity check
(b) Checksum
(c) Two-dimensional parity check
(d) CRC
(e) None of these
5. A result of a computer virus can not lead to ___.
(a) Disk Crash
(b) Mother Board Crash
(c) Corruption of program
(d) Deletion of files
(e) None of these
6. The network interface card of LAN is related to following layer of OSI Model(a) Transport
(b) Network
(c) Data Link
(d) Physical
(e) All of these
7. Which of the following does not describe a data warehouse?
(a) Subject-oriented
(b) Integrated
(c) Time-variant
(d) Updateable
(e) None of these
8. Which of the following is true ?
(a) Logical design is software-dependent
(b) In a distributed database, database is stored in one physical location
(c) Conceptual design translates the logical design into internal model
(d) Logical design is software independent
(e) None of these
9. A range check _____
(a) ensures that only the correct data type is entered into a field
(b) verifies that all required data is present
(c) determines whether a number is within a specified limit
(d) tests if the data in two or more associated fields is logical
(e) None of these
10. The total set of interlinked hypertext documents worldwide is(a) HTTP
(b) Browser
(c) WWW
(d) B2B
(e) None of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 245
Institute for Competitive Exams
11. With the object-oriented (OO) approach, an object encapsulates, or_____.a programmer.
(a) carries out, the details of an object for
(b) hides, the details of an object from
(c) reveals, the details of an object to
(d) extends, the details of an object beyond
(e) None of these
12. Every computer connected to an intranet or extranet must have a distinct_____
(a) firewall
(b) proxy server
(c) IP address
(d) domain name
(e) None of these
13. A table of bits in which each row represents the distinct values of a key?
(a) Join index
(b) Bitmap index
(c) B + Tree
(d) Hierarchical index
(e) None of these
14. The degree of detail that should be incorporated into a database depends on what?
(a) Data integrity
(b) The type of database
(c) The user’s perspective
(d) The business practices and policies
(e) None of these
15. The ___.converts digital signals to analog signals for the purpose of transmitting data over
telephone lines.
(a) Modem
(b) Router
(c) Gateway
(d) Bridge
(e) All of these
16. Before a package can be used in a java program it must be___.
(a) executed
(b) referenced
(c) imported
(d) declared
(e) None of these
17. Choose the correct way to indicate that a line in a C++ program is a comment line, that is, a line
the will not be executed as an instruction___.
(a) begin the line with a # sign
(b) begin the line with double slashes (/ /)
(c) begin and end the line with double hyphens (--)
(d) indent the line
(e) None of these
18. Programming language built into user programs such as Word and Excel are known as____
(a) 4GLs
(b) macro languages
(c) object-oriented languages
(d) visual programming languages
(e) None of these
19. Firewalls are used to protect against___.
(a) Unauthorized Attacks
(b) Virus Attacks
(c) Data Driven Attacks
(d) Fire Attacks
(e) All of these
20. This is a standard way for a Web server to pass a Web user’s request to an application program
and to receive data back to forward to the user
(a) Interrupt request
(b) Forward DNS lookup
(c) Data-Link layer
(d) File Transfer Protocol
(e) Common gateway interface
21. Three SQL, DDL, CREATE commands are__.
(a) Schema, Base and Table
(b) Base, Table and Schema
(c) Key, Base and Table
(d) Schema, Table and View
(e) None of these
22. Data are ________ in client/server computing.
(a) never sent to the client machine
(b) sent in very large sections to save processing
time
(c) sent only upon the client’s request
(d) sent in complete for the client to filter and sort
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 246
Institute for Competitive Exams
(e) sent from the client to the server for processing
23. Which of the following will not eliminates the ambiguities of a null value?
(a) Define the attribute as required
(b) Define subtypes
(c) Define each attribute as having an initial value that is recognized as blank
(d) Define supertypes
(e) None of these
24. The____directory is mandatory for every disk.
(a) Root
(b) Base
(c) Sub
(d) Case
(e) None of these
25. This is a group of servers that share work and may be able to back each other up if one server
fails.
(a) Channel bank
(b) Cluster
(c) Tiger team
(d) Serverless backup
(e) Logical unit
26. Execution of any ‘C’ Program starts from____
(a) the infinite function
(b) the moderate function
(c) the main function
(d) the detection function
(e) All of these
27. The four common types of files are_____
(a) document files, worksheet files, database files and digital files
(b) document files, worksheet files, database files and presentation files
(c) document files, worksheet files, database files and program files
(d) document files, worksheet files, database files and workbook files
(e) None of these
28. Software bugs can be caused by the following__.
(a) Poorly validated requirements
(b) Properly implemented designs
(c) Simple misuse of the program
(d) (a) and (c) both
(e) (a), (b) and (c) all
29. _____ is a primary key of one file that also appears in another file.
(a) Physical key
(b) Primary key
(c) Foreign key
(d) Logical key
(e) None of these
30. ____ is a networking model proposed by International Standard Organization.
(a) ISO Reference Model
(b) IOS Reference Model
(c) OSI Reference Model
(d) SIO Reference Model
(e) None of these
31. Transfer rates range from thousands of bits per second to billion of bits per second, called
_______
(a) Kilobits per second (Kbps)
(b) Megabits per second (Mbps)
(c) Decabits per second (Dbps)
(d) Gigabits per second (Gbps)
(e) None of these
32. A universal standard for moving mail on the internet is ____.
(a) MIME
(b) POP
(c) SMTP
(d) IMAP
(e) None of these
33. Which of the following is not a common feature of software applications?
(a) Menus
(b) Windows
(c) Help
(d) Search
(e) None of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 247
Institute for Competitive Exams
34. A data analysis technique that organizes data attributes such that they are grouped in nonredundant, stable, flexible, and adaptable entities is known as ___.
(a) normalization
(b) generalization
(c) contextualization
(d) concatenation
(e) None of these
35. Which of the following is not a restriction for a table to be a relation?
(a) The cells of the table must contain a single value
(b) All of the entries in any column must be of the same kind
(c) The columns must be ordered
(d) No two rows in a table may be identical
(e) None of these
36. In data flow diagrams_____.
(a) processes are represented by rounded rectangles (b) data flows are represented by straight
lines
(c) data stores are represented by open ended boxes (d) (a) and (c) both
(e) (a), (b) and (c) all
37. Which of the following is a transaction?
(a) A group of SQL statements consisting of one read and one write operation
(b) A group of SQL statements consisting of only read operations
(c) A group of SQL statements defining a user-oriented task
(d) A group of SQL statements consisting only of write operations
(e) None of these
38. The term, ‘hypertext’, means___.
(a) Non-sequential writing
(b) Hypermedia
(c) Blinking text
(d) Text with heavy formatting
(e) None of these
39. Programs that automatically submit your search request to several search engines
simultaneously are called____.
(a) Metasearch engine
(b) Webcrawlers
(c) Spiders
(d) Hits
(e) None of these
40. In Oracle, which statement is true about segments?
(a) Each table has its own segment
(b) A segment is created every time an extent is created, extended, or altered
(c) An index segment is created every time a table is created
(d) A segment is deleted whenever a table is truncated
(e) None of these
41. If 20 people need to communicate using symmetric-key cryptography____ symmetric keys are
needed.
(a) 190
(b) 200
(c) 20
(d) 19
(e) 210
42. What is Internet 2 ?
(a) A new type of cabling systems for Wide Area Networks
(b) A second local area network that can connect with other online LAN to share access
(c) A new standard for Internet browser
(d) An association to develop advanced Internet technology
(e) None of these
43. A device that copies or reproduces text and images is also called a(n)___
(a) optical scanner
(b) bar code reader
(c) character device
(d) digital camera
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 248
Institute for Competitive Exams
(e) None of these
44. A monitor’s clarity as indicated by its resolution is measured in____
(a) bits
(b) pixels
(c) arrays
(d) inches
(e) None of these
45. What should you do as soon as you have successfully created the database and the data
dictionary?
(a) Open the database for users to start adding data
(b) Start adding a bunch of tablespaces to allow users to use
(c) Leave it running for a few days to make sure that nothing bad is going to happen
(d) Shut it down and take a cold backup
(e) None of these
46. How is power supplied to a low power USB device?
(a) Through a power cable
(b) From an external power supply
(c) Directly from the computer’s power supply (d) Through the USB cable
(e) None of these
47. Where are cookies stored?
(a) On the server
(b) In web.xml
(c) On the client
(d) In HTML
(e) None of these
48. The time between the computer’s request for the data from secondary storage and the
completion of the data transfer is known as the disk’s___
(a) cache time
(b) access time
(c) recording time
(d) baud rate
(e) None of these
49. _____. is an application of associative memory.
(a) Pattern recognition
(b) Function approximation
(c) Image recognition
(d) Retina recognition
(e) None of these
50. When you are selecting a mouse for a particular computer system, what is the most important
consideration?
(a) The type of drives that come with the mouse
(b) The length of the mouse cord
(c) The type of connector the mouse is equipped with
(d) The number of button the mouse has
(e) None of these
51. As per the news available in the Financial newspapers PNB is planning to dilute Government
holdings in it, so that it can meet Basel-II norms and to provide funds for its expansion plans. As
per this plan Government holdings in it would be reduced to the level of ____.
(a) 55%
(b) 51%
(c) 49%
(d) 43%
(e) None of these
52. How much amount PNB raised through ‘Tier-II Bonds’ planned in June 2007?
(a) Rs. 2000 crores
(b) Rs. 1500 crores
(c) Rs. 1000 crores
(d) Rs. 500 crores
(e) None of these
53. Which of the following features usually applies to data in a data warehouse?
(a) Data are often deleted
(b) Most applications consists of transactions
(c) Data are rarely deleted
(d) Relatively few records are processed by
applications
(e) None of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 249
Institute for Competitive Exams
54. The Reserve Bank of India recently reviewed the Credit & Monetary Policy and decided to hike
CRR (cash Reserve Ratio) by 0.5% to make it 7%. What would be its impact on banks?
[Pick-up the correct statement (s)]
1. Banks will also raise their lending rates on housing / personal loans.
2. Banks will start reducing lending rates on various loans/ credits
3. Rates on deposits will come down.
(a) Only 1
(b) Only 2
(c) Both 2 and 3
(d) All 1, 2 and 3
(e) None of these
55. Which of the following is a transaction?
(a) A group of SQL statements consisting of one read and one write operation
(b) A group of SQL statements consisting only of ready operations.
(c) A group of SQL statements defining a user-oriented task
(d) A group of SQL statements consisting only of write operations.
(e) None of these
56. As per the National Housing and Habitat Policy 2007, how much land in each city should be
reserved for housing for urban poor?
(a) 1%
(b) 5% to 7.5%
(c) 9%
(d) 10% to 12%
(e) 15% to 25%
57. Which amongst the following organizations / agencies has set- up a panel to address the
grievances of investors in transmission of securities?
(a) Reserve Bank of India
(b) National Stock Exchange
(c) Securities & Exchange Board of India
(d) Association of mutual Funds in India
(e) None of these
58. There are several security devices used to stop individuals from exploiting your system. Which
of the following is used in conjunction with a firewall?
(a) Proxy server
(b) Intrusion- detection system
(c) Terminal server
(d) Web server
(e) None of these
59. Many times we read about the ‘Hybrid Loans’ a term used in financial/ banking sectors. What
does it mean?
1. A Hybrid loan is a mixture of various loan products some of which are given as cash whereas
others are given as the assistance in the form of consultancy, technical know- how, marking plans
etc.
2. These loans are the loans given to a group of people for different needs but who share a joint
responsibility to repay it. Most of them are small Self Help Groups (SHGs).
3. This is a loan scheme in which a fixed rate loan becomes a floating rate loan after a fixed number
of years.
(a) Only 1
(b) Only 3
(c) Both 1 and 3
(d) All 1,2 and 3
(e) None of these
60. In India some new types of Firms / Companies are being established which arrange and / or
raise funds through public offerings for acquiring small companies in a particular sector or
location. These Firms/ Companies are known as __
(a) Special purpose Acquisition Companies
(b) Special Economic Zones
(c) Small and Medium Enterprises
(d) Economic Cooperation and Development Companies
(e) None of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 250
Institute for Competitive Exams
61. The interest rate at which banks borrow very short-term funds from another bank is known as
_.
(a) Call Rate
(b) Repo Rate
(c) Bank Rate
(d) Reverse Repo Rate
(e) None of these
62. The effect of the ROLLBACK command in a transaction is the following___
(a) Undo all changes to the data- base resulting from the execution of the transaction
(b) Undo the effects of the last UPDATE command
(c) Restore the content of the database to its state at the end of the previous day
(d) Make sure that all changes to the database are in effect
(e) None of these
63. India’s Initial Public Offerings (IPOs) market was adjudged as world’s 8th largest such market
in 2006. How much amount was raised by the same in 2006?
(a) Rs. 10000 crores
(b) Rs. 20000 crores
(c) Rs. 25000 crores
(d) Rs. 30000 crores
(e) Rs. 35000 crores
64. India’s Union tax revenues would be more than Rs. 5 trillion by 2010. Which of the following
taxes is not included in the same?
(a) Corporate Tax
(b) Sales Tax
(c) Custom Duty
(d) Service Tax
(e) Income Tax
65. The Government of India is paying much attention towards farm sector these days, as it is said
by the experts, it has lost its growth momentum and has entered into a near crisis situation. What
is/ are the reason(s) of such a poor and critical performance of Farm Sector?
[Pick – up correct statement (s)]
(1) Inadequate productivity.
(2) Low prices of the output
(3) Lack of credit facilities at reasonable rates.
(4) Non-availability of agricultural land as about 30% of the total land has lost its fertility.
(a) Both 1 and 2
(b) Only 2,3 and 4
(c) Only 3 and 4
(d) Only 3 and 4
(e) None of these
66. A client / server network _____
(a) has clients that provide functions such as application control and shared computation.
(b) uses client computers to provide copies of software to the server to allow server processing.
(c) provides a company with the capability to downsize from lager computer systems and move
away from legacy systems.
(d) has server computers that perform all processing, clients are’ dumb’ input/ output devices only.
(e) None of these.
67. The Prime Minister of India on his speech on Independence Day announced some new
Schemes for various sectors of the society. Which of the following is NOT one of these Schemes
/projects?
1. An allowance of Rs. 2,000 per month to all those unemployed youth who lost their parents/
siblings in terrorist activities.
2. Health insurance for the poor.
3. National old age pension scheme to be expended to cover more number of people.
(a) Only 1
(b) Only 2
(c) Only 3
(d) Both 1 and 2
(e) Only 2 and 3
68. An applet is ___. Document application program.
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 251
Institute for Competitive Exams
(a) a static
(b) a dynamic
(c) an active
(d) a passive
(e) None of these
69. Which of the following agreements done by India with another nation(s) / world entities is
often referred as ‘123 Agreement’?
(a) WTO Agreement done in Doha Convention.
(b) Agreement with UNO to provide peace keeping force to various parts of the world.
(c) Nuclear Deal with USA.
(d) Nuclear deal with Russia and Australia as a NATO Group of Suppliers of Nuclear Technology /
Spare Parts.
(e) None of these
70. Digital signature cannot provide ___. for the message.
(a) integrity
(b) nonrepudiation
(c) authentication
(d) confidentiality
(e) None of these
71. Which of the following Banks of Indian origin has launched “India SME toolkit” along with IBM
and IFC which will help small and medium enterprises to increase their productivity?
(a) IDBI Bank
(b) SIDBI
(c) Axis Bank
(d) SBI
(e) ICICI bank
72. The local antenna for satellite connections is called a ____
(a) modem
(b) terminal
(c) VSAT
(d) DTA
(e) None of these
73. Who amongst the following is the author of the book “India After Gandhi- the History of the
World’s Largest Democracy”?
(a) Ramchandra Guha
(b) Rajmohan Gandhi
(c) Dr. Manmohan Singh
(d) A.P.J. Abdul Kalam
(e) None of these
74. What are the four basis connecting hardware devices?
(a) Repeater, bridge, router and gateway
(b) Repeater, bridge, router and dell
(c) Repeater, connector, router and gateway
(d) Amplifier, bridge, router and gateway
(e) None of these
75. Which type of processing speed measurement is used primarily with supercomputers?
(a) Flops
(b) Fractions of second
(c) Gigahertz
(d) MIPS
(e) None of these
76. The Government of India is planning to do away with dual support price mechanism for
sugarcane. Al present the statutory Minimum Price (SMP) is decided by the Union Government.
The order price is decided by which of the following?
(a) Mandi Samiti
(b) All India Ganna Growers Association
(c) National Commodities Exchange
(d) State Governments of Sugarcane Growing States
(e) None of these
77. This type of software is designed for users who want to customize the programs they use.
(a) Shareware
(b) Open-source software
(c) Freeware
(d) Macros
(e) None of these
78. The 11th Five Year Plan wishes to rise the existing 2% growth in agriculture and allied activities
to which of the following levels by the year 2012?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 252
Institute for Competitive Exams
(a) 8%
(b) 6%
(c) 5%
(d) 4%
(e) None of these
79. India recently signed a Bilateral Investment Protection Agreement (BIPA) with Mexico. What
are the major exports to India by Mexico?
1. Petroleum Chemicals
2. Crude Oil
3. Mediciens & Surgrical equipment
(a) Only 1
(b) Only 2
(c) Both 1 & 2
(d) Only 3
(e) None of these
80. What is the term associated with the second part of an e-mail address?
(a) Local address
(b) Eight characters long
(c) User name
(d) Domain name
(e) None of these
81. India won Future Cup Cricket Tournament held in July 2007 against which of the following
teams? (India won by 2-1)
(a) South Africa
(b) England
(c) New Zealand
(d) Sri Lanka
(e) None of these
82. A port that allows 8 bits at a time to be transmitted simultaneously is a (n) __.
(a) dedicated port
(b) parallel port
(c) SCSI port
(d) USB port
(e) None of these
83. Who amongst the following was awarded a Special Award of the Director- General of the World
Health Organization (WHO) for an outstanding contribution to Tobacco Control Programme?
(a) Jaya Bachchan
(b) Rajnikanth
(c) Maneka Gandhi
(d) A.Ramadoss
(e) None of these
84. In order for computers to communicate across a network, they must be connected through
a(n)__.
(a) TCP/IP
(b) Topology
(c) Ethernet
(d) Thin client
(e) None of these
85. Which of the following Banks of Indian orign raised Rs. 20500 crores through its IPO?
(IPO was India’s biggest IPO till date)
(a) HDFC Bank
(b) State Bank of India
(c) NABARD
(d) ICICI Bank
(e) None of these
86. As we all know banks are required to implement Basel Norms in near future, wherein some
measures are suggested to protect banks from certain types of risks. As defined by Basel
Committee “the risk of loss resulting from inadequate or failed internal processes or due to
inefficiency of the staff” is known as which of the following risk(s)?
1. Market Risk
2. Credit Risk
3. Operational Risk
(a) Only 1
(b) Only 2
(c) Only 3
(d) All 1, 2 and 3
(e) None of these
87. Which of the following countries is suffering from world’s highest level of inflation?
(a) Iraq
(b) Zimbabwe
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 253
Institute for Competitive Exams
(c) Ghana
(e) None of these
(d) Ethiopia
88. Who amongst the following Indian leaders in one of his/her recent speeches/ interviews to
Press has said- “Every economically strong country has achieved its goals through industrialization
and we (India) too should apply ourselves to this”?
(a) Dr. Manmohan Singh
(b) Smt. Sonia Gandhi
(c) Smt. Pratibha Patil
(d) Shri Somnath Chatterjee
(e) None of these
89. As reported in the financial newspapers some US Banks are caught in the credit market
upheaval have started refusing to lend money against ‘Sub-Prime’ credit portfolios. What type of
loans are considered Sub-Prime?
[Pick –up the correct statement (s)]
1. All loans taken as ‘no doc.’ Loans where no proof of income is provided to the lender.
2. All loans taken as ‘low doc.’ Loans where give with just a little paper work.
3. All loans taken against a house/ property which is already mortgaged to some other Bank
/Financial Institute and the loan period for the same is not yet over.
(a) Only 1
(b) Both 1 and 2
(c) Only 2
(d) Only 3
(e) All 1, 2 and 3
90. ‘UNIDO’ has been helping small and medium enterprises in the country since 1967. what is the
full name of ‘UNIDO’?
(a) United India Development Organization
(b) United Nations Industrial Development Organization
(c) Urban India New Industrial Development Organization
(d) Union of India’s Nuclear Infrastructural Development Operations
(e) None of these
91. Who amongst the following was the Chairman of the Committee set-up on “Inclusive Growth”?
(a) Y.V. Reddy
(b) Rakesh Mohan
(c) Bimal Jalan
(d) M.S. Swaminathan
(e) C. Rangarajan
92. The Reserve Bank of India recently introduced some curbs on external Commercial borrowing.
This was done in order to do which of the following?
1. Control rapid appreciation of the rupee
2. Safeguard the interest of the importers.
3. Control the flow of foreign currency.
(a) Only 1
(b) Only 2
(c) Only 3
(d) Both 1 and 2
(e) Both 1 and 3
93. India has decided to set-up an Investment Forum with which of the following group of nations
so that economic co-operation between the two can be increased?
(a) League of Arab Nations
(b) European Union
(c) Sub-Saharan Countries
(d) Latin American Countries
(e) None of these
94. Which of the following represents the growth of Industrial production in India during 200607? About__.
(a) 9%
(b) 10%
(c) 11%
(d) 12%
(e) 13%
95. Who amongst the following is not a Tennis Wimbledon 2007 tournament winner in any
category?
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 254
Institute for Competitive Exams
(a) Venus Williams
(b) Roger Federer
(c) Cara Black
(d) Arnaud Clement
(e) Sania Mirza
96. Which of the following is not included in the list of new Seven Wonders of the World?
(a) Great Wall of China
(b) Taj Mahal
(c) Pyramid at Chichen Itza
(d) Roman Colosseum
(e) Statue of Liberty
97. Dr. Y.V. Reddy in one of his interviews to the press had sad that “Managing Liquidity has
become the most challenging task these days.” What does it really mean?
[Pick-up the correct statement(s)]
1. Because of very high level of inflation, almost touching double digits, cost of funds has gone up
substantially and banks are left with a very small amount of liquid funds at their ends.
2. We have to adopt such measures that optimum amount of funds always remain in circulation.
High inflation and demand pressure should not upto a negative effect on it
3. Since more and more people want Loans/ Credit we should bring in more foreign funds (FIIs
and FDIs) to meet the demand. As Indian Rupee is not fully convertible very few people are
investing in India. Hence managing liquidity has become a tricky issue.
(a) Only 1
(b) Only 2
(c) Only 3
(d) Both 1 and 2
(e) None of these
98. Which of the following was/ were included in the Economic Policy Agenda of the 33rd G-8
Summit held in June 2007?
1. Globalization with human face.
2. Sustainable use of resources.
3. Create a separate forum for China, Brazil and India, as the growth pattern of these nations is
different from G-8 nations.
(a) Only 3
(b) Only 2
(c) Only 1
(d) Both 1 and 2
(e) All 1, 2 and 3
99. As reported by UK based Economist Intelligence Unit (EIU) the prices of the food commodities
in the world may remain high for few more months and may register an upward trend also in
2008-09. The report has given some reasons for the price boom. Which of the following reason(s)
seems to be valid reason(s) for the same, as far as India is concerned?
1. Surging demand for food, foodstuff.
2. Low stocks of the commodities.
3. Unfavorable weather conditions.
4. Lack of land available for food grains and oilseed.
(a) Only 1
(b) Only 1, 2 and 3
(c) All 1, 2, 3 and 4
(d) Only 4 and 2
(e) None of these
100. What is a specialized software program that allows input and output devices to communicate
with the rest of the computer system?
(a) Utility driver
(b) Utility program
(c) Data compression utility
(d) Device driver
(e) None of these
Computer and IT
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
Page 255
Institute for Competitive Exams
1. (a)
11. (b)
21. (d)
31. (d)
41. (a)
51. (b)
61. (a)
71. (e)
81. (a)
91. (e)
2. (c)
12. (c)
22. (c)
32. (c)
42. (d)
52. (d)
62. (a)
72. (e)
82. (b)
92. (e)
Computer and IT
3. (e)
13. (b)
23. (d)
33. (b)
43. (a)
53. (b)
63. (c)
73. (a)
83. (d)
93. (b)
4. (b)
14. (b)
24. (c)
34. (a)
44. (b)
54. (b)
64. (b)
74. (a)
84. (b)
94. (b)
Answers
5. (b)
6. (e)
15. (a)
16. (c)
25. (b)
26. (c)
35. (d)
36. (d)
45. (d)
46. (b)
55. (a)
56. (b)
65. (c)
66. (b)
75. (a)
76. (d)
85. (d) 86. (c)
95. (e)
96. (e)
7. (d)
17. (b)
27. (b)
37. (a)
47. (a)
57. (c)
67. (e)
77. (a)
87. (b)
97. (d)
8. (a)
18. (d)
28. (e)
38. (b)
48. (b)
58. (a)
68. (b)
78. (d)
88. (a)
98. (d)
#3094, Sector 37D, Chandigarh. E-Mail: info@gjtutorial.com
9. (c)
19. (a)
29. (c)
39. (a)
49. (b)
59. (b)
69. (c)
79. (c)
89. (d)
99. (b)
10. (a)
20. (e)
30. (a)
40. (a)
50. (c)
60. (a)
70. (d)
80. (d)
90. (b)
100. (d)
Page 256