You are on page 1of 151

Downloaded from www.books4career.blogspot.

com
This page
intentionally left
blank
Downloaded from www.books4career.blogspot.com
Downloaded from www.books4career.blogspot.com
Copyright 2006 New Age International (P) Ltd., Publishers
Published by New Age International (P) Ltd., Publishers
All rights reserved.
No part of this ebook may be reproduced in any form, by photostat, microfilm,
xerography, or any other means, or incorporated into any information retrieval
system, electronic or mechanical, without the written permission of the publisher.
All inquiries should be emailed to rights@newagepublishers.com
ISBN : 978-81-224-2421-8
PUBLISHING FOR ONE WORLD
NEW AGE INTERNATIONAL (P) LIMITED, PUBLISHERS
4835/24, Ansari Road, Daryaganj, New Delhi - 110002
Visit us at www.newagepublishers.com
DEDICATED TO
MY BELOVED MOTHER
This page
intentionally left
blank
Preface
The I T i ndustry i s now i n boom. Students are getti ng pl aced through both off-campus and on-
campus recrui tment. Recrui tment has become a process of rejecti on rather than sel ecti on due
to the l arge output from the i nsti tuti ons al l over the country. The recrui tment process normal l y
i nvol ves the fol l owi ng stages:
Apti tude test Techni cal Test Techni cal I ntervi ew Personal I ntervi ew
Of course, many compani es i ncl ude group di scussi on al so. The areas where the freshers or
experi enced professi onal s fi nd i t di ffi cul t are the second and thi rd stages menti oned above.
Though they have mastered many subjects i n thei r graduati on/post-graduati on, they fi nd i t
difficult to quickly recapitulate the basics, which is mandatory to clear any technical test/interview.
Hence the need for the preparati on of a textbook of thi s type consi sti ng of more than 1000
questi ons (short answer and objecti ve type) on vari ous hot topi cs i n Computer Sci ence.
Thi s text book i s presented as fol l ows. There are total l y twel ve chapters. The fi rst el even
chapter s pr ovi de shor t answer questi ons i n C Pr ogr ammi ng, C++ Pr ogr ammi ng, Data
Structures & Al gori thms, DBMS, RDBMS, DDBMS, Software Engi neeri ng, Software Qual i ty
and Software Testi ng, Operati ng System, Computer Appl i cati ons, JAVA Programmi ng and
Computer Networks. The l ast chapter provi des objecti ve type questi ons on the vari ous topi cs
di scussed earl i er. Thi s Test Yoursel f chapter i s gi ven to readers to test themsel ves after
compl etel y studyi ng the earl i er chapters.
Bei ng the fi rst edi ti on, thi s book i s prepared and presented i n such a way that everybody,
even a begi nner, wi l l fi nd i t easy to have a qui ck gl i mpse of the vari ous concepts i n Computer
Sci ence. The reader can make use of the text book to prepare for techni cal tests and techni cal
i ntervi ews conducted by software compani es, competi ti ve exams conducted by State Government
and the Government of I ndi a for the posts of I T offi cers, Programmers, I T Managers, and
Software Engi neers, to cl ear the techni cal part of the exams l i ke UGC-NET, SLET etc. The
book i s targetted at the under-graduate and post-graduate students of any branch, those who
aspi re to enter the fi el d I nformati on Technol ogy. A l i st of books that hel ped us to prepare thi s
textbook i s gi ven i n the Bi bl i ography. Though great care has been taken i n edi ti ng thi s book,
I woul d whol eheartedl y accept suggesti ons for i mprovement offered by the readers. I f you
have the pati ence to go through al l the questi ons starti ng from the fi rst chapter to the l ast
chapter, I am hopeful that the purpose of the book woul d be served.
My whol ehear ted thanks and acknowl edgements ar e due i n no smal l measur e to
Dr . (Mr s.) Radha Thi agar ajan, Chai r man, Thi agar ajar Col l ege of Engi neer i ng (TCE),
Mr. T. Kannan, Vi ce Chai rman Correspondent, Dr. V. Abhai kumar, Pri nci pal , Dr. R. Rajaram,
Head of the Department of Computer Sci ence & Engi neeri ng, and my col l eagues of the TCE,
fri ends and fami l y. I am thankful to Prof. V. Sankarasubramani an, Head of the Department of
Engl i sh, The Madura Col l ege, Madurai , for hi s i nval uabl e comments and suggesti ons duri ng
the preparati on of thi s book. I si ncerel y acknowl edge the support extended by my father, who
i s the moti vati ng force behi nd thi s project. Fi nal l y, I am thankful to New Age I nternati onal
(P) Li mi ted, Publ i shers, New Del hi , for thei r support and encouragement.
S. PARTHASARATHY
This page
intentionally left
blank
Acronyms and Abbreviations
2PC Two-Phase Commi t Protocol
3PC Three-Phase Commi t Protocol
4GL 4th Generati on Language
ALGOL Al gori thmi c Language
ANSI Ameri can Nati onal Standards I nsti tute
API Appl i cati on Programmi ng I nterface
ARP Address Resol uti on Protocol
ASCII Ameri can Standard Code for I nformati on I nterchange
ATL Acti ve Templ ate Li brary
ATM Automati c Tel l er Machi ne
ATP Acceptance Test Procedure
ATR Acceptance Test Resul ts
AUT Appl i cati on Under Test
AWT Abstract Wi ndowi ng Tool ki t
B2C Busi ness-to-Consumer
BASIC Begi nners Al l Purpose Symbol i c I nstructi on Code
BCNF Boyce-Codd Normal Form
BDK Bean Devel opment Ki t
BIOS Basi c I nput Output System
BIT Bi nary Di gi t
BOM Bi l l of Materi al
BPR Busi ness Process Reengi neeri ng
BSC Bi nary Symmetri c Channel
BVA Boundary Val ue Anal ysi s
C2B Consumer-to-Busi ness
C2C Consumer-to-Consumer
CAD Computer Ai ded Desi gn
CAM Computer Ai ded Manufacturi ng
CASE Computer Ai ded Software Engi neeri ng
x Placement Preparation
CBD Component Based Devel opment Model
CBSE Component Based Software Engi neeri ng
CGI Common Gateway I nterface
CMM Capabi l i ty Maturi ty Model
CMMI Capabi l i ty Maturi ty Model I ntegrati on
CMOS Compl ementary Metal Oxi de Semi conductor
CNF Chomsky Normal Form
COBOL Common Busi ness Ori ented Language
COCOMO Constructi ve Cost Model
COM Component Object Model
COQ Cost of Qual i ty
CPM Cri ti cal Path Method
CRC Cl ass Responsi bi l i ty Col l aborator Model i ng
CRM Customer Rel ati onshi p Management
CSPEC Control Speci fi cati on
CSPM Certi fi ed Software Project Manager
CSQA Certi fi ed Software Qual i ty Anal yst
CSQE Certi fi ed Software Qual i ty Engi neer
CSTE Certi fi ed Software Test Engi neer
DBA Database Admi ni strator
DBMS Database Management System
DCL Data Control Language
DDBMS Di stri buted Database Management System
DDL Data Defi ni ti on Language
DES Data Encrypti on Standard
DFA Determi ni sti c Fi ni te Automata
DFD Data Fl ow Di agram
DHTML Dynami c Hypertext Markup Language
DLL Dynami c Li nk Li brary
DMA Di rect Memory Access
DML Data Mani pul ati on Language
DNS Domai n Name System
DOM Document Object Model
Acronyms and Abbreviations xi
DPDA Determi ni sti c Pushdown Automata
DRE Defect Removal Effi ci ency
DSN Data Source Name
DSQI Desi gn Structure Qual i ty I ndex
DSS Deci si on Support System
DTL Di ode Transi stor Logi c
DVD Di gi tal Versati l e Di sk
ECL Emi tter Coupl ed Logi c
EDI El ectroni c Data I nterchange
EER Extended Enti ty Rel ati on Di agram
EFT El ectroni c Funds Transfer
EIA Enterpri se I ntegrati on Appl i cati on
EIS Executi ve I nformati on System
EPROM Erasabl e Programmabl e Read Onl y Memory
ERD Enti ty Rel ati on Di agram
ERP Enterpri se Resource Pl anni ng
EVA Earned Val ue Anal ysi s
FAST Faci l i tated Appl i cati on Speci fi cati on Techni que
FDM Frequency Di vi si on Mul ti pl exi ng
FTP Fi l e Transfer Protocol
FTR Formal Techni cal Revi ew
GIS Geographi cal I nformati on System
GNF Grei bach Normal Form
GUI Graphi cal User I nterface
HTML Hypertext Markup Language
HTTP Hypertext Transfer Protocol
IDC I nternet Database Connector
IIS I nternet I nformati on Server
ISDN I ntegrated Servi ce Di gi tal Network
ISO I nternati onal Organi zati on for Standardi zati on
ISTQB I nternational Software Testing Qualifications Board Certified
IT I nformati on Technol ogy
ICMP I nternet Control Message Protocol
J DBC Java Database Connecti vi ty
J FC Java Foundati on Cl asses
xi i Placement Preparation
KPA Key Process Area
LAN Local Area Network
LOC Li nes of Code
MAC Medi um Access Control Subl ayer
MAN Metropol i tan Area Network
MAR Memory Address Regi ster
MFC Mi crosoft Foundati on Cl asses
MIS Management I nformati on System
MODEM Modul ator-Demodul ator
MPI Message Passi ng I nterface
MRP Materi al s Requi rements Pl anni ng
MRP-II Manufacturi ng Resource Pl anni ng
MST Mi ni mum Spanni ng Tree
MTBF Mean Ti me Between Fai l ure
MTTF Mean Ti me to Fai l ure
MTTR Mean Ti me to Repai r
NP Non-Determi ni sti c Pol ynomi al
NSP Network Servi ce Provi der
ODBC Open Database Connecti vi ty
OLAP On Li ne Anal yti cal Processi ng
OLE Object Li nki ng and Embeddi ng
OOAD Object Ori ented Anal ysi s and Desi gn
OOPS Object Ori ented Programmi ng System
OSI Open System I nterconnecti on
OSPF Open Shortest Path Fi rst Protocol
PAL Programmabl e Array Logi c
PCB Process Control Bl ock
PCMM Peopl e Capabi l i ty Maturi ty Model
PDA Push Down Automata
PDL Program Desi gn Language
PDT Parti ti on Descri pti on Tabl e
PERT Program Eval uati on and Revi ew Techni que
POP Poi nt to Poi nt Protocol
POST Power On Sel f Test
PRO/SIM Prototypi ng and Si mul ati on Tool s
Acronyms and Abbreviations xi i i
PROM Programmabl e Read Onl y Memory
PSP Personal Software Process
PSPEC Process Speci fi cati on
QFD Qual i ty Functi on Depl oyment
QOS Qual i ty of Servi ce
RAD Rapi d Appl i cati on Devel opment
RAID Redundant Arrays of I nexpensi ve Di sks
RAM Random Access Memory
RARP Reverse Address Resol uti on Protocol
RDBMS Rel ati onal Database Management System
RIP Routi ng I nformati on Protocol
RIS Ri sk I nformati on Sheet
RMMM Ri sk Mi ti gati on Moni tori ng and Management pl an
ROM Read Onl y Memory
RPC Remote Procedure Cal l
SADT Structured Anal ysi s and Desi gn Techni que
SAP Systems, Appl i cati ons and Products i n Data Processi ng
SCM Suppl y Chai n Management
SCM Software Confi gurati on Management
SDLC Software Devel opment Li fecycl e
SEI Software Engi neeri ng I nsti tute
SGML Standard Graphi c Markup Language
SLIP Seri al Li ne I nternet Protocol
SMS Short Messagi ng Servi ce
SPOOL Si mul taneous Peri pheral Operati ons Onl i ne
SQA Software Qual i ty Assurance
SQL Structured Query Language
SRS Software Requi rements Speci fi cati on
SSL Secure Socket Layer
SSPI Stati sti cal Software Process I mprovement
STD State Transi ti on Di agram
TCL Transacti on Control Language
TCP/IP Transmi ssi on Control Protocol /I nternet Protocol
TDM Ti me Di vi si on Mul ti pl exi ng
TFTP Tri vi al Fi l e Transfer Protocol
xi v Placement Preparation
TM Turi ng Machi ne
TQM Total Qual i ty Management
TSL Test Scri pt Language
TSP Team Software Process
TTL Transi stor Transi stor Logi c
UDP User Datagram Protocol
UML Uni fi ed Model i ng Language
URL Uni form Resource Locator
V&V Veri fi cati on & Val i dati on
VAN Val ue Added Network
VPN Vi rtual Pri vate Network
VRML Vi rtual Real i ty Model Language
WAN Wi de Area Network
WBS Work Breakdown Structure
WDM Wavel ength Di vi si on Mul ti pl exi ng
WFF Wel l -Formed-Formul ae
WIDL Web I nterface Defi ni ti on Language
WML Wi rel ess Markup Language
WMS Warehouse Management System
XML Extensi bl e Markup Language
XSL Extensi bl e Styl e Language
Acronyms and Abbreviations xv
Contents
Preface vii
Acronyms and Abbreviations ix
1. C Programmi ng 1
2. C++ Programmi ng 16
3. Software Engi neeri ng 27
4. Software Qual i ty and Software Testi ng 34
5. Data Structures and Al gori thms 42
6. Computer Appl i cati ons 47
7. JAVA Programmi ng 52
8. Operati ng System 64
9. Computer Networks 74
10. Di gi tal Pri nci pl es and Mi croprocessor 80
11. DBMS, RDBMS and DDBMS 85
12. Test Yoursel f (Objecti ve Type Questi ons) 93
Bi bl i ography 134
Downloaded from www.books4career.blogspot.com
This page
intentionally left
blank
C Programming 1
1. Who devel oped the C language?
Denni s M.Ri tchi e i n 1972
2. What type of l anguage i s C?
Semi -hi gh l evel l anguage
3. What i s main()?
The mai n() i s a speci al functi on used by the C system to tel l the computer where the
program starts.
4. What i s the functi on of the newline character denoted as \n?
A newl i ne character i nstructs the computer to go to the next (new) l i ne.
5. What i s the purpose of a comment statement?
I t i ncreases the readabi l i ty and understandabi l i ty of the program and hel ps i n debuggi ng
and testi ng.
6. What i s si ze of operator?
I t i s a compi l e ti me operator and when used wi th an operand, i t returns the number of
bytes the operand occupi es.
7. How are the characters i n C grouped?
Letters, di gi ts, speci al characters and whi te spaces
8. What are trigraph characters?
ANSI C i ntroduces the concept of tri graph sequences to provi de a way to enter certai n
characters that are not avai l abl e on some keyboards.
9. What i s a constant?
C constant refers to fi xed val ues that do not change duri ng the executi on of a program.
10. How are the constants cl assi fi ed?
I nteger constants, real constants, si ngl e character constant, stri ng constant.
11. What i s a variable?
A vari abl e i s a data name that may be used to store a data val ue. A vari abl e may take
di fferent val ues at di fferent ti mes duri ng executi on.
12. What are the basi c data types used i n C?
Char, i nt, fl oat, and doubl e
13. What i s a storage class?
Vari abl es i n C can have not onl y data type but al so storage cl ass that provi des i nformati on
about thei r l ocati on and vi si bi l i ty. The storage cl ass deci des the porti on of the program
wi thi n whi ch the vari abl es are recogni zed.
1
C Programming
Downloaded from www.books4career.blogspot.com
2 Placement Preparation
14. Li st the vari ous storage cl asses i n C.
Auto, stati c, extern and regi ster.
15. What i s an operator?
An operator i s a symbol that tel l s the computer to perform certai n mathemati cal or
l ogi cal mani pul ati ons. I t i s used to mani pul ate data and vari abl es i n programs.
16. Li st the vari ous C operators.
Ar i thmeti c oper ator s, r el ati onal oper ator s, l ogi cal oper ator s, assi gnment oper ator s,
i ncrement and decrement operators, condi ti onal operators, bi twi se operators and speci al
operators.
17. What i s stdio.h?
I t i s standard i nput-output header fi l e. The i nstructi on #i ncl ude<stdi o.h> tel l s the compi l er
to search for a fi l e named stdi o.h and pl ace i ts contents at thi s poi nt i n the program.
18. Li st the vari ous control statements i n C.
i f statement, swi tch statement, condi ti onal operator statement and goto statement.
19. What i s switch statement?
C has a bui l t-i n mul ti way deci si on statement known as a swi tch. I t tests the val ue of a
gi ven vari abl e (or expressi on) agai nst a l i st of case val ues and when a match i s found, a
bl ock of statements associ ated wi th that case i s executed.
20. What are the program l oops avai l abl e i n C?
The whi l e statement, the do statement and the for statement.
21. Gi ve the format of program l oops i n C.
(a) Whi l e (test condi ti on) (b) do
{ {
body of the l oop body of the l oop
} } whi l e (test condi ti on);
(c) for (i ni ti al i zati on; test condi ti on; i ncrement/decrement)
{
body of the l oop
}
22. What i s the addi ti onal feature i n for l oop?
More than one vari abl e can be i ni ti al i zed at a ti me i n the for statement.
23. What i s an array? What are i ts types?
An array i s a group of rel ated data i tems that share a common name. A l i st of i tems can
gi ve one vari abl e name usi ng onl y one subscri pt and such a vari abl e i s cal l ed a si ngl e-
subscri pted vari abl e or a one-di mensi onal array.
Two-di mensi onal arrays are decl ared as fol l ows:
Type array-name [row-si ze][col umn-si ze];
Mul ti -di mensi onal arrays are decl ared as fol l ows:
Type array-name [p1][p2][p3]..[px];
C Programming 3
24. What i s a string?
A stri ng i s an array of characters. Any group of characters defi ned between doubl e quotati on
marks i s a constant stri ng.
25. Li st the stri ng-handl i ng functi on supported by C l i brary.
(a) Strcat() i s used to concatenate two stri ngs.
(b) Strcmp() i s used to compare two stri ngs.
(c) Strcpy() i s used to copy one stri ng over another.
(d) Strl en() i s used to fi nd the l ength of a stri ng.
26. How are C functi ons cl assi fi ed? Gi ve exampl es.
C functi ons can be cl assi fi ed as l i brary functi on and user-defi ned functi on. mai n() i s an
exampl e of user-defi ned functi on and pri ntf, scanf bel ong to the l i brary functi ons.
27. Li st the vari ous categori es of C functi ons.
(a) Functi ons wi th no arguments and no return val ues
(b) Functi ons wi th arguments and return val ues
(c) Functi ons wi th arguments and no return val ues
28. What i s recursion?
Recursi on i s a speci al case where a functi on cal l s i tsel f.
29. How can a functi on return val ues?
A functi on may or may not return a val ue. I f i t does, i t can return onl y one val ue.
30. What i s structure i n C?
C supports a constructed data type known as structure, whi ch i s a method for packi ng
data of di fferent types.
31. What i s static structure i n C?
A structure must be decl ared as stati c i f i t i s to be i ni ti al i zed i nsi de a functi on.
32. What i s union i n C?
Uni ons are a concept borrowed from structures and therefore fol l ow the same syntax as
structures. I n structure each member has i ts own storage l ocati on, whereas al l the
members of a uni on use the same l ocati on.
33. What i s a bi t fi el d?
A bi t fi el d i s a set of adjacent bi ts whose si ze can be from 1 to 16 bi ts i n l ength.
34. What i s a file? Li st the basi c fi l e operati ons.
A fi l e i s a pl ace on the di sk where a group of rel ated data i s stored. The basi c fi l e operati ons
are nami ng a fi l e, openi ng a fi l e, readi ng data from a fi l e, wri ti ng data to a fi l e and cl osi ng
a fi l e.
35. What are the vari ous hi gh l evel I /O functi ons?
fopen(), fcl ose(), getc(), putc(), fpri ntf(), fscanf(), getw(), putw(), fseek(), ftel l () and rewi nd().
4 Placement Preparation
36. What i s a command l i ne argument?
I t i s a parameter suppl i ed to a program when the program i s i nvoked.
37. What are argc and argv?
The vari abl e argc i s an argument counter that counts the number of arguments on the
command l i ne. The vari abl e argv i s an argument vector and represents an array of character
poi nters that poi nts to the command l i ne arguments. The si ze of thi s array wi l l be equal
to the val ue of argc.
38. What i s dynamic memory allocation?
The process of al l ocati ng memory at run ti me i s cal l ed dynamic memory allocation.
39. Name the vari ous memory al l ocati on functi ons.
mal l oc(), cal l oc(), free() and real l oc()
40. What i s C preprocessor?
C preprocessor i s a program that processes the source code before i t passes through
the compi l er. I t operates under the control of what i s known as preprocessor command
l i nes or di recti ves. I t i s pl aced i n the source program before the mai n() l i ne.
41. How are the di recti ves cl assi fi ed?
Macro substi tuti on di recti ves, fi l e i ncl usi on di recti ves and compi l er control di recti ves.
42. What i s macro substi tuti on?
I t i s a process where an i denti fi er i n a program i s repl aced by a predefi ned stri ng composed
of one or more tokens
43. Li st the vari ous preprocessor di recti ves.
#defi ne, #undef, #i ncl ude, #i fdef, #end i f, #i fndef, #i f and #el se.
44. Li st the vari ous forms of macro substi tuti on.
Si mpl e macro substi tuti on, argumented macro substi tuti on and nested macro substi tuti on.
45. What i s a pointer?
Si nce memory addresses are si mpl y numbers they can be assi gned to some vari abl es
whi ch can be stored i n memory, l i ke any other vari abl e. Such vari abl es that hol d memory
addresses are cal l ed pointers.
46. How do we decl are a poi nter vari abl e?
Data type * poi nter-name;
47. What i s a null pointer?
A nul l poi nter i s any poi nter assi gned the i ntegral val ue zero. A poi nter that i s guaranteed
not to poi nt to a val i d object i s cal l ed a nul l poi nter.
48. What i s meant by a pointer to a pointer?
A poi nter to a poi nter i s a construct used frequentl y i n sophi sti cated programs. To decl are
a poi nter to a poi nter, precede the vari abl e name wi th two successi ve asteri sks. Exampl e:
i nt **q; Thi s decl ares q to be a poi nter to a poi nter to an i nt.
C Programming 5
49. What i s the di fference between #include <filename> and #include filename?
I f the fi l ename i s surrounded by angl e brackets, the preprocessor l ooks i n a speci al pl ace
desi gnated by the operati ng system. I f the fi l e i s surrounded by doubl e quotes, the
preprocessor l ooks i n the di rectory contai ni ng the source fi l e.
50. What i s typedef ?
C l anguage al l ows us to create our own names for data types wi th the typedef keyword.
They are especi al l y useful for abstracti ng gl obal types that can be used throughout a
program.
51. What are break and continue statements?
Break prevents program fl ow from fal l i ng through to the next statement. I t shoul d be
used wi th cauti on si nce i t forces program control to jump di sconti nuousl y to a new pl ace.
Conti nue statement provi des a means for returni ng to the top of a l oop earl i er than
normal . I t i s parti cul arl y useful when we want to bypass the remai nder of the l oop for
some reason.
52. What i s an infinite loop?
An i nfi ni te l oop i s a l oop that does not contai n a termi nati ng condi ti on or a l oop i n whi ch
the termi nati ng condi ti on i s never reached.
53. What i s bit-manipulating operator?
The bi t-mani pul ati on operati ons enabl e us to access speci fi c bi ts wi thi n an object and to
compare the bi t sequences of pai rs of objects. The operands for al l the bi t-mani pul ati on
operators must be i ntegers.
54. What are shift operators?
The two shi ft operators, << and >>, enabl e us to shi ft the bi ts of an object a speci fi ed
number of pl aces to the l eft or the ri ght.
55. What i s masking?
The bi t-mani pul ati on operators are frequentl y used to i mpl ement a programmi ng techni que
cal l ed maski ng whi ch al l ows us to access a speci fi c bi t or a group of bi ts.
56. What i s cast operator?
I f enabl es us to convert a val ue to a di fferent type.
57. What i s meant by scope of a vari abl e?
The scope of a vari abl e determi nes the regi on over whi ch we can access the vari abl e by
name. There are four types of scope: program, fi l e, functi on and bl ock.
58. What are nested structures?
When one of the fi el ds of a structure i s i tsel f a structure, i t i s cal l ed a nested structure.
Nested structures are common i n C programmi ng because they enabl e us to create data
hi erarchi es.
59. What i s function allusion?
A functi on al l usi on i s a decl arati on of a functi on that i s defi ned el sewhere, usual l y i n a
di fferent source fi l e. The mai n purpose of the functi on al l usi on i s to tel l the compi l er
what type of val ue the functi on returns.
6 Placement Preparation
60. Why are poi nters to functi ons consi dered i mportant?
Poi nters to functi ons are a powerful tool because they provi de an el egant way to cal l
di fferent functi ons based on the i nput data.
61. What i s a stream?
A stream consi sts of an ordered seri es of bytes. I /O i s performed through streams that
are associ ated wi th the fi l es or devi ces.
62. Li st the standard streams i n C.
stdi n, stdout and stderr.
63. What does <stdi o.h> contai n?
(a) Prototype decl arati ons for al l the I /O functi ons.
(b) Decl arati on of the FI LE structure.
(c) Several macro constants.
64. What i s errno vari abl e?
There i s a gl obal vari abl e cal l ed errno that i s used by a few of the I /O functi ons to record
errors. errno i s an i nteger vari abl e decl ared i n the errno.h header fi l e.
65. What i s the di fference between a definition and the declaration of a vari abl e?
Defi ni ti on i s the pl ace where the vari abl e i s created or assi gned storage whereas decl arati on
refers to pl aces where the nature of the vari abl e i s stated but no storage i s al l ocated.
66. Can we use a switch statement to swi tch on stri ngs?
No. The cases i n a switch must ei ther have i nteger constants or constant expressi ons.
67. I s i t necessary that the header fi l es shoul d have an .h extension?
No. Tradi ti onal l y, they have been gi ven an .h extensi on to i denti fy them as somethi ng
di fferent from the .c program fi l es.
68. Are the expressi ons *pointer++ and ++*pointer the same?
No. *poi nter++ i ncrements the poi nter and not the val ue poi nted by i t, whereas the
++*poi nter i ncrements the val ue bei ng poi nted to by the poi nter.
69. Gi ve the equi val ent poi nter expressi on for x[a][b][c][d].
*(*(*(*(x+a)+b)+c)+d)
70. Where do we use poi nters?
Some of the i mportant areas are: (a) Dynami c memory al l ocati on (b) cal l by reference
(c) trees, graphs and so on.
71. How many bytes are occupi ed by near, far and huge poi nters?
A near poi nter i s 2 bytes l ong and a far poi nter and a huge poi nter are 4 bytes l ong.
72. What i s the si mi l ari ty between a structure, uni on and an enumerati on?
Al l of them l et you defi ne new data types.
C Programming 7
73. How woul d you check whether the contents of two structure vari abl es are the same?
I f we need to compare two structures, we wi l l have to wri te our own functi on to do so
whi ch carri es out the compari son fi el d by fi el d.
74. What i s the di fference between a structure and a uni on?
A uni on i s essenti al l y a structure i n whi ch al l of the fi el ds overl ay each other. We can use
onl y one fi el d at a ti me. We can al so wri te to one fi el d and read from another.
75. What i s the use of bi t fi el ds i n a structure decl arati on?
Bit fields are used to save space in structures having several binary flags or other small fields.
PREDICT THE OUTPUT OR ERROR FOR THE FOLLOWING
QUESTION NUMBER 76 TO 108
Note : I t i s assumed that necessary header fi l es are i ncl uded and compi l ed usi ng the turbo
C/C++ compi l er.
76. #defi ne N 100
#defi ne A 2
mai n()
{
i nt a; a=A;
whi l e(a<N)
{ pri ntf(%d\n,a);
a*=a;
}
}
OUTPUT: ___________
77. mai n()
{
i nt m=12345;
l ong n=987654;
pri ntf(%d\n,m);
pri ntf(%10d\n,m);
pri ntf(%010d\n,m);
pri ntf(%-10d\n,m);
pri ntf(%10l d\n,n);
pri ntf(%10l d\n,-n);
}
OUTPUT: ___________
78. mai n()
{
extern i nt k;
k=40;
pri ntf(%d,si zeof(k));
}
OUTPUT: ___________
8 Placement Preparation
79. mai n()
{i nt b[5]={2,3};
pri ntf (\n%d%d%d,b[2]b[3]b[4]);
}
OUTPUT: ___________
80. mai n()
{
char *str1=xyzq;
char strz[]=xyzq;
pri ntf(%d%d%d,si zeof(str1),si zeof(str2),si zeof(xyzq));
}
OUTPUT: ___________
81. mai n()
{
char *cptr,c;
voi d *vptr,v;
c=20;v=0;
cptr=&c;vptr=&v;
pri ntf(%c%v,c,v);
}
OUTPUT: ___________
82. voi d mai n()
{stati c i nt i =5;
if(--i)
{
mai n();
pri ntf(%d,i );
}
}
OUTPUT: ___________
83. mai n()
{ stati c i nt b[20];
i nt j=0;
b[j]=j++;
pri ntf(\n%d%d%d,b[0],b[1],j);
}
OUTPUT: ___________
84. mai n()
{
i nt x=3;
x=x++;
pri ntf(%d,x);
}
OUTPUT: ___________
C Programming 9
85. mai n()
{ i nt x=2;
pri ntf(\n%d%d,++x,++x);
}
OUTPUT: ___________
86. mai n()
{ i nt i =-3,j=2,k=0,m;
m=++i &&++j| | ++k;
pri ntf(\n%d%d%d%d,i ,j,k,m);
}
OUTPUT: ___________
87. mai n()
{ i nt a=-5, b=-2;
junk(a,&b);
pri ntf(\na=%d b=%d,a,b);
}
junk(i nt a,i nt *b)
{
a=a*a;
*b=*b**b;
}
OUTPUT: ___________
88. mai n()
{ i nt x[]={10,20,30,40,50};
i nt k;
for(k=0;k<5;k++)
{
pri ntf(\n%d,*x);
x++;
}
}
OUTPUT: ___________
89. mai n()
{
i nt n[25];
n[0]=100;n[24]=200;
pri ntf(\n%d%d,*n,*(n+24)+*(n+0));
}
OUTPUT: ___________
90. f(i nt x, i nt y)
{ i nt x;
x=40;
return x;
}
OUTPUT: ___________
10 Placement Preparation
91. #defi ne ASK prog
mai n()
{
printf(ASK);
}
OUTPUT : ___________
92. #defi ne MAX(x,y) (x>y? x:y)
mai n()
{
i nt a;
a=max(3+2,2+7);
pri ntf(%d,a);
}
OUTPUT : ___________
93. i nt abc(i nt I )
{
return (I ++);
}
mai n()
{ i nt I =abc(10);
pri ntf(%d\n,--I );
}
OUTPUT: ___________
94. mai n()
{ i nt a[10];
pri ntf(%d,*a+1-*a+3);
}
OUTPUT: ___________
95. mai n()
{ i f(strcmp(ask,ask\0))
pri ntf(stri ngs are not equal \n);
el se
pri ntf(stri ngs are equal \n);
}
OUTPUT: ___________
96. mai n()
{
i nt arr[]={0,1,2,3,4);
i nt *ptr;
for (ptr=arr+4;ptr>=arr;ptr--)
pri ntf(%d,*ptr);
}
OUTPUT: ___________
C Programming 11
97. mai n()
{ char s[]=abcdefghi j!;
pri ntf(\n%d,*(s+strl en(s));
}
OUTPUT: ___________
98. mai n()
{ char str[]=abcdefghi ;
char *s;
s=&str[6]-6;
whi l e(*s)
pri ntf(%c,*s++);
}
OUTPUT: ___________
99. #i ncl ude al l oc.h
mai n()
{
struct node {
i nt data;
struct node *l i nk;
};
struct node *p,*q;
p=mal l oc(si zeof(struct node));
q=mal l oc(si zeof(struct node));
pri ntf(\n%d%d,si zeof(p),si zeof(q));
}
OUTPUT: ___________
100. voi d mai n()
{ i nt i =10,j=2;
i nt *i p=&i ,*jp=&j;
i nt k=*i p/*jp;
pri ntf(%d,k);
}
OUTPUT: ___________
101. struct a
{ i nt y;
struct a x;
}
OUTPUT: ___________
102. mai n()
{ i nt I =300;
char *ptr=&I ;
*++ptr=2;
pri ntf(%d,I );
}
OUTPUT: ___________
12 Placement Preparation
103. mai n()
{
char *p;
p=%d\n;
p++;p++;
printf(p-2,300);
}
OUTPUT: ___________
104. mai n()
{
char s[ ] =C i s a phi l osophy of l i fe;
char t[40];
char *ss, *tt;
ss=s;
tt=t;
whi l e(*ss)
*tt++=*ss++;
*tt=\o;
pri ntf(\n%s,t);
}
OUTPUT: ___________
105. mai n()
{ i nt arr[12];
pri ntf(\n%d,si zeof(arr));
}
OUTPUT: ___________
106. mai n()
{ i nt I =3;
pri ntf(\naddress of I =%u,&I );
pri ntf(\nval ueof I =%u,I );
}
OUTPUT: ___________
107. mai n()
{ i nt I =3;
pri ntf(\nAddress of I =%u,&I );
pri ntf(\nval ue of I =%d,I );
pri ntf(\nval ue of I =%d,*(&I ));
}
OUTPUT: ___________
108. How woul d you decl are the fol l owi ng?
(i) An Array of three poi nters to chars
(ii) An Array of three char poi nters
C Programming 13
ANSWERS FOR QUESTIONS 76 TO 108
76. OUTPUT
2
4
16
77. OUTPUT
12345
12345
0000012345
12345
987654
-987654
78. OUTPUT
ERROR i n the program as the extern i nt k i s a decl arati on and not a defi ni ti on.
79. OUTPUT
0 0 0
80. OUTPUT
2 5 5
81. OUTPUT
Compi l ati on Error, si nce si ze of V i s not known.
82. OUTPUT
0 0 0 0
83. OUTPUT
0 0 1
84. OUTPUT
4
85. OUTPUT
No error. The output wi l l vary from one compi l er to another.
86. OUTPUT
2 3 0 1
87. OUTPUT
a= -5 b= 4
88. OUTPUT
Error message
14 Placement Preparation
89. OUTPUT
100 300
90. OUTPUT
Error, re-decl arati on of x;
91. OUTPUT
ASK
92. OUTPUT
9
93. OUTPUT
9
94. OUTPUT
4
95. OUTPUT
Stri ngs are equal
96. OUTPUT
4 3 2 1 0
97. OUTPUT
0
98. OUTPUT
abcdefghi
99. OUTPUT
2 2
100. OUTPUT
Compi l ati on error
101. OUTPUT
Error, I mproper usage of structure
102. OUTPUT
556
103. OUTPUT
300
104. OUTPUT
C i s a phi l osophy of l i fe.
C Programming 15
105. OUTPUT
24
106. OUTPUT
Address of i = 6485
Val ue of i = 3
107. OUTPUT
Address of i = 6485
Val ue of i = 3
Val ue of i = 3
108. OUTPUT
(i) Char *ptr[3];
(ii) Char *ptr[3];

16 Placement Preparation
1. Compare C and C++ programming.
C++ i s a superset of C. I t adds to the C l anguage the capabi l i ty to i mpl ement OOP (object
ori ented programmi ng). C i s a procedural l anguage and C++ i s an object-ori ented l anguage.
2. What are the two major components of an object?
Data and the functi ons that act on that data.
3. What i s a member functi on i n C++?
A functi on contai ned wi thi n a cl ass i s cal l ed a member functi on.
4. What i s Data hiding?
Protecti ng data from access by unauthori zed functi on i s cal l ed data hi di ng.
5. What are the OOPS concepts?
Encapsul ati on, I nheri tance and Pol ymorphi sm.
6. What i s Polymorphism?
The abi l i ty of a functi on or operator to act i n di fferent ways on di fferent data types i s
cal l ed pol ymorphi sm.
7. Name the header fi l e that enabl es the user to use cout and ci n i n C++?
I OSTREAM.H
8. Whi ch operator i s rel ated to concatenati on of two stri ngs?
ari thmeti c operator (+)
9. I f we use the smal l memory model , what l i brary fi l e must be l i nked to our program to
provi de standard l i brary functi ons?
CS.LI B
10. What i s Encapsulation?
I t i s the mechani sm that bi nds together the code and the data i t mani pul ates, and keeps
both safe from outsi de i nterference and mi suse.
11. What i s Inheritance?
I t i s a process of creati ng new cl asses cal l ed deri ved cl asses from exi sti ng or base cl asses.
12. How does C++ i mpl ement Pol ymorphi sm?
Usi ng (a) Functi on overl oadi ng (b) Operator overl oadi ng (c) Vi rtual functi ons.
13. Di sti ngui sh between Object-ori ented l anguage and Object-based l anguage.
Object-based l anguages support onl y objects and cl asses, whereas Object-ori ented l anguages
al so support features l i ke i nheri tance and pol ymorphi sm. Vi sual Basi c i s an Object-based
l anguage Whereas Vi sual C++ i s an Object-ori ented l anguage.
2
C++ Programming
C++Programming 17
14. Arrange i n order of preference (hi ghest fi rst) the fol l owi ng ki nds of operators: l ogi cal ,
unary, ari thmeti c, assi gnment, rel ati onal , condi ti onal .
(1) Unary (2) Ari thmeti c (3) Rel ati onal (4) Logi cal (5) Condi ti onal (6) Assi gnment
15. What i s a structure variable?
When accessi ng a structure member, the i denti fi er to the l eft of the dot operator i s cal l ed
a structure vari abl e.
16. What i s the purpose of the enumerated data type?
I t bri ngs together a group of i ntegers wi th user-defi ned names and constant val ues.
17. What i s a function argument?
I t i s a val ue sent to the functi on by the cal l i ng program.
18. How many val ues can be returned by a functi on?
One.
19. What i s the scope of gl obal vari abl es wi th respect to functi ons?
Gl obal vari abl es can be accessed from any functi on.
20. What functi ons can access an automati c vari abl e?
The functi ons i n whi ch an automati c vari abl e i s defi ned.
21. What i s the purpose of a static automatic variable?
I t makes a vari abl e vi si bl e to onl y one functi on and retai ns a val ue when a functi on i s not
executi ng.
22. What i s the si gni fi cance for passi ng arguments by reference?
To change the ori gi nal argument.
23. What i s the purpose of a cl ass speci fi er (decl arati on)?
A cl ass speci fi er descri bes how objects of a cl ass wi l l l ook when they are created.
24. What are a class and an object?
A cl ass i s a speci fi cati on for a number of objects. Objects consi st of both data and functi ons
that operate on those data.
25. What i s a Constructor?
I t i s a member functi on wi th the same name as i ts cl ass, whi ch i s executed every ti me an
object of the cl ass i s created.
26. What i s a Destructor?
I t i s a member functi on wi th the same name as i ts cl ass but preceded by a ti l de (~)
symbol . I t i s cal l ed when an object i s destroyed.
27. Compare Constructor and Destructor in C++.
A constructor has no return type but can take arguments. Constructors can be overl oaded.
A destructor takes no arguments and has no return val ue.
18 Placement Preparation
28. I f three objects of a cl ass are defi ned, how many copi es of the cl asss data i tems are
stored i n memory? How many copi es of member functi on?
Three, One.
29. What i s the di fference between structures and classes in C++?
Member functi ons and data are, by defaul t, publ i c i n structure but pri vate i n cl asses.
30. What i s function overloading?
Defi ni ng mul ti pl e functi ons wi th the same name i s cal l ed functi on overl oadi ng. These
functi ons must di ffer i n thei r number, order or types of arguments.
31. What are Library functions?
Li brary functi ons are a col l ecti on of predefi ned functi ons. They are stored i n .l i b fi l es
that are shi pped wi th the compi l er.
32. Li st the vari ous ways of passi ng vari abl es to a functi on.
(a) Cal l by val ue (b) Cal l by reference
33. What i s an Inline function?
The functi on whose code gets i nserted, i nstead of a jump to the functi on, at the pl ace
where there i s a functi on cal l i s known as an I nl i ne functi on.
34. What i s operator overloading?
I t gi ves the capabi l i ty to the operator to work on di fferent types of operands.
35. Li st the access speci fi ers i n C++.
There are three access speci fi ers i n C++ namel y Publ i c, Pri vate and Protected.
36. What are Public, Private and Protected?
Publ i c data members or member functi ons can be accessed from anywhere, wi thi n the
cl ass or from outsi de the cl ass. Pri vate data members cannot be accessed from outsi de
the cl ass. They can onl y be accessed wi thi n the cl ass. The protected members of the base
cl ass are accessi bl e onl y to the deri ved cl asses.
37. Compare the fol l owi ng two statements:
exampl e ex( ); exampl e el (10,200);
The fi rst statement i s creati ng an object ex usi ng a zero-argument constructor. I t can
al so be i nterpreted as a prototype of functi on ex( ) whose return type i s exampl e. The
second statement i s creati ng an object usi ng a two-argument constructor.
38. What i s a dangling pointer?
Suppose we al l ocate a chunk of memory and store i ts address i n a poi nter. I f thi s chunk
of memory i s freed and i f the poi nter conti nues to poi nt to that l ocati on, the poi nter i s
sai d to be a dangling pointer.
39. How do we create a this poi nter?
The thi s poi nter gets created when a member functi on (non-stati c) of a cl ass i s cal l ed.
40. What i s the outcome when we cal l the constructor expl i ci tl y?
Whenever the constructor i s cal l ed expl i ci tl y a namel ess object gets created.
C++Programming 19
41. How do we create an object dynami cal l y?
The keyword new al l ows us to create an object dynami cal l y.
42. Can constructors return a val ue? How does i t handl e error val ues?
An error val ue can never be returned from a constructor. An excepti on al one can be thrown
from wi thi n the constructor. Constructor i s cal l ed whenever an object gets created. There
can be no si tuati on where we want to return a val ue at the ti me of creati on of an object.
43. How do we overload constructors and destructors?
Destructors cannot be overl oaded. Constructors can be overl oaded, as i t i s l i ke other
member functi ons of the cl ass. But i t wi l l not return any val ue.
44. Show the usage of a scope resolution operator.
Voi d l ength :: addl ength (l ength L1, l ength L2)
1 2 3 4 5 6
1- Return type 2- Name of cl ass of whi ch functi on i s a member
3- Scope resol uti on operator 4- Functi on name 5,6 Functi on arguments
45. Name some operators whi ch cannot be overl oaded?
(a) Member access or dot operator (.) (b) Scope resol uti on operator (::)
(c) Condi ti onal operator (?:) (d) Poi nter-to-member operator (.*)
46. What i s the purpose of operator overloading?
I t makes C++ operators work wi th objects and gi ves new meani ngs to exi sti ng C++
operators.
47. What wi l l happen when you overl oad an ari thmeti c assi gnment operator?
I t goes i n the object to the l eft of the operator.
48. What i s multiple inheritance?
A cl ass that can be deri ved from more than one base cl ass i s cal l ed a mul ti pl e i nheri tance.
49. What i s the si gni fi cance of usi ng I nheri tance?
I nheri tance permi ts the reusabi l i ty of software; deri ved cl asses can extend the capabi l i ti es
of base cl asses wi th no need to modi fy or even access the source code of the base cl ass.
50. How wi l l you sort many l arge objects or structures?
Pl ace poi nters to them i n an array and sort the array.
51. What i s an Abstract class?
I t i s often defi ned as one that wi l l not be used to create any objects, but exi sts onl y to act
as a base cl ass of other cl asses.
52. What i s a friend function?
A fri end can access a cl ass pri vate data, even though i t i s not a member functi on of the cl ass.
53. What i s a static function?
A stati c functi on i s one that operates on the cl ass i n general rather than on objects of the
cl ass. I t can operate on stati c vari abl es.
20 Placement Preparation
54. Why i s assi gnment operator overl oaded?
Thi s i s necessary when i t must do more than merel y copi ng one objects contents i nto another.
55. What i s a pure virtual function?
I t i s a vi rtual functi on that has no body and i s used i n a base cl ass.
56. Wri te a statement that a member functi on can use to return the enti re object of whi ch i t
i s a member, wi thout creati ng any temporary objects.
return *thi s;
57. Compare the operati ons of the assi gnment operator and that of the copy constructor.
They are si mi l ar, except that the copy constructor creates a new object. They are di fferent
except that they both create a new object.
58. Does the expressi on del ete P del ete the poi nter or the object bei ng poi nted to by P?
The expressi on del ete P del etes the object bei ng poi nted to by P.
59. I s i t necessary to accept a reference i n the copy constructor?
I t i s essenti al , because i f i n the copy constructor an object i s accepted by val ue then the
copy constructor wi l l fal l i n a recursi ve l oop.
60. Gi ve an exampl e of pure vi rtual functi on?
A Pure vi rtual functi on i s a vi rtual functi on wi th the expressi on = 0 added to the decl arati on.
Exampl e : Cl ass exampl e
{ Publ i c :
vi rtual voi d ex ( ) = 0;
};
The functi on ex ( ) i s known as a pure vi rtual functi on.
61. Compare static binding and dynamic binding.
When a functi on cal l gets resol ved at compi l e-ti me i t i s cal l ed stati c bi ndi ng or earl y
bi ndi ng. When the cal l gets resol ved at runti me i t i s cal l ed dynami c bi ndi ng or l ate bi ndi ng.
62. What i s a stream?
I t i s used to represent the fl ow of data. For di fferent ki nds of data, di fferent streams are
used.
63. Name the three parts of an iostream system.
A buffer, a speci fi cati on system and a transl ati on system.
64. Compare manipulator and setf( ) functi on.
The I /O speci fi cati on cl ass (i os) i s at the root of the i ostream cl ass hi erarchy. Mani pul ators
are the i nstructi ons to the output stream to modi fy the output i n vari ous ways. The setf( )
functi on i s used to set the fl ags of the i os but mani pul ators di rectl y i nsert the formatti ng
i nstructi ons i nto the stream.
65. Li st the three stream cl asses that are commonl y used for di sk I /O.
i fstream, ofstream and fstream. They are used for i nput from fi l e, output to fi l e and both
i nput & output respecti vel y. These cl asses are decl ared i n fstream.h
C++Programming 21
66. Compare iterator and iteration.
An i terator i s an object that moves through the contai ner accessi ng each el ement i n the
contai ner. The process of movi ng from el ement to el ement i n the contai ner i s cal l ed
i terati on.
67. What i s friend class?
I t i s a cl ass where al l the member functi ons and data members of the cl ass become
fri ends.
68. How do we get the i nformati on about the object at runti me?
Usi ng typei d( ) operator and dynami c_cast operator.
69. What i s the base cl ass for most stream cl asses?
i os.
70. Defi ne what current posi ti on means when appl i ed to fi l es.
The byte l ocati on at whi ch the next read or wri te operati on wi l l take pl ace.
71. What i s class library?
A group of rel ated cl asses, suppl i ed as a separate product, i s often cal l ed a cl ass l i brary.
72. What are templates?
By usi ng templ ates, we can desi gn a si ngl e cl ass/functi on that operates on many data
types, i nstead of havi ng to create a separate cl ass/functi on for each type. When used wi th
functi ons they are known as functi on templ ates, whereas when used wi th cl asses they
are cal l ed cl ass templ ates.
73. How do we return an error val ue from the constructor?
We cannot return any error val ue from the constructor, as the constructor doesnt have
any return type. However, by throwi ng an excepti on we can pass val ue to catch bl ock.
74. When i s a class template instantiated?
A class template i s i nstanti ated by defi ni ng an object usi ng the templ ate arguments.
75. What i s the si ze of an object of an empty cl ass?
One byte.
PREDICT THE OUTPUT/ERRORS FOR THE FOLLOWING
QUESTION NUMBER : 76 TO 90
76. mai n()
{
char str[ ] = abcdef
xyz;
cout<<str;
}
OUTPUT: __________
22 Placement Preparation
77. voi d mai n()
{
i nt j;
for ( j=0;j<11;++j)
cout<<j*j<< ;
}
OUTPUT: __________
78. voi d mai n()
{
for (i nt j=0;j<80;j++)
char ch=(j%8) ? : x;
cout<<ch;
}
}
OUTPUT: __________
79. const i nt DAYS = 7;
const i nt MAX = 10;
voi d mai n()
{ char star [DAYS][MAX] = { sun,mon,tue,wed,thur,fri ,sat};
for (i nt j=0;j<DAYS;j++)
cout<<star[j]<<endl ;
}
OUTPUT: __________
80. const i nt si ze = 5;
voi d pri nt (i nt *ptr)
{
cout<<ptr[0];
}
voi d pri nt(i nt ptr[si ze])
{
cout<<ptr[0];
}
mai n()
{
i nt a[si ze]= { 1,2,,3,4,5};
i nt *b=new i nt(si ze);
pri nt(a);
pri nt(b);
}
OUTPUT: __________
81. mai n()
{
i nt a,*pa,&ra;
C++Programming 23
pa=&a; ra=a;
cout<<a=<<a<<*pa=<<*pa<<ra=<<ra;
}
OUTPUT: __________
82. voi d mai n()
{
for(i nt I =1;I <=10;I ++)
cout<<I <<endl ;
cout<<I ;
}
OUTPUT: __________
83. voi d mai n()
{ char *x=hai ;
char *y=x;
cout<<x<<endl <<y;
y=exampl e;
cout<<endl <<x<<endl <<y;
}
OUTPUT: __________
84. voi d mai n()
{ i nt a=5;i nt &j=a; i nt x=10;
j=x;
cout<<endl <<a<<endl <<j;
x=20;
cout<<endl <<a<<endl <<j;
}
OUTPUT: __________
85. const i nt x=12;
voi d mai n()
{ const i nt *exampl e();
i nt *y;
y=exampl e();
}
const i nt *exampl e()
{ return (&x);
}
OUTPUT: __________
86. voi d eg(i nt x, i nt y);
voi d mai n()
{ eg();
}
voi d eg(i nt x=0,i nt y=0)
{ cout<<x<<endl <<y;
}
OUTPUT: __________
24 Placement Preparation
87. cl ass control
{ publ i c:
control ()
{ cal cul ate();
cout<<endl <<abcd;
}
voi d cal cul ate()
{ display();
cout<<endl <<xyz;
}
voi d di spl ay()
{ cout<<endl <<pqr;
}
};
voi d mai n()
{
control c1;
}
OUTPUT: __________
88. cl ass a
{ i nt j;
}
mai n()
{
//statements
}
OUTPUT: __________
89. voi d mai n()
{ char str[]=exampl e;
char *p=exami nati on;
cout<<endl <<str;
cout<<endl <<p;
cout<<endl <<(voi d *)str;
cout<<endl <<(voi d *) p;
}
OUTPUT: __________
90. cl ass sampl e
{ publ i c:
sampl e()
{ }
sampl e (sampl e &s)
{ cout<<copy constructor<<endl ;
}
sampl e fun(sampl e s)
{
C++Programming 25
sampl e t;
t=s;
return t;
}
};
voi d mai n()
{
sampl e s1,s2,s3;
s3=s1.fun(s2);
}
OUTPUT: __________
ANSWERS FOR QUESTIONS 76 TO 90
76. OUTPUT:
abcdefxyz
77. OUTPUT:
0 1 4 9 16 25 36 49 64 81 100
78. OUTPUT:
x x x x x x x x x
79. OUTPUT:
Sun
Mon
Tue
Wed
Thurs
Fri
Sat
80. OUTPUT:
Compi l ati on Error: functi on voi d pri nt (i nt *) al ready has a body.
81. OUTPUT:
Compi l er Error: ra, reference must be i ni ti al i zed.
82. Output
Di spl ays 1 to 11 each i n a new l i ne.
83. OUTPUT:
hai
hai
hai
exampl e
26 Placement Preparation
84. OUTPUT:
10
10
10
10
85. OUTPUT:
Compi l ati on error due to type mi smatch.
86. OUTPUT:
Error
87. OUTPUT:
pqr
xyz
abcd
88. OUTPUT:
No error cl ass a i s consi dered as return type of mai n().
89. OUTPUT:
exampl e
exami nati on
0x8fa20fea
0x8f55oo11
90. OUTPUT:
Copy constructor
Copy constructor

Software Engineering 27
1. What i s Software Engineering?
Software engi neeri ng i s a di sci pl i ne that i ntegrates process, methods and tool s for the
devel opment of computer software.
2. What are the l ayers i n software engi neeri ng?
Tool s, Methods, Process and Qual i ty focus.
3. What i s KPA i n software engi neeri ng?
The foundati on for software engi neeri ng i s the process l ayer. Process defi nes a framework
for a set of key process areas (KPA) that must be establ i shed for effecti ve del i very of the
software engi neeri ng technol ogy.
4. Li st the umbrel l a acti vi ti es i n software engi neeri ng.
Software project tracki ng and control , formal techni cal revi ews, document preparati on
and producti on, reusabi l i ty management, measurement, ri sk management, software qual i ty
assurance and software confi gurati on management.
5. Li st the vari ous software engi neeri ng model s.
Li near sequenti al model , prototypi ng model , RAD (Rapi d Appl i cati on Devel opment) model ,
evol uti onar y softwar e pr ocess model s, component-based devel opment model , for mal
methods model .
6. What i s RAD?
I t i s an i ncremental software devel opment process model that emphasi zes an extremel y
short devel opment cycl e.
7. Li st the vari ous evol uti onary software process model s.
The i ncremental model , the spi ral model , the WI NWI N spi ral model , the concurrent
devel opment model .
8. What i s a spiral model?
Thi s model was proposed by Boehm. I t i s an evol uti onary software process model that
coupl es the i terati ve nature of prototypi ng wi th the control l ed and systemati c aspects of
the l i near sequenti al model .
9. What i s a task region?
A spi ral model i s di vi ded i nto a number of framework acti vi ti es cal l ed task regi ons.
10. What i s a WINWIN spiral model?
Thi s model defi nes a set of negoti ati on acti vi ti es at the begi nni ng of each pass around
the spi r al . The objecti ve of thi s acti vi ty i s to el i ci t pr oject r equi r ements fr om the
customer .
3
Software Engineering
28 Placement Preparation
11. What i s a CBD model?
The component based devel opment (CBD) model i ncorporates many of the characteri sti cs
of the spi ral model . I t i s evol uti onary i n nature, demandi ng an i terati ve approach to the
creati on of software.
12. What i s the formal method model?
I t encompasses a set of acti vi ti es that l ead to the formal mathemati cal speci fi cati on of
computer software. Formal methods enabl e a software engi neer to speci fy, devel op and
veri fy a computer-based system by appl yi ng a ri gorous, mathemati cal notati on.
13. What i s software project management?
I t i s an umbrel l a acti vi ty wi thi n software engi neeri ng. I t begi ns before any techni cal
acti vi ty i s i ni ti ated and conti nues throughout the defi ni ti on, devel opment and support of
computer software.
14. Name the factors i nfl uenci ng software project management.
Peopl e, Product and Process.
15. Defi ne the term software metri c.
I t refers to a broad range of measurements for computer software. Measurements can be
appl i ed to the software process wi th the i ntent of i mprovi ng i t on a conti nuous basi s.
Software metri cs are anal yzed and assessed by software managers. Measures are often
col l ected by software engi neers.
16. What i s PSP?
The Per sonal softwar e pr ocess (PSP) i s a str uctur ed set of pr ocess descr i pti ons,
measur ements, and methods that can hel p engi neer s to i mpr ove thei r per sonal
performance.
17. What i s SSPI?
SSPI (Stati sti cal Software Process I mprovement) uses software fai l ure anal ysi s to col l ect
i nformati on about al l errors and defects encountered as an appl i cati on, system or product
i s devel oped and used.
18. What i s the di fference between direct and indirect software measures?
Di rect measures of the software engi neeri ng process i ncl ude cost and effort appl i ed.
Di r ect measur es of the pr oduct i ncl ude l i nes of code (LOC) pr oduced, executi on
speed, memory si ze and defects reported over some set peri od of ti me. I ndi rect measures
of the pr oduct i ncl ude functi onal i ty, qual i ty, compl exi ty, effi ci ency, r el i abi l i ty and
mai ntai nabi l i ty.
19. What are the i ndi cators of software quality?
Correctness, mai ntai nabi l i ty, i ntegri ty and usabi l i ty of software are the i ndi cators of
software qual i ty.
20. How can the integrity of a system be defi ned?
I ntegri ty = summati on [(1-threat) x (1-securi ty)] where threat and securi ty are summed
over each type of attack.
Software Engineering 29
21. What i s DRE?
DRE (Defect Removal Efficiency) i s a measure of the fi l teri ng abi l i ty of qual i ty assurance
and control acti vi ti es as they are appl i ed throughout al l process framework acti vi ti es.
DRE = E/(E+D) where E i s the number of errors found before del i very of the software to
the end-user and D i s the number of defects found after del i very.
22. What i s software project planning?
The objecti ve of software project pl anni ng i s to provi de a framework that enabl es the
manager to make reasonabl e esti mates of resources, cost and schedul e.
23. What i s meant by software scope?
The fi rst acti vi ty i n software project pl anni ng i s the determi nati on of software scope. I t
descri bes the data and control to be processed, functi on, performance, constrai nts, i nterfaces
and rel i abi l i ty.
24. What are the resources i nfl uenci ng software project?
Peopl e, reusabl e software components, hardware/software tool s.
25. What i s the empirical estimation model?
An esti mati on model for computer software uses empi ri cal l y deri ved formul a to predi ct
effort as a functi on of LOC or FP. A typi cal esti mati on model i s deri ved usi ng regressi on
anal ysi s on data col l ected from past software projects.
26. What i s the COCOMO model?
The COCOMO (Constructi ve Cost Model ) i s a hi erarchy of esti mati on model s that address
the appl i cati on composi ti on model , the earl y desi gn stage model and the post-archi tecture
stage model . Three di fferent si zi ng opti ons avai l abl e here are object poi nts, functi on poi nts
and l i nes of source code.
27. What i s software equation?
I t i s a dynami c mul ti vari abl e model that assumes a speci fi c di stri buti on of effort over the
l i fe of a software devel opment project.
28. What i s meant by outsourcing?
I t i s a concept where the software engi neeri ng acti vi ti es are contracted to a thi rd party
who does the work at l ower cost and hopeful l y provi des hi gher qual i ty.
29. What are Risk Analysis and Management?
Ri sk anal ysi s and management are a seri es of steps that hel p a software team to understand
and manage uncertai nty. Everyone i nvol ved i n the software process parti ci pate i n ri sk
anal ysi s and management.
30. What types of risks are we l i kel y to encounter as the software i s bui l t?
Project ri sks, Techni cal ri sks, Busi ness ri sks.
31. What i s meant by Risk Identification?
Ri sk i denti fi cati on i s a systemati c attempt to speci fy threats to the project pl an. One
method for i denti fyi ng ri sks i s to create a ri sk i tem checkl i st.
30 Placement Preparation
32. What i s Risk Projection?
Ri sk projecti on, al so cal l ed ri sk esti mati on, attempts to rate each ri sk i n two ways: the
l i kel i hood or probabi l i ty that the ri sk i s real and the consequences of the probl ems
associ ated wi th the ri sk, shoul d i t occur.
33. What i s a Risk table?
A Ri sk tabl e provi des a project manager wi th a si mpl e techni que for ri sk projecti on.
34. What i s software safety and hazard analysis?
Software safety and hazard anal ysi s are software qual i ty assurance acti vi ti es that focus
on the i denti fi cati on and assessment of potenti al hazar ds that may affect softwar e
negati vel y and cause an enti re system to fai l .
35. What i s RMMM pl an?
The RMMM (Ri sk Mi ti gati on Moni tori ng and Management pl an) documents al l the work
performed as part of ri sk anal ysi s and i s used by the project manager as part of the
overal l project pl an.
36. What i s RIS?
Each ri sk i s documented i ndi vi dual l y usi ng a ri sk i nformati on sheet (RI S). I n most cases,
the RI S i s mai ntai ned usi ng a database system.
37. What i s software project scheduling?
I t i s an acti vi ty that di stri butes the esti mated effort across the pl anned project durati on
by al l ocati ng the efforts to speci fi c software engi neeri ng tasks.
38. Li st the number of basi c pri nci pl es that gui de software project schedul i ng.
Compar tmental i zati on, I nter dependency, ti me al l ocati on, effor t val i dati on, defi ned
responsi bi l i ti es, defi ned outcomes and defi ned mi l estones are the basi c pri nci pl es gui di ng
software project schedul i ng.
39. What are the two project schedul i ng methods that can be appl i ed to software devel opment?
(a) PERT (Program Eval uati on and Revi ew Techni que) (b) CPM (Cri ti cal Path Method)
40. What i s an earned value system?
A techni que for performi ng the quanti tati ve anal ysi s of progress does exi st. I t i s cal l ed
earned val ue anal ysi s (EVA). The earned val ue system provi des a common val ue scal e
for every software project task, regardl ess of the type of work bei ng performed. The total
hours to do the whol e project are esti mated, and every task i s gi ven an earned val ue
based on i ts esti mated percentage of the total .
41. What i s software configuration management?
SCM (Softwar e Confi gur ati on Management) i s an umbr el l a acti vi ty that i s appl i ed
throughout the software process. SCM i s devel oped to i denti fy change, to control change,
to ensure that change i s bei ng properl y i mpl emented and to report changes to others who
may be i nterested.
42. Why i s SCM so i mportant?
I t i s an i mportant el ement of software qual i ty assurance. I ts pri mary responsi bi l i ty i s the
control of change.
Software Engineering 31
43. What i s version control?
Versi on control combi nes procedures and tool s to manage di fferent versi ons of confi gurati on
objects that are created duri ng the software process.
44. What i s software configuration audit?
I t compl ements the for mal techni cal r evi ew by assessi ng a confi gur ati on object for
characteri sti cs that are general l y not consi dered duri ng revi ew.
45. What i s System engineering?
Software engi neeri ng occurs as a consequence of a process cal l ed system engineering.
I nstead of concentrati ng sol el y on software, system engi neeri ng focuses on a vari ety of
el ements, anal yzi ng, desi gni ng and organi zi ng those el ements i nto a system that can be a
product, a servi ce or a technol ogy for the transformati on of i nformati on or control .
46. What i s Business process engineering?
The system engi neeri ng process i s cal l ed busi ness process engi neeri ng when the context
of the engi neeri ng work focuses on a busi ness enterpri se.
47. What i s Product engineering?
When a product i s to be bui l t, the process i s cal l ed product engi neeri ng. Both busi ness
process engi neeri ng and product engi neeri ng attempt to bri ng order to the devel opment
of computer-based systems.
48. What i s Software requirements analysis?
I t i s a process of di scovery, refi nement, model i ng and speci fi cati on.
49. What i s Requirements analysis?
I t i s a software engi neeri ng task that bri dges the gap between system l evel requi rements
engi neeri ng and software desi gn.
50. What are the vari ous phases i n software requi rement anal ysi s?
(a) Probl em recogni ti on (b) Eval uati on & synthesi s (c) Model i ng (d) Speci fi cati on
(e) Revi ew
51. What i s FAST?
FAST (Faci l i tated Appl i cati on Speci fi cati on Techni que) encourages the creati on of a joi nt
team of customers and devel opers who work together to i denti fy the probl em, propose
el ements of the sol uti on, negoti ate di fferent approaches and speci fy a prel i mi nary set of
sol uti on requi rements.
52. What i s QFD?
QFD (Qual i ty Functi on Depl oyment) i s a qual i ty management techni que that transl ates
the needs of the customer i nto techni cal requi rements for software. QFD i denti fi es three
types of requi rements: (i) Normal requi rements (ii) Expected requi rements (iii) Exci ti ng
requi rements.
53. What types of model s do we create duri ng requi rements anal ysi s?
Functi onal model s and Behavi oral model s.
32 Placement Preparation
54. What i s Prototyping?
Prototypi ng offers an al ternati ve approach to the requi rements gatheri ng phase that resul ts
i n an executabl e model of the software from whi ch requi rements can be refi ned.
55. What are the pri mary objecti ves of an analysis model?
(a) To descri be what the customer requi res.
(b) To establ i sh a basi s for the creati on of a software desi gn.
(c) To defi ne a set of requi rements that can be val i dated once the software i s bui l t.
56. What are the elements of the anal ysi s model ?
(a) Enti ty rel ati onshi p di agram (b) Data fl ow di agram (c) State-transi ti on di agram and
(d) At the core of the model l i es the data di cti onary.
57. What i s Cardinality?
Cardi nal i ty i s the speci fi cati on of the number of occurrences of one [object] that can be
rel ated to the number of occurrences of another [object].
58. What i s Modality?
The modal i ty of a rel ati onshi p i s 0 i f there i s no expl i ci t need for the rel ati onshi p to occur
or the rel ati onshi p i s opti onal . The modal i ty i s 1 i f an occurrence of the rel ati onshi p i s
mandatory.
59. What are Control specification (CSPEC) and Process specification (PSPEC)?
CSPEC represents the behavi or of the system. PSPEC i s used to descri be al l fl ow model
processes that appear at the fi nal l evel of refi nement.
60. What i s Data dictionary?
I t i s an organi zed l i sti ng of al l data el ements that are perti nent to the system, wi th
preci se, ri gorous defi ni ti ons so that both user and system anal yst wi l l have a common
understandi ng of i nputs, outputs, components of stores and i ntermedi ate cal cul ati ons.
61. What are Cohesion and Coupling?
Cohesi on i s a qual i tati ve i ndi cati on of the degree to whi ch a modul e focuses on just one
thi ng. Coupl i ng i s a measure of the rel ati ve i nterdependence among modul es. Cohesi on i s
a measure of the rel ati ve functi onal strength of a modul e.
62. What i s Software architecture?
Software archi tecture provi des a hol i sti ng vi ew of the system to be bui l t. I t depi cts the
structure and organi zati on of software components, thei r properti es, and the connecti ons
between them.
63. What i s Architectural design?
I t represents the structure of data and program components that are requi red to bui l d a
computer-based system.
64. What i s User interface design?
I t creates an effecti ve communi cati on medi um between a human and a computer. User
i nter face desi gn begi ns wi th the i denti fi cati on of user , task and envi r onmental
requi rements.
Software Engineering 33
65. When wi l l Component-level design take pl ace?
Component-l evel desi gn, al so cal l ed procedural desi gn, occurs after data, archi tectural
and i nterface desi gns have been establ i shed.
66. How i s software reliability measured?
I t i s measured i n terms of mean ti me between fai l ures (MTBF).
67. Has the software crisis been overcome?
No, not yet. One of the mai n reasons for the software cri si s i s the l ack of thrust for
software testi ng. Test engi neers can contri bute si gni fi cantl y to the software qual i ty.
68. What i s CASE and who does i t?
CASE (Computer-Aided Software Engineering) tool s assi st software engi neeri ng
managers and practi ti oners i n every acti vi ty associ ated wi th the software process. Project
mangers and software engi neers use CASE.

34 Placement Preparation
4
Software Quality and
Software Testing
1. What i s SQA?
SQA (Software Quality Assurance) i s an umbrel l a acti vi ty that i s appl i ed throughout
the software process.
2. What are Quality of design and Quality of conformance?
Qual i ty of desi gn refers to the characteri sti cs that desi gners speci fy for an i tem. Qual i ty
of conformance i s the degree to whi ch the desi gn speci fi cati ons are fol l owed duri ng
manufacturi ng. The greater the degree of conformance, the hi gher the l evel of qual i ty of
conformance.
3. What i s Software quality control?
Qual i ty control i nvol ves the seri es of i nspecti ons, revi ews and tests used throught the
software process to ensure each work product meets the requi rements pl aced upon i t.
4. What i s Quality assurance?
Qual i ty assurance consi sts of the audi ti ng and reporti ng functi ons of management. I t wi l l
ensure that product qual i ty meets i ts goal s.
5. What are the components of cost of qual i ty?
Cost of qual i ty i ncl udes al l costs i ncurred i n the pursui t of qual i ty or i n performi ng qual i ty-
rel ated acti vi ti es. Qual i ty cost may be di vi ded i nto costs associ ated wi th preventi on,
apprai sal and fai l ure.
6. How do we defi ne Software quality?
Software qual i ty i s defi ned as conformance to expl i ci tl y stated functi onal and performance
requi rements, expl i ci tl y documented devel opment standards, and i mpl i ci t characteri sti cs
that are expected of al l professi onal l y devel oped software.
7. What i s the rol e of an SQA group?
(a) Prepares an SQA pl an for a project.
(b) Parti ci pates i n the devel opment of the projects software process descri pti on.
(c) Revi ews software engi neeri ng acti vi ti es to veri fy compl i ance wi th the defi ned software
process.
(d)Audi t desi gnated software work products.
(e) Ensures that devi ati on i n software work and work products i s documented and handl ed
accordi ng to a documented procedure.
(f) Records any noncompl i ance and reports to seni or management.
8. What i s FTR?
FTR (Formal technical review) i s a software qual i ty assurance acti vi ty performed by
software engi neers. The pri mary objecti ves of FTR are: (a) To uncover errors i n functi on,
Software Quality and Software Testing 35
l ogi c, or i mpl ementati on for any representati on of the software (b) To veri fy that the
software under revi ew meets i ts requi rements.
9. What i s statistical software quality assurance?
I t refl ects a growi ng trend throughout i ndustry to become more quanti tati ve about qual i ty.
I t i s carri ed out through i nformati on about software defects, usi ng the Pareto pri nci pl e
and traci ng each defect to i ts underl yi ng cause.
10. What i s software reliability?
I t i s defi ned i n stati sti cal terms as the probabi l i ty of fai l ure free operati on of a computer
program i n a speci fi ed envi ronment for a speci fi ed ti me.
11. What i s MTBF?
MTBF = MTTF + MTTR
MTBF = Mean ti me between fai l ures.
MTTF = Mean ti me to fai l ure
MTTR = Mean ti me to repai r.
12. What i s software availability?
I t i s the probabi l i ty that a program i s operati ng accordi ng to requi rements at a gi ven
poi nt i n ti me and i s defi ned as
Avai l abi l i ty = [MTTF /(MTTF + MTTR)] * 100%
13. What i s software safety?
I t i s a software qual i ty assurance acti vi ty that focuses on the i denti fi cati on and assessment
of potenti al hazards that may affect software negati vel y and cause an enti re system to
fai l .
14. What i s ISO 9001 standard?
I t i s the qual i ty assurance standard that appl i es to software engi neeri ng. The standard
contai ns 20 requi rements that must be present for an effecti ve qual i ty assurance system.
15. Why i s software qual i ty assurance i mportant?
I t i s the mappi ng of the manageri al precepts and desi gn di sci pl i nes of qual i ty assurance
onto the appl i cabl e manageri al and technol ogi cal space of software engi neeri ng.
16. Name some software quality metrics.
(i) Number of defects found per KDSI (known as defect densi ty)
(ii) Number of changes requested by the customer after the software i s del i vered.
(iii) MTBF (Mean ti me between fai l ures) i.e. the average ti me between fai l ures.
(iv) MTTR (Mean ti me to repai r) i.e. the average ti me requi red to remove a defect after i t
i s detected.
17. Compare Product Quality Metrics and Process Quality Metrics.
The product qual i ty metri cs are di fferent from the process qual i ty metri cs. The product
qual i ty metri cs refl ect the qual i ty of the product whereas the process qual i ty metri cs
refl ect how wel l the process i s defi ned.
36 Placement Preparation
18. What i s CMM?
CMM (Capabi l i ty Maturi ty Model ) i s a model devel oped by the software engi neeri ng i nsti tute
to grade software devel opment organi zati ons based on thei r process maturi ty.
19. What i s software process maturity?
The extent to whi ch a process i s expl i ci tl y defi ned, managed, measured, control l ed and
effecti ve i s defi ned as software process maturi ty.
20. What are the levels in CMM?
An organi zati on i s gi ven one of the 5 grades or l evel s as l evel 1 to l evel 5.
Level 1 organi zati on does not fol l ow any processes to devel op software. They do everythi ng
on ad hoc basi s. Level 5 organi zati ons have very mature processes and conti nuousl y
i mprove thei r processes to i mprove product qual i ty. However, CMM l evel s i ndi cate onl y
the process qual i ty and not product qual i ty.
21. Compare TQM and CMM.
CMM addresses the management of qual i ty of software aspects of the project i.e. CMM i s
confi ned to software qual i ty management of the organi zati on whereas TQM (Total qual i ty
management) addresses both hardware and software qual i ty management.
22. What i s CMMI?
The Capabi l i ty maturi ty model i ntegrati on (CMMI ) for software engi neeri ng i s the resul t
of the SEI s efforts to devel op an i ntegrated i mprovement framework for the fol l owi ng
standards for qual i ty system management:
(i) CMM for software (SW CMM)
(ii) EI A /I S 731
(iii) I PD CMM VO.98
There are two representati ons of CMMI framework namel y staged and conti nuous.
23. Why i s PSP requi red?
The SEI (Software Engineering Institute) devel oped the personal software process
(PSP) whi ch defi nes the processes to be fol l owed by i ndi vi dual s. The phi l osophy of PSP i s
si mpl e: pl an year wor k, tr ack your wor k and anal yze your wor k so that you wi l l
conti nuousl y i mprove yoursel f.
24. What i s PCMM level?
The peopl e capabi l i ty maturi ty model (PCMM) was devel oped at the SEI to measure and
i mprove the human resources devel opment practi ces. Organi zati ons are graded from l evel
1 to l evel 5 to measure the effecti veness of human resources devel opment practi ces.
25. What i s software testing?
I t i s a cri ti cal el ement of software qual i ty assurance and represents the ul ti mate revi ew
of speci fi cati on, desi gn and code generati on.
26. Who does the software testi ng?
Duri ng earl y stages of testi ng, a software engi neer performs al l tests. However, as the
testi ng process progresses, testi ng speci al i sts may become i nvol ved.
Software Quality and Software Testing 37
27. What are the attri butes of a good test?
(a) A good test has a hi gh probabi l i ty of fi ndi ng an error.
(b) A good test i s not redundant.
(c) A good test shoul d be the best of breed.
(d)A good test shoul d be nei ther too si mpl e nor too compl ex.
28. What are BlackBox testing and WhiteBox testing?
Whi tebox testi ng, someti mes cal l ed glassbox testing i s a test case desi gn method
that uses the control structure of the procedural desi gn to deri ve the test cases. Bl ack
box testi ng, al so cal l ed behavioral testing, focuses on the functi onal requi rements of
the software.
29. What i s Basis path testing?
I t i s a whi tebox testi ng techni que fi rst proposed by McCabe. I t enabl es the test case
desi gner to deri ve a l ogi cal compl exi ty measure of a procedural desi gn and use thi s measure
as a gui de for defi ni ng a basi s set of executi on paths.
30. How i s basi s path testi ng carri ed out?
Usi ng representati ons l i ke fl ow graph, graph matri x and software metri cs l i ke cycl omati c
compl exi ty and control structure testi ng.
31. What i s control structure testing?
The control structure testi ng compl etel y scans al l the l ogi cal condi ti ons, data fl ow and
l oops through condi ti on testi ng, data fl ow testi ng and l oop testi ng.
32. What are Condition testing and Data flow testing?
Condi ti on testi ng i s a test case desi gn method that exerci ses the l ogi cal condi ti ons contai ned
i n a program modul e. The data fl ow testi ng method sel ects test paths of a program
accordi ng to the l ocati ons of defi ni ti ons and uses of vari abl es i n the program.
33. What i s loop testing?
I t i s a whi te-box testi ng techni que that focuses excl usi vel y on the val i di ty of l oop constructs.
Four di fferent cl asses of l oops can be defi ned si mpl e l oops, concatenated l oops, nested
l oops and unstructured l oops.
34. What i s equivalence partitioning?
I t i s a bl ack-box testi ng method that di vi des the i nput domai n of a program i nto cl asses of
data from whi ch test cases can be deri ved.
35. What i s boundary value analysis?
Val ues that are on the boundary of equi val ence cl asses are hi gh fi el d test cases. Exampl e:
for (I =0;I <=50;I ++) { statements }. I n thi s code, I =50 i s a boundary val ue. I t i s a test case
desi gn techni que that compl ements equi val ence parti ti oni ng.
36. What i s orthogonal array testing?
I t can be appl i ed to probl ems i n whi ch the i nput domai n i s rel ati vel y smal l but too l arge
to accommodate exhausti ve testi ng. The orthogonal array testi ng method i s parti cul arl y
useful i n fi ndi ng errors associ ated wi th regi on faul ts--an error category associ ated wi th a
faul ty l ogi c wi thi n a software component.
38 Placement Preparation
37. What are verification and validation?
Veri fi cati on refers to the set of acti vi ti es that ensure that software correctl y i mpl ements
a speci fi c functi on. Val i dati on refers to a di fferent set of acti vi ti es that ensure that the
software that has been bui l t i s traceabl e to customer requi rements.
38. What i s the overal l strategy for software testi ng?
Four types of testi ng are conducted to the software product. Uni t testi ng begi ns fi rst and
concentrates on each uni t of the software as i mpl emented i n source code. Then comes
i ntegr ati on testi ng, wher e focus i s on desi gn and the constr ucti on of the softwar e
archi tecture. Next i s val i dati on testi ng, where requi rements establ i shed as part of software
requi rements anal ysi s are val i dated agai nst software. Fi nal l y comes the system testi ng
where the software and other system el ements are tested as a whol e.
39. When are we done wi th software testi ng?
There i s no defi ni ti ve answer to thi s questi on. We can never say that testi ng i s over; the
burden si mpl y shi fts from the software engi neer to the customer. Every ti me the user
executes the computer program, the program i s bei ng tested.
40. What are the two levels in integration testing?
Top-down i ntegrati on and bottom-up i ntegrati on.
41. What i s regression testing?
I n the context of an i ntegrati on test strategy regressi on testi ng i s the re-executi on of
some subset of tests that has al ready been conducted to ensure that changes have not
propagated uni ntended si de effects.
42. What i s smoke testing?
I t i s an i ntegrati on testi ng approach that i s commonl y used when shri nk wrapped software
products are bei ng devel oped.
43. What i s Alpha and Beta testing?
The al pha test i s conducted at the devel opers si te by a customer. The beta test i s conducted
at one or more customer si tes by the end-user of the software.
44. What i s system testing?
I t i s actual l y a seri es of di fferent tests whose pri mary purpose i s to ful l y exerci se the
computer based system. Types of system tests i ncl ude (1) Recovery testi ng (2) Securi ty
testi ng (3) Stress testi ng and (4) Performance testi ng.
45. What i s Debugging?
Debuggi ng i s the process that resul ts i n the removal of the error. I t i s not testi ng but
al ways occurs as a consequence of testi ng.
46. What i s Mutation testing?
Mutati on testi ng i s requi red to ensure that the software does not fai l . I t i s al so a good
debuggi ng mechani sm. After the software works correctl y, mutati on testi ng can be done
to si mul ate wrong i nputs.
Software Quality and Software Testing 39
47. What i s WinRunner?
I t i s a very powerful automated testi ng tool for functi onal /regressi on testi ng. Usi ng
Wi nRunner, we can record GUI operati ons. Whi l e recordi ng, Wi nRunner automati cal l y
creates a test scri pt. Thi s test scri pt can be run automati cal l y l ater on for carryi ng out
unattended testi ng.
48. What i s TSL?
Test Script Language (TSL) i s a scri pti ng l anguage wi th syntax si mi l ar to C l anguage.
There are four categori es of TSL functi ons. They are:
(a) Anal og functi ons (b) Context sensi ti ve functi ons
(c) Customi zati on functi ons (d) Standard functi ons
49. What are the features of the Wi nRunner appl i cati on?
(a) Synchroni zati on of test cases (b) Data dri ven testi ng
(c) Rapi d testi ng (d) GUI check poi nts
50. What i s Data driven testing?
Data dri ven testi ng si mpl i fi es the testi ng process as we can just generate one test case
wi th constants, and then repl ace these constants wi th vari abl es. Thi s type of testi ng i s
very i mportant for most database appl i cati ons.
51. What i s SilkTest?
To faci l i tate unattended testi ng, si l ktest has an i n-bui l t customi zabl e recovery system. I t
can be used for testi ng a vari ety of appl i cati ons such as VB, standal one JAVA, websi tes,
databases, etc.
52. What are the components of Si l ktest?
I t has two components that execute as separate processes: (a) Host software (b) Agent
software. Host software i s the component that i s used to devel op test pl ans and test
scri pts. The agent software i s the component that i nteracts wi th the GUI of our appl i cati on.
53. What are the steps i n si l k test testi ng process?
(1) Creati ng a test pl an (2) Recordi ng a test frame (3) Creati ng test cases (4) Runni ng test
cases and i nterpreti ng these resul ts.
54. What i s LoadRunner?
The Mercury I nteracti ves LoadRunner i s used to test the cl i ent/server appl i cati ons such
as database management systems and websi tes. Usi ng LoadRunner , wi th mi ni mal
i nfr astr uctur e and manpower , per for mance testi ng can be car r i ed out. LoadRunner
si mul ates mul ti pl e transacti ons from the same machi ne and hence i t creates a scenari o
of si mul taneous access to the appl i cati on. Hence i nstead of real users, vi rtual users are
si mul ated.
55. What i s an Apache J Meter?
I t i s an open source testi ng tool used to test the performance of the appl i cati on when i t i s
under heavy l oad. I t can be used to test both stati c and non-stati c data. I t puts a heavy
l oad on the server, tests the performance and anal yzes the resul ts when many users
access the appl i cati on si mul taneousl y.
40 Placement Preparation
56. What i s Test Director?
Test engi neers need to study the requi rements of the software i n detai l . The requi rements
defi ne what needs to be tested. Hence an SRS document gi ves the testi ng objecti ves. The
TestDi rector provi des the features of l i nki ng the tests wi th the requi rements. I t can be
i ntegrated wi th other tool s such as Wi nRunner and LoadRunner. Hence, the test scri pts
generated usi ng these tool s can be i ncorporated i n the test pl an.
57. Li st the non-functi onal requi rement of a software product.
Rel i abi l i ty, portabi l i ty, usabi l i ty, effi ci ency, del i very, ti me, and safety requi rements etc.
58. What i s open source software?
I t i s a revol uti onary concept i n software devel opment. The source code i s freel y di stri buted
by the author, and i t can be redi stri buted wi thout any l i cense fee.
59. What i s software process?
The step-by-step procedure to convert a probl em defi ni ti on i nto a worki ng software product.
Thi s procedure i s di vi ded i nto di fferent stages such as requi rements engi neeri ng desi gn,
codi ng, testi ng and mai ntenance.
60. Does every software project need testi ng?
Whi l e al l projects wi l l benefi t from testi ng, some projects may not requi re i ndependent
test staff to succeed. The answer depends on the si ze and context of the project, the ri sks,
the devel opment methodol ogy, the ski l l and experi ence of the devel opers, and other factors.
61. Why does software have bugs?
Bugs are normal l y found i n software because of software compl exi ty, programmi ng errors,
changi ng requi rements and poor schedul i ng of software projects.
62. What i s a walkthrough?
A walkthrough i s an i nformal meeti ng for eval uati on or i nformati onal purposes. Li ttl e
or no preparati on i s usual l y requi red.
63. What i s an inspection?
An inspection i s more formal i zed than a walkthrough, typi cal l y wi th 3-8 peopl e i ncl udi ng
a moderator, a reader and a recorder to take notes.
64. What are the common probl ems i n the software devel opment process?
Poor requi rements, unreal i sti c schedul e, i nadequate testi ng, wal kthroughs and i nspecti ons.
65. What i s good code?
A good code i s a code that works, i s bug free and i s readabl e and mai ntai nabl e.
66. What makes a good software test engi neer?
A good test engi neer has a test to break atti tude, an abi l i ty to take the poi nt of vi ew of
the customer and a strong desi re for qual i ty.
67. What makes a good software quality assurance engineer?
The same qual i ti es a good tester has ar e useful for a qual i ty assur ance engi neer .
Addi ti onal l y, software qual i ty assurance engi neer must be abl e to understand the enti re
Software Quality and Software Testing 41
software devel opment process and how i t can fi t i nto the busi ness approach and goal s of
the organi zati on.
68. What i s a test plan?
A software project test pl an i s a document that descri bes the objecti ves, scope, approach
and focus of a software testi ng effort. The process of prepari ng a test pl an i s a useful way
to thi nk through the efforts needed to val i date the acceptabi l i ty of a software product.
69. What i s a test case?
A test case i s a document that descri bes an i nput, acti on, or event and an expected
response, to determi ne whether an appl i cati on i s worki ng correctl y.
70. How wi l l you carryout software testi ng when you dont have enough ti me?
One way i s to use ri sk anal ysi s to determi ne where testi ng shoul d be focused.
71. What i s Extreme Programming?
Extreme Programming (XP) i s a software devel opment approach for smal l teams on
ri sk-prone projects wi th unstabl e requi rements.
72. Wi l l automated testi ng tool s make testi ng easi er?
For smal l projects, the ti me needed to l earn and i mpl ement the automated testi ng tool s
may not be worthi er unl ess the testi ng team i s al ready fami l i ar wi th the tool s. For l arger
projects, or on-goi ng l ong-term projects, these tool s can be of hi gh val ue.
73. Name some certifications for software qual i ty assurance and test engi neers.
CSQE (Certi fi ed Software Qual i ty Engi neer) program, CSQA (Certi fi ed Software Qual i ty
Anal yst), CSTE (Certi fi ed Software Test Engi neer) and CSPM (Certi fi ed Software Project
Manager) certi fi cati ons, ISTQB (I nternati onal Software Testi ng Qual i fi cati ons Board)
certi fi ed tester.

42 Placement Preparation
5
Data Structures and
Algorithms
1. What i s an algorithm?
I t i s any wel l -defi ned computati onal procedure that takes some val ue, or set of val ues, as
i nput and produces some val ue, or set of val ues, as output.
2. What i s a data structure?
A data structure i s a way to store and organi ze data i n order to faci l i tate access and
modi fi cati ons.
3. What i s probabilistic analysis?
I t i s the method of usi ng probabi l i ty to anal yze probl ems. We use probabi l i sti c anal ysi s to
anal yze the runni ng ti me of an al gori thm.
4. What i s a randomized algorithm?
We cal l an al gori thm randomi zed i f i ts behavi or i s determi ned not onl y by i ts i nput but
al so by val ues produced by a random-number generator.
5. What i s heap data structure?
The (bi nary) heap data structure i s an array object that can be vi ewed as a nearl y compl ete
bi nary tree. Each node of the tree corresponds to an el ement of the array that stores the
val ue i n the node.
6. What i s a priority queue?
A pri ori ty queue i s a data structure for mai ntai ni ng a set of el ements, each wi th an
associ ated val ue cal l ed a key.
7. What i s counting sort?
Counti ng sort assumes that each of the n i nput el ements i s an i nteger i n the range 0 to
k for some i nteger k, when k = O(n), the sort runs i n O(n) ti me.
8. What i s bucket sort?
Bucket sort runs i n l i near ti me when the i nput i s drawn from a uni form di stri buti on.
Bucket sort i s fast because i t assumes somethi ng about the i nput.
9. Name some el ementary data structures.
Stacks, Queues
10. What are stacks and queues?
Stacks and queues are dynami c sets i n whi ch the el ement removed from the set by the
DELETE operati on i s pre-speci fi ed. I n a stack, the pol i cy i s LI FO (Last-i n, Fi rst-out). I n a
queue, the pol i cy i s FI FO (Fi rst-i n, Fi rst-out).
11. What i s a linked list?
A l i nked l i st i s a data structure i n whi ch the objects are arranged i n a l i near order.
Data Structures and Algorithms 43
12. What i s a binary tree?
A bi nary tree T i s a structure defi ned on a fi ni te set of nodes that ei ther contai ns no
nodes, or i s composed of three di sjoi ned sets of nodes: a root node, a bi nary tree cal l ed i ts
l eft subtree, and a bi nary tree cal l ed i ts ri ght subtree.
13. What i s a null tree?
The bi nary tree that contai ns no nodes i s cal l ed the empty tree or nul l tree.
14. What i s a full binary tree?
I t i s a bi nary tree where each node i s ei ther a l eaf or has degree exactl y 2.
15. What i s K-ary tree?
I t i s a posi ti onal tree i n whi ch for every node, al l chi l dren wi th l abel s greater than k are
mi ssi ng. Thus, a bi nary tree i s a k-ary tree wi th k=2. A compl ete k-ary tree i s a k-ary
tree i n whi ch al l l eaves have the same depth and al l i nternal nodes have degree k.
16. What i s a hash table?
A hash tabl e i s an effecti ve data structure for i mpl ementi ng di cti onari es. The expected
ti me to search for an el ement i n a hash tabl e i s O(1). A hash tabl e i s a general i zati on of
the si mpl e noti on of an ordi nary array.
17. What are collision and chaining?
A col l i si on i s a si tuati on where the two keys may hash to the same sl ot. I n chai ni ng, we
put al l the el ements that hash to the same sl ot i n a l i nked l i st. The di cti onary operati ons
on a hash tabl e T are easy to i mpl ement when col l i si ons are resol ved by chai ni ng.
18. What makes a good hash functi on?
A good hash functi on sati sfi es the assumpti on of si mpl e uni form hashi ng; each key i s
equal l y l i kel y to hash to any of the m sl ots, i ndependentl y of where any other key has
hashed to.
19. What i s universal hashing?
Uni versal hashi ng i s a techni que of choosi ng the hash functi on randoml y i n a way that i s
i ndependent of the keys that are actual l y goi ng to be stored.
20. What i s open addressing?
I n open addressi ng, al l el ements are stored i n the hash tabl e i tsel f. Each tabl e entry
contai ns ei ther an el ement of the dynami c set or ni l .
21. What i s linear probing?
Gi ven an ordi nary hash functi on h:U {0,1,2,m1} whi ch we refer to as an auxi l i ary
hash functi on, the method of l i near probi ng uses the hash functi on h(k,I )=(h(k)+I ) mod m
for I =0,1,2,.m1. Gi ven key k, the fi rst sl ot probed i s T [h(k)], i .e. the sl ot gi ven by the
auxi l i ary hash functi on. We next probe sl ot t[h(k)+1] , and so on up to sl ot T[m-1].
22. What i s double hashing?
I t i s one of the best methods avai l abl e for open addressi ng because the permutati ons
produced have many of the characteri sti cs of randoml y chosen permutati ons. Doubl e hashi ng
uses a hash functi on of the form h(k,I )=(h1(k)+I h2(k)) mod m, where h1 and h2 are auxi l i ary
hash functi ons.
44 Placement Preparation
23. What i s a binary search tree?
I t i s a bi nary tree where i n addi ti on to a key fi el d and satel l i te data, each node contai ns
fi el ds l eft, ri ght and p that poi nt to the nodes correspondi ng to i ts l eft chi l d, i ts ri ght chi l d
and i ts parent, respecti vel y. I f a chi l d or the parent i s mi ssi ng, the appropri ate fi el d
contai ns the val ue NI L. The root node i s the onl y node i n the tree whose parent fi el d i s
NI L.
24. What i s the property of a bi nary-search tree?
Let x be a node i n a bi nary search tree. I f y i s a node on the l eft subtree of x, then
key[y] key[x]. I f y i s a node i n the ri ght subtree of x, then key[x] key[y].
25. What i s a red black tree?
A red bl ack tree i s a bi nary search tree wi th one extra bi t of storage per node. I ts col or
can be ei ther RED or BLACK.
26. When i s a bi nary search tree cal l ed a red-bl ack tree?
A bi nary search tree i s a red bl ack tree i f i t sati sfi es the fol l owi ng red-bl ack properti es:
(1) Every node i s ei ther red or bl ack. (2) The root i s bl ack (3) Every l eaf (NI L) i s bl ack.
(4) I f a node i s red, then both i ts chi l dren are bl ack. (5) For each node, al l paths from the
node to descendant l eave contai n the same number of bl ack nodes.
27. What i s an AVL tree?
An AVL tree i s a bi nary search tree that i s hei ght bal anced: for each node x, the hei ghts
of the l eft and ri ght subtrees of x di ffer by atmost 1. To i mpl ement an AVL tree, we
mai ntai n an extra fi el d i n each node: h[x] i s the hei ght of node x.
28. What i s a treap?
I t i s a bi nary search tree wi th a modi fi ed way of orderi ng the nodes. Each node x i n the
tree has a key val uekey [x]. I n addi ti on, we assi gn pri ori ty [x], whi ch i s a random
number chosen i ndependentl y for each node. Al l pri ori ti es are di sti nct and al so al l keys
are di sti nct.
29. What i s an order-statistic tree T?
I t i s si mpl y a red-bl ack tree wi th addi ti onal i nformati on stored i n each node.
30. How do we augment a data structure?
Augmenti ng a data structure can be broken i nto four steps:
(a) Choosi ng an underl yi ng data structure;
(b) Determi ni ng addi ti onal i nformati on to be mai ntai ned i n the underl yi ng data structure;
(c) Veri fyi ng that the addi ti onal i nformati on can be mai ntai ned for the basi c modi fyi ng
operati ons on the underl yi ng data structure; and
(d) Devel opi ng new operati ons.
31. How i s dynamic programming al gori thm generated?
The devel opment of a dynami c programmi ng al gori thm can be broken i nto a sequence of
four steps:-
(a) Characteri zi ng the structure of an opti mal sol uti on;
Data Structures and Algorithms 45
(b) Recursi vel y defi ni ng the val ue of an opti mal sol uti on;
(c) Computi ng the val ue of an opti mal sol uti on i n a bottom-up fashi on; and
(d) Constructi ng an opti mal sol uti on from computed i nformati on.
32. What i s an optimal binary search tree?
For a gi ven set of probabi l i ti es, our goal i s to construct a bi nary search tree whose
expected search cost i s smal l est. We cal l such a tree an opti mal bi nary search tree.
33. What i s a Greedy algorithm?
A greedy al gori thm al ways makes the choi ce that l ooks best at the moment. That i s, i t
makes a l ocal l y opti mal choi ce i n the hope that thi s choi ce wi l l l ead to a gl obal l y opti mal
sol uti on. Greedy al gori thms do not al ways yi el d opti mal sol uti ons, but for many probl ems
they do.
34. What are Huffman codes?
Huffman codes are a wi del y used and very effecti ve techni que for compressi ng data.
Huffmans greedy al gori thm uses a tabl e of the frequenci es of occurrence of the characters
to bui l d up an opti mal way of representi ng each character as a bi nary stri ng.
35. How wi l l you construct a Huffman code?
Huffman i nvented a greedy al gori thm that constructs an opti mal prefi x code cal l ed a
Huffman code.
36. What i s amortized analysis?
I n an amorti zed anal ysi s, the ti me requi red to perform a sequence of data structure
operati ons i s averaged over al l the operati ons performed. I t can be used to show that the
average cost of an operati on i s smal l , i f one averages over a sequence of operati ons, even
though a si ngl e operati on wi thi n the sequence mi ght be expensi ve.
37. What i s a B-tree?
B-trees are bal anced search trees desi gned to work on magneti c di sks or other di rect-
access secondary storage devi ces. B-trees are si mi l ar to red-bl ack trees but they are
better at mi ni mi zi ng di sk I /O operati ons.
38. Defi ne the height of a B-tree.
The number of di sk accesses requi red for most operati ons on a B-tree i s proporti onal to
the hei ght of the B-tree.
39. What i s a binomial tree?
I t i s an ordered tree defi ned recursi vel y. For the bi nomi al tree B
k
, there are 2
k
nodes.
The hei ght of the tree i s k, there are exactl y kc
i
nodes at depth i for i =0,1,.k and the
root has degree k, whi ch i s greater than that of any other node.
40. What i s a binomial heap H?
I t i s a set of bi nomi al trees that sati sfi es the fol l owi ng bi nomi al heap properti es.
(a) Each bi nomi al tree i n H obeys the mi n-heap property.
(b) For any non-negati ve i nteger k, there i s atmost one bi nomi al tree H whose root has
degree k.
46 Placement Preparation
41. What i s a Fibonacci Heap?
I t i s a col l ecti on of mi n-heap or der ed tr ees. The tr ees i n a Fi bonacci heap ar e not
constrai ned to be bi nomi al trees. Unl i ke trees wi thi n bi nomi al heaps whi ch are ordered,
the trees wi thi n Fi bonacci heaps are rooted but unordered.
42. What i s a topological sort?
A topol ogi cal sort of a di rected acycl i c graph G = (V,E) i s a l i near orderi ng of al l i ts
verti ces such that i f G contai ns an edge (u,v) then u appears before v i n the orderi ng.
43. State the zero-one principle.
I t says that i f a sorti ng network works correctl y when each i nput i s drawn from the set
{0,1}, then i t works correctl y on arbi trary i nput numbers.
44. What i s a sorting network?
A sorti ng network i s a compari son network for whi ch the output sequence monotoni cal l y
i ncreases for every i nput sequence.
45. What i s NP-Completeness?
A l anguage L {0,1}* i s NP-compl ete i f 1) LNP and 2) L pL for every LNP. I f a
l anguage L sati sfi es property 2, but not necessari l y property 1, we say that L i s NP-hard.
46. Gi ve an exampl e of NP-compl ete.
A cl i que i n an undi rected graph G=(V,E) i s a subset V V of verti ces, each pai r of whi ch
i s connected by an edge i n E. A cl i que i s a compl ete subgraph of G. The si ze of a cl i que i s
the number of verti ces i t contai ns. The cl i que probl em i s NP-Compl ete.
47. What i s a spanning tree?
A spanni ng tree i s a tree associ ated wi th a network. Al l the nodes of the graph appear on
the tree once. MST (Minimal Spanning Tree) i s a spanni ng tree organi zed so that the
total edge wei ght between nodes i s mi ni mi zed.
48. What are the methods to fi nd MST?
(a) Pri ms al gori thm: O(n*n) and (b) Kruskal s al gori thm: O(e*l og e)
49. What i s a bottleneck-spanning tree T?
A bottl eneck-spanni ng tree T of an undi rected graph G i s a spanni ng tree of G whose
l argest edge wei ght i s mi ni mum over al l spanni ng trees of G.
50. Name the collision resolution techniques.
(a) Open addressi ng (cl osed hashi ng). Here, the method used i s overfl ow bl ocks.
(b) Cl osed addressi ng (open hashi ng). Here, the method used i ncl udes l i nked l i sts, bi nary
tree, etc.

Computer Applications 47
6
Computer Applications
1. Name some appl i cati ons of computer sci ence whi ch enabl e an organi zati on to i mprove i ts
performance.
ERP packages, MI S, DSS, SCM, BPR, EI S and OLAP.
2. Expand the following: ERP, MI S, DSS, SCM, BPR, EI S, OLAP, MRP, MRPI I , EDP,
CRM, TQM and EDI FACT
ERP Enterpri se Resource Pl anni ng
MIS Management i nformati on system
DSS Deci si on support system
SCM Suppl y chai n management
BPR Busi ness process reengi neeri ng
EIS Executi ve i nformati on system
OLAP On l i ne anal yti cal processi ng
MRP Materi al s requi rements pl anni ng
MRP II Manufacturi ng resource pl anni ng
EDP El ectroni c data processi ng
CRM Customer rel ati onshi p management
TQM Total qual i ty management
EDIFACT El ectroni c data i nterchange for admi ni strati on, commerce and transport.
3. What i s ERP?
ERP covers the techni ques and concepts empl oyed for the i ntegrated management of
busi nesses as a whol e, from the vi ew poi nt of the effecti ve use of management resources,
to i mprove the effi ci ency of an enterpri se. ERP packages are i ntegrated software packages
that support these ERP concepts.
4. What are the advantages of ERP?
Busi ness i ntegrati on, fl exi bi l i ty, standardi zati on, better pl anni ng and abi l i ty to make use
of the l atest technol ogy.
5. What i s a Business model?
A Busi ness model i s a representati on of the actual busi ness--what the vari ous busi ness
functi ons of the organi zati on are, how they rel ated are, what thei r i nterdependenci es are
and so on.
6. What i s Data Mining?
I t i s the process of i denti fyi ng val i d, novel , potenti al l y useful and ul ti matel y comprehensi bl e
i nformati on from databases that are used to make cruci al busi ness deci si ons.
7. What i s a Data Warehouse?
I t i s a database desi gned to support deci si on maki ng i n an organi zati on. I t i s updated
batch-wi se and i s structured for fast onl i ne queri es and summari es for managers.
48 Placement Preparation
8. Why i s OLAP requi red?
I t i s used for appl i cati ons such as product profi tabi l i ty and pi eci ng anal ysi s, acti vi ty based
costi ng, manpower pl anni ng and qual i ty anal ysi s.
9. What i s supply chain management?
I t i s a process of managi ng the faci l i ti es and di stri buti on opti ons that perform the functi on
of procurement of materi al s, transformati on of these materi al s i nto i ntermedi ate and
fi ni shed products and di stri buti on of these fi ni shed products to customers.
10. What i s BPR?
Dr . Mi chael Hammer defi ned Busi ness Pr ocess Reengi neer i ng as the fundamental
rethi nki ng and radi cal redesi gn of busi ness processes to achi eve dramati c i mprovements
i n cri ti cal , contemporary measures of performance such as cost, qual i ty, servi ce and speed.
11. What are the techni ques used i n Data mi ni ng?
Neural networks, rube i nducti on, evol uti onary programmi ng, case based reasoni ng (CBR),
deci si on trees, geneti c al gori thms and nonl i near regressi on methods.
12. What i s the evolution of ERP?
MRP MRP I I ERP SCM
13. What are the three approaches i n ERP i mpl ementati on?
There are three di fferent approaches to ERP i mpl ementati on. They are:
(i) The bi g bang approach
(ii) Locati on-wi se approach
(iii) Modul e-wi se approach
14. What are the three ways of eval uati ng ERP software?
The eval uati on of ERP software can be done i n three perspecti ves namel y organi zati onal ,
busi ness and technol ogi cal perspecti ve.
15. What are the business modules i n an ERP package?
Fi nanci al management, HR Management, Manufacturi ng, Producti on pl anni ng, Pl ant
mai ntenance, Materi al s management and Qual i ty management.
16. What are the two versi ons of the SAP ERP package?
SAP (systems, appl i cati ons and products i n data processi ng) i s the l eadi ng gl obal provi der
of cl i ent/server busi ness appl i cati on sol uti on. SAP ERP package comes i n two versi ons:
the mai nframe versi on (SAP R/2) and the cl i ent/server versi on (SAP R/3).
17. Name some ERP vendors.
SAP, Baan, JD Edwards, Ramco system and Oracl e Corporati on.
18. What i s EIA?
Enterpri se I ntegrati on Appl i cati on (EI A) products promi se to speed the work of l i nki ng
appl i cati ons and el i mi nati ng or reduci ng the need to devel op a custom code.
19. What i s BOM?
Bi l l of materi al (BOM) defi nes the rel ati onshi p of components to end i tems.
Computer Applications 49
20. What i s CAD/CAM?
CAD (ComputerAi ded Desi gn) /CAM (Computer-Assi sted Manufacturi ng) systems are
computer programs or i ntegrated packages for workstati on hardware and software that
al l ow the user to draw and easi l y modi fy product desi gns on a computer screen. CAD
engi neered desi gns are converted automati cal l y i nto software programs for computeri zed
producti on machi nes.
21. What i s MIS?
Management i nformati on system (MI S) i s a computer-based system that opti mi zes the
col l ecti on, col l ati on, transfer and presentati on of i nformati on throughout an organi zati on
through an i ntegrated structure of databases and i nformati on fl ow.
22. What i s DSS?
A DSS (Deci si on support system) i s an i nformati on and pl anni ng system that provi des the
abi l i ty to i nterrogate computers on ad-hoc basi s, anal yze i nformati on and predi ct the
i mpact of deci si ons before they are made.
23. What i s EIS?
An EI S (Executi ve I nformati on System) i s an i nformati on system that consol i dates and
summari zes the ongoi ng transacti ons wi thi n an organi zati on.
24. What i s E-Commerce?
El ectroni c commerce (E-commerce) means doi ng busi ness onl i ne or sel l i ng and buyi ng
products and servi ces through web.
25. What i s EDI?
EDI (El ectroni c Data I nterchange) i s the el ectroni c communi cati on of transacti ons between
organi zati ons such as orders, confi rmati ons and i nvoi ces.
26. What i s TQM?
TQM (Total Qual i ty Management) i s both a phi l osophy and a set of gui di ng pri nci pl es that
represent the foundati on of a conti nuousl y i mprovi ng organi zati on. I t i s a strategi c,
i ntegrated management system for achi evi ng customer sati sfacti on.
27. What i s WMS?
WMS (Warehouse Management System) i s a software that i ntegrates mechani cal and
human acti vi ti es wi th an i nformati on system to effecti vel y manage warehouse busi ness
processes and di rect warehouse acti vi ti es.
28. Name the four basi c phases i n ERP i mpl ementati on.
(a) Defi ni ng the probl em (b) Defi ni ng sol uti ons (c) Getti ng down to work (d) Goi ng l i ve.
29. What are the advantages of a Data warehouse?
(1) Less expensi ve (2) Better enter pr i se i ntel l i gence (3) Enhanced customer ser vi ce
(4) Busi ness reengi neeri ng (5) Effecti ve deci si on maki ng (6) I ncreased operati onal and
producti on databases.
30. What are the major components of a Data warehouse?
(i) Summari zed data (ii) Operati onal systems of record (iii) Archi tecture of Data warehouse
(iv) Archi ves.
50 Placement Preparation
31. What i s CRM?
Customer Rel ati onshi p Management (CRM) i s to add val ue for customers through those
processes that i nvol ve di rect contact wi th customer before, duri ng and after sal es.
32. Compare CAD and CAM.
CAD systems are i nteracti ve computer graphi cs systems used for product desi gn. The
CAD technol ogy si gni fi cantl y r educes the ti me r equi r ed for pr oduct desi gn, and
provi des tremendous fl exi bi l i ty i n desi gn. CAM software i ntegrates the operati ons of al l
computers-control l ed machi nes. CAM can have on-l i ne and off-l i ne appl i cati ons.
33. How i s computer network rel ated to E-Commerce?
E-Commerce i s an emergi ng concept that descri bes the process of buyi ng and sel l i ng or
exchangi ng of products, servi ces and i nformati on vi a computer networks i ncl udi ng the
i nternet.
34. What are the appl i cati ons of Extranets?
Enhanced communi cati on, producti vi ty enhancement, busi ness enhancement, cost reducti on
and i nformati on del i very.
35. What i s embedded extranet?
One si te connected to the I nternet has an embedded extranet of another company so that
the company at the back can provi de i nformati on to the customers seaml essl y.
36. What i s B2B?
Busi ness-to-Busi ness EC (B2B) i s an el ectroni c tradi ng where both the buyers and the
sel l ers are organi zati ons.
37. What i s B2C?
Busi ness-to-Consumer EC i s a si tuati on where a busi ness i s sel l i ng onl i ne to an i ndi vi dual
consumer .
38. What i s e-cash?
El ectroni c Cash (e-cash) i s the cash i n an el ectroni c form, usual l y stored on a smart card
and/or i n software cal l ed di gi tal wal l et.
39. What i s an Intelligent Agent?
I ntel l i gent Agents and thei r subset software agents are computer programs that hel p
the users to conduct routi ne tasks, search and retri eve i nformati on, support deci si on
maki ng and act as domai n experts. Agents are used to support many tasks i n El ectroni c
Commer ce.
40. What i s C2C (Consumer-to-Consumer)?
I n thi s category consumer sel l s di rectl y to consumers. Exampl es are i ndi vi dual s sel l i ng i n
cl assi fi ed ads and sel l i ng resi denti al property, cars, and so on.
41. What i s C2B (Consumer-to-Business)?
Thi s category i ncl udes i ndi vi dual s who sel l products or servi ces to organi zati ons, as wel l
as i ndi vi dual s who seek sel l ers, i nteract wi th them, and concl ude a transacti on.
Computer Applications 51
42. Name some commerci al web servers that hel p E-Commerce.
The three servers that are more popul ar are: (i) Apache server (ii) Mi crosofts I nternet
I nformati on Server (I I S) and (iii) Netscapes Enterpri se Server.
43. What are the major legal issues related to EC?
Major i ssues i ncl ude pri vacy, protecti ng i ntel l ectual property, control l i ng i nternet i ndecency,
pr eventi ng fr aud, establ i shi ng a tax fr amewor k, contr ol l i ng gambl i ng, deter mi ni ng
juri sdi cti on and protecti ng both sel l ers and buyers.
44. What are Biometric controls?
Bi ometri c control s provi de access procedures that match every val i d user wi th a uni que
user i denti fi er (UI D). They al so provi de an authenti cati on method to veri fy that users
requesti ng access to the computer system are real l y those whom they cl ai m to be.
45. What i s DES?
Data encrypti on standard (DES) i s a publ i shed federal encrypti on standard created to
protect uncl assi fi ed computer data and communi cati ons.
46. What i s SWOT anal ysi s?
SWOT i s an acronym used to descri be parti cul ar strengths, weaknesses, opportuni ti es
and threats for a company.
47. Li st the applications of extranets.
Enhanced communi cati on, pr oducti vi ty enhancement, busi ness enhancements, costs
reducti on and i nformati on del i very.
48. What i s the rel ati onshi p among the I nternet, I ntranet and Extranet?
The I nternet i s a publ i c and gl obal network open to anybody. An I ntranet i s a corporate
network whose access i s protected by fi rewal l s. An Extranet i s an extended i ntranet,
whi ch l i nks the remote i ntranets, or i ndi vi dual s, over the vi rtual pri vate network bui l t
on the i nternet.
49. What i s Electronic Banking?
El ectroni c banki ng, al so known as cyberbanking, vi rtual banki ng, home banki ng, and
onl i ne banki ng, i ncl udes vari ous banki ng acti vi ti es conducted from home, busi ness, or on
the road, i nstead of at a physi cal bank l ocati on.
50. What are the changes brought by E-Commerce?
Everythi ng wi l l be changed, starti ng wi th marketi ng theori es and practi ces and concl udi ng
wi th product i nnovati on and suppl y chai n management.

52 Placement Preparation
1. What type of l anguage i s J AVA?
Java i s an object-ori ented, mul ti -threaded programmi ng l anguage devel oped by Sun
Mi crosystems i n 1991. I n Java devel opment envi ronment there are two parts: a Java
compi l er and a Java i nterpreter. The compi l er generates bytecode i nstead of machi ne
code and the i nterpreter executes the Java program.
2. What i s the di sadvantage of bytecode?
Executi on speed.
3. Li st some features of JAVA.
Secured, portabl e, object-ori ented, robust, mul ti threaded and dynami c.
4. What i s a Swing?
I t i s a set of user i nterface components that i s i mpl emented enti rel y i n java.
5. What are the three different kinds of variables i n Java?
I nstance vari abl es, Local vari abl es and Cl ass vari abl es. Local vari abl es are used i nsi de
bl ocks as counters or i n methods as temporary vari abl es. Once the bl ock or the method i s
executed, the vari abl e ceases to exi st. I nstance vari abl es are used to defi ne attri butes or
the state of a parti cul ar object. Cl ass vari abl es are gl obal to a cl ass and to al l the i nstances
of the cl ass.
6. What i s meant by Literals?
A Li teral represents a val ue of a certai n type where the type descri bes the behavi or
of the val ue. There are di fferent types of l i teral s. They are (a) Number (b) Character
(c) Bool ean (d) Stri ng
7. What are wrapper classes?
Wrapper cl asses are provi ded for the pri mi ti ve data types i n order to use theses types as
objects.
8. What i s a class?
A cl ass defi nes the shape and behavi or of an object and i s a templ ate for mul ti pl e objects
wi th si mi l ar features.
9. What i s the purpose of this keyword?
The thi s keyword i s used i nsi de any i nstance method to refer to the current object. The
val ue of thi s refers to the object on whi ch the current method has been cal l ed.
10. What i s a method?
Methods are functi ons that operate on i nstances of cl asses i n whi ch they are defi ned.
Objects can communi cate wi th each other usi ng methods and can cal l methods i n other
cl asses.
7
J AVA Programming
J AVA Programming 53
11. What are the vari ous l evel s of access control ? What i s the di fference between them?
Access control i s the process of control l i ng vi si bi l i ty of a vari abl e or method. There are
four l evel s of vi si bi l i ty that are used. They are Publ i c, Pri vate, Protected and Package.
12. What are constructors and finalizer?
A constructor method i s a speci al ki nd of method that determi nes how an object i s i ni ti al i zed
when created. They have the same name as the cl ass and do not have any return type.
The fi nal i zer method functi ons i n contradi cti on to the constructor method. Fi nal i zers are
cal l ed just before the object i s garbage col l ected and i ts memory i s recl ai med. The Fi nal i zer
method i s represented by fi nal i ze().
13. What i s an inner class?
An i nner cl ass i s a nested cl ass whose i nstance exi sts wi thi n an i nstance of i ts encl osi ng
cl ass and has di rect access to the i nstance members of i ts encl osi ng i nstance.
14. What i s garbage collection?
I n Java, deal l ocati on happens automati cal l y. The techni que that accompl i shes thi s i s cal l ed
garbage collection.
15. Li st some string methods used i n Java.
Length( ), CharAt( ), equals( ), CompareTo( ), Concat( ), Substring( ), replace( ), toLowercase( ),
toUppercase( ), tri m( ), val ueof( ).
16. What i s String Buffer?
Stri ng Buffer i s a peer cl ass of stri ng that provi des much of the common use functi onal i ty
of stri ngs. Stri ngs represent fi xed-l ength character sequences.
17. Name some demeri ts of Java.
Java does not support mul ti di mensi onal arrays and operator overl oadi ng. However, an
array of arrays can be created.
18. What i s an interface?
An i nterface i s a col l ecti on of abstract behavi or speci fi cati ons that i ndi vi dual cl asses can
i mpl ement.
19. What i s a package?
Packages i n Java are a way of groupi ng together rel ated cl asses and i nterfaces.
20. What i s overriding?
Overri di ng i s the creati on of a method i n the subcl ass that has the same si gnature (i .e.)
name, number and type of arguments, as a method i n the super cl ass. Thi s new method
hi des the method of the super cl ass.
21. What i s the purpose of keyword final?
The word final i s used to i ndi cate that no further al terati ons can be made. Cl asses can
be decl ared as final i ndi cati ng that the val ue of that parti cul ar vari abl e cannot be changed.
22. What i s an abstract class?
Abstract cl asses are cl asses from whi ch i nstances are usual l y not created. I t i s basi cal l y
used to contai n common characteri sti cs of i ts deri ved cl asses.
54 Placement Preparation
23. What are the advantages of inheritance?
(i) Reusabi l i ty of code (ii) Data and methods of a super cl ass are physi cal l y avai l abl e to i ts
subcl asses.
24. What i s an exception?
An excepti on i s an abnormal condi ti on, whi ch ari ses duri ng the executi on of a program.
Java handl es excepti ons usi ng fi ve keywords try, catch, fi nal l y, throws and throw.
25. What are the meri ts of a package?
Packages contai n a set of cl asses i n order to ensure that i ts cl ass names are uni que.
Packages are contai ners for cl asses that are used to compartmental i ze the cl ass name
space.
26. Li st the vari ous exceptions avai l abl e i n Java.
ArrayI ndexoutofBoundsExcepti on, EOFExcepti on, Fi l eNotFoundExcepti on, I OExcepti on,
I nter r uptedI OEx cepti on, I nv al i dCl assEx cepti on, Negati v eAr r ay Si zeEx cepti on,
NumberFormatExcepti on, SQLExcepti on and UnknownHostExcepti on.
27. How are file operations carri ed out i n Java?
Fi l e I /O oper ati ons ar e per for med usi ng methods found i n a cl ass fi l e found i n
java.i o.package. Three types of constructors are found i n the fi l e cl ass.
28. What are the methods avai l abl e wi th the I nputStream/Reader cl ass?
read( ), ski p( ), avai l abl e( ), cl ose( ), mark( ) and reset( ).
29. What are the two types of file streams avai l abl e i n Java?
Fi l e stream compri ses of the Fi l eI nputStream and Fi l eOutputStream. The Fi l eI nputStream
cl ass hel ps i n readi ng data from the actual di sk fi l es. The Fi l eOutputStream cl ass hel ps
to create a fi l e and wri te data i nto i t usi ng the methods under OutputStreamCl ass.
30. What i s Random Access File Class?
I t can be used for both i nput and output to a si ngl e fi l e. Al though i t i s not a stream cl ass,
i t provi des the same pl atform i ndependent formatti ng methods as the DataStream cl asses.
31. What i s AWT?
The Abstract Windowing Toolkit (AWT) i s an API (Appl i cati on Programmi ng I nterface)
that i s responsi bl e for bui l di ng the graphi cal user i nterface (GUI ). I t i s a part of the Java
Foundati on Cl asses (JFC). The java.awt package contai ns al l cl asses for creati ng user
i nterface and for pai nti ng graphi cs and i mages.
32. How are Java programs cl assi fi ed?
Java programmi ng i s cl assi fi ed i nto two groups namel y appl i cati ons and appl ets. An appl et
i s a dynami c and i nteracti ve program that can run i nsi de a web page di spl ayed by a
Java capabl e browser such as Hot Java or Netscape.
33. What are the restri cti ons associ ated wi th appl ets?
(1) Appl ets cannot read or wri te to the fi l e system.
(2) Appl ets cannot run any programs on the system.
(3) Appl ets cannot communi cate wi th any server other than the one i n whi ch they were
stored ori gi nal l y.
J AVA Programming 55
34. Name some of the tags used i nsi de an appl et.html fi l e?
<Appl et>, </Appl et>, CODE, CODEBASE, WI DTH and HEI GHT.
35. How wi l l you pass parameters to an applet?
Parameters can be passed to an appl et by usi ng the PARAM tag, whi ch has two attri butes
NAME and VALUE.
36. What are the mai n methods of the appl et cl ass?
The mai n methods of Appl et cl ass are i ni t( ), start( ), stop( ), destroy( ), pai nt( ) and
repai nt( ).
37. What i s a thread?
Thread i s a l i ne of executi on. I n a si ngl e threaded system there i s onl y one executi on
l i ne.
38. What i s an event?
When an event i s fi red, i t i s recei ved by one or more l i steners that act on that event.
Components can handl e events by themsel ves or can del egate i t to objects cal l ed l i steners.
39. What i s an EventListener?
An EventLi stener i nterface typi cal l y has a separate method for each di sti nct event type
the event cl ass represents. There are two types of mouse event l i steners MouseLi stener
and MouseMoti onLi stener.
40. What i s a Panel?
The Panel i s a recursi vel y nestabl e contai ner often used to di vi de the screen space i nto a
number of cel l s.
41. What i s layout manager class?
The l ayout manager cl asses are a set of cl asses that i mpl ement the java.Awt.Layout
manager i nterfaces and hel p to posi ti on the components i n a contai ner.
42. What are the basi c l ayout managers?
Fl owLayout, BorderLayout, Gri dLayout, Gri dBagLayout, and CardLayout.
43. What i s a frame class?
The frame cl ass i s used to create standard appl i cati on wi ndows i ndependent of the browser
that contai ns the appl et.
44. How do we bui l d and manage menus i n Java?
Javas AWT provi des three cl asses MenuBar, Menu and MenuI tem to bui l d and manage
menus.
45. What i s J FC?
Java Foundati on Cl ass (JFC) i s an extensi on for AWT. I t consi sts of fi ve major packages
namel y swi ng, pl uggabl e l ook and feel , drag and drop, accessi bi l i ty, and 2D.
46. Gi ve the syntax of an interface.
An i nterface i s a col l ecti on of abstract behavi or that i ndi vi dual cl asses can i mpl ement. I t
i s defi ned l i ke a cl ass.
56 Placement Preparation
Syntax:
<access> <i nterface Name>{
<return Type> <method Name 1> (<parameter. Li st>);
.
.
.
<type> <vari abl e Name 1> = <val ue>;
.
.
}
Here the access i s ei ther publ i c or wi thout speci fi cati on.
47. What i s multithreading?
A pr ocess contai ni ng mul ti pl e thr eads to execute i ts di ffer ent secti ons i s cal l ed
mul ti threadi ng. There are four states associ ated wi th a threadnamel y new, runnabl e,
bl ocked and dead.
48. What are the interfaces of java. l ang?
Cl oneabl e, Comparabl e and Runnabl e.
49. What i s J DBC?
JDBC (Java Database Connecti vi ty) i s a software l ayer that al l ows devel opers to wri te
real cl i entserver projects i n Java. I t was desi gned to be a very compact, si mpl e i nterface
focusi ng on the executi on of raw SQL statements and retri evi ng the resul ts.
50. What are the components of J DBC?
Appl i cati on, Dri ver Manager and Dri ver.
51. What i s J DBC API?
I t defi nes a set of i nterface and cl asses to be used for communi cati ng wi th a database.
These i nterface and cl asses are found i n the java.sql package.
52. What i s the purpose of the super keyword?
The super keyword al l ows a subcl ass to refer to i ts i mmedi ate super cl ass.
53. What i s the usage of repaint( ) method?
Thi s method i s used i n case an appl et i s to be repai nted.
54. What i s a Dot operator?
I t i s used to obtai n the val ue of the i nstance vari abl e. The general form for accessi ng
i nstance vari abl es usi ng the dot operator i s gi ven bel ow:
<Object Reference>. <Vari abl e Name> Where <Object Reference> i s the name of the
object and <Vari abl e Name> i s the i nstance Vari abl e.
55. What i s a new operator?
The new operator creates a si ngl e i nstance of a named cl ass and returns a reference to
that object.
J AVA Programming 57
PREDICT THE OUTPUT OR ERROR FOR THE FOLLOWING
QUESTION NUMBER 56 TO 80
56. Cl ass one {
Publ i c stati c voi d mai n (Stri ng args[]){
for (i nt i =0;i <8;i ++){
for (i nt j=0;j<i ;j++){
System.out.pri nt ( +(i *j));
}}}
OUTPUT:______________
57. Cl ass two {
Publ i c stati c voi d mai n (Stri ng args[]){
fl oat C; fl oat f = 69;
C= (f-32)*5/9;
System.out.pri ntl n (Centri grade equi val ent i s + C + C);
}}
OUTPUT:______________
58. Cl ass sampl e {
Publ i c stati c voi d mai n (Stri ng args[]){
i nt r = 5, C;
Whi l e(r<=1){
C=1;
Whi l e(C<=5){
System.out.pri ntl n (r%2==1?*:#);
++C;
}
--r;
System.out.pri ntl n ();
}}}
OUTPUT:______________
59. Cl ass argu {
Publ i c stati c voi d mai n (Stri ng args[]){
for (i nt i =0; i <agrs.l ength;i ++){
System.out.pri ntl n (Arg +i +:+args[i ]);
}}}
OUTPUT:______________
60. Publ i c cl ass sub {
stati c i nt a[] = {2,6,5,9};
Publ i c stati c voi d mai n(Stri ng args[]){
for (i nt i =0;i <a.l ength;i ++)
{System.out.pri ntl n (Subscri pt i s + Stri ng.Val ueof(i )+Val ue i s+Stri ng.val ueof(a[i ]));
}}}
OUTPUT:______________
58 Placement Preparation
61. Cl ass fi rst {
Publ i c stati c voi d mai n (Stri ng args[]) {
System.out.pri ntl n (WELCOME);
}}
OUTPUT:______________
62. Cl ass sec {
Publ i c stati c voi d mai n (Stri ng args[]) {
x=90; short y=40; fl oat z=10.99f;
System.out.pri ntl n (I nteger x i s +x);
System.out.pri ntl n (Short y i s +y);
System.out.pri ntl n (Fl oat z i s + z);
}}
OUTPUT:______________
63. Cl ass count {
Publ i c stati c voi d mai n (Stri ng args[]) {
i nt a=1; i nt b=2; i nt c=++b;
i nt d=a++;
c++;
System.out.pri ntl n (a= +a);
System.out.pri ntl n (b= +b);
System.out.pri ntl n (c= +c);
System.out.pri ntl n (d= +d);
}}
OUTPUT:______________
64. Cl ass bi ts {
Publ i c stati c voi d mai n (Stri ng args[]) {
i nt a=1; i nt b=2; i nt c=3;
a=a| 4;
b>>=1;
c<<=1;
a=a^c;
System.out.pri ntl n (a= +a);
System.out.pri ntl n (b= +b);
System.out.pri ntl n (c= +c);
}}
OUTPUT:______________
65. Cl ass demo{
Publ i c stati c voi d mai n (Stri ng args[]) {
for (i nt j=0;j<10;j++){
System.out.pri nt (+j+ );
i f(j%2==0)
conti nue;
System.out.pri ntl n ( );
}}}
OUTPUT:______________
J AVA Programming 59
66. Cl ass pr {
Pri vate i nt x=10;
voi d var(){
System.out.pri ntl n (val ue i s +x);
}
Publ i c stati c voi d mai n (Stri ng args[]){
Pri v p1 = new Pri v();
System.out.pri ntl n (Val ue i s +p1.x);
p1.var();
}}
OUTPUT:______________
67. Cl ass demo {
Publ i c stati c voi d mai n (Stri ng args[]) {
Stri ng s1 = Hel l osi r;
Stri ng s2 = Hel l osi r;
Stri ng s3 = Thankyou;
Stri ng s4 = HELLO;
System.out.pri ntl n (s1.equal s(s2));
System.out.pri ntl n (s1.equal s(s3));
System.out.pri ntl n (s1.equal s(s4));
}}
OUTPUT:______________
68. Cl ass throwexcepti on {
Publ i c stati c voi d mai n (Stri ng args[]) throws Ari thmeti cExcepti on {
System.out.pri ntl n (i nsi de mai n);
i nt i =0;
i nt j=400/i ;
System.out.pri ntl n (thi s statement);
}}
OUTPUT:______________
69. Cl ass Def {
Publ i c stati c voi d mai n (Stri ng args[]) {
i nt i []={2};
i[10]=20;
}}
OUTPUT:______________
70. i mport java.awt.*;
i mport java.appl et.*;
Publ i c cl ass cl i p {
Publ i c voi d pai nt (Graphi cs g){
g.cl i pRect(10,10,150,100);
g.setFont(new Font(Ti mesRoman,font.I TALI C,28));
g.fi l l oval (100,60,80,80);
g.drawStri ng(Happy,50,30);
}}
OUTPUT:______________
60 Placement Preparation
71. Publ i c cl ass Fun {
i nt g()
{
System.out.pri ntl n(i nsi de g);
i nt n()
{
System.out.pri ntl n(i nsi de h);
return 1;
}
return 0;
}
Publ i c stati c voi d mai n (Stri ng[] args)
{i nt c;
c=g();
}}
OUTPUT:______________
72. Cl ass te{
Publ i c stati c voi d mai n (Stri ng args[]) {
{
Button b;
b.setText(Hai );
}}
OUTPUT:______________
73. Cl ass t
{
Publ i c i nt eg;
Publ i c stati c voi d mai n (Stri ng argv[]) {
i nt i = new t().eg;
System.out.pri ntl n(i );
}}
OUTPUT:______________
74. Cl ass t
{
i nt s=200;
t()
{
thi s(s++);
}
t(i nt i )
{
System.out.pri ntl n (s);
}
Publ i c stati c voi d mai n (Stri ng argv[]) {
new t();
}}
OUTPUT:______________
J AVA Programming 61
75. Cl ass two
{
voi d two()
{
System.out.pri ntl n(Sampl e);
}
Publ i c stati c voi d mai n (Stri ng argv[])
{
two ex=new two();
}}
OUTPUT:______________
76. Cl ass stat
{
Publ i c stati c voi d mai n (Stri ng[] args)
{
i nt j=getX();
}
Publ i c i nt getX()
{
return 5;
}}
OUTPUT:______________
77. Cl ass convert
{
Publ i c stati c voi d mai n (Stri ng args[]) {
Stri ng str;
str=50;
i nt j=I nteger.val ueof(str).i ntval ue();
System.out.pri ntl n(j);
str=50.1;
doubl e d=Doubl e.val ueof(str).doubl eval ue();
System.out.pri ntl n(d);
}}
OUTPUT:______________
78. Cl ass A
{
Publ i c stati c voi d mai n (Stri ng[] args) {
i nt x[] = {1,2};
i nt y[] = (i nt[])x.cl one();
System.out.pri nt((x= = y)+ );
x[1]++;
System.out.pri ntl n(y[1]);}}
OUTPUT:______________
62 Placement Preparation
79. i mport java.uti l .Stri ngTokeni zer;
Cl ass test
{
Publ i c stati c voi d mai n(Stri ng args[])
{
Stri ng x= 1 2 3 4;
Stri ngTokeni zer s= new Stri ngTokeni zer(x);
whi l e (s.hasMoreTokens())
System.out.pri ntl n(s.nextToken());
}}
OUTPUT:______________
80. i nt x=1+(i nt)(Math.random()*7);
What does thi s code do?
ANSWERS FOR QUESTIONS 56 TO 80
56. Error: cl osi ng brace for the cl ass i s mi ssi ng
57. OUTPUT
Centri grade equi val ent i s 20.555555C
58. OUTPUT
*****
#####
*****
#####
*****
59. OUTPUT
Arg 1: 123
Arg 2:Thi s i s the 2
nd
argument
Arg 3:thi rd
Arg 4:fourth
60. OUTPUT
Subscri pt i s 0 val ue i s 2
Subscri pt i s 1 val ue i s 6
Subscri pt i s 2 val ue i s 5
Subscri pt i s 3 val ue i s 9
61. Error: There i s no semi col on i n 3
r d
l i ne
62. Error: The vari abl e x i s not decl ared
63. OUTPUT
a=2
b=3
c=4
d=1
64. OUTPUT
a=3
b=1
c=6
J AVA Programming 63
65. OUTPUT
0 1
2 3
4 5
6 7
8 9
66. Compi l ati on error
67. OUTPUT
true
fal se
fal se
68. OUTPUT
i nsi de mai n
Excepti on i n thread mai n java.l ang.Ari thmeti cExcepti on:/by zero at
ThrowsExcepti on.mai n(ThrowsExcepti on.java:5)
69. Error:
Ex cepti on i n th r ead mai n j av a.l an g.Ar r ay I n dex Ou tofBou n ds Ex cepti on :10 at
DefExcepti on.mai n(defExcepti on.java:4)
70. Error:
The 3rd l i ne shoul d be as fol l ows:
Publ i c cl ass cl i p extends Appl et
71. Compi l ati on error
72. Runti me error: Nul l Poi nterExcepti on
73. OUTPUT
0
74. Compi l ati on error: Cannot use thi s i nsi de the constructor
75. Compi l ati on error: voi d before two()
76. Compi l ati on error: Cannot access a non-stati c member
77. OUTPUT
50 50.1
78. OUTPUT
fal se 2
79. OUTPUT
1
2
3
4
80. The code al ways assi gns an i nteger to vari abl e x i n the range between 1 and 7.

64 Placement Preparation
8
Operating System
1. What i s an operating system?
An operati ng system i s a program that manages the computer hardware. I t al so provi des
a basi s for appl i cati on programs and acts as an i ntermedi ary between the user of a
computer and the computer hardware.
2. What i s meant by a control program?
A control program manages the executi on of user programs to present errors and i mproper
use of the computer. I t i s especi al l y concerned wi th the operati on and control of I /O
devi ces.
3. What i s meant by SPOOL?
More sophi sti cated forms of I /O bufferi ng cal l ed Si mul taneous Peri pheral Operati ons
Onl i ne (SPOOL) use di sks to temporari l y store i nput and output of jobs.
4. What i s Multiprogramming?
The most i mportant aspect of job schedul i ng i s the abi l i ty to carry out mul ti programmi ng.
Mul ti pr ogr ammi ng i s an attempt to i ncr ease the CPU uti l i zati on by al ways havi ng
somethi ng for the CPU to execute. Here the CPU wi l l never be i dl e.
5. What are the types of operati ng systems (OS)?
(a) Batch OS (b) Mul ti programmi ng OS (c) Ti me-shari ng OS (d) Real -ti me systems
(e) Combi nati on OS (f) Di stri buted OS.
6. What are the acti vi ti es of an operati ng system?
Each type of operati ng system possesses the fol l owi ng aspects: (a) Processor schedul i ng
(b) Memory management (c) I /O management (d) Fi l e management.
7. What i s the purpose of Real-time systems?
I t i s used i n an envi ronment where a l arge number of events, mostl y external to the
computer system, must be accepted and processed i n a short ti me or wi thi n certai n
deadl i nes.
8. What i s a distributed operating system?
I t i s a col l ecti on of autonomous computer systems capabl e of communi cati on and
cooperati on vi a thei r hardware and software i nterconnecti ons. The key objecti ve of a
di stri buted operati ng system i s transparency.
9. Name the di fferent vi ews of an operati ng system.
Two types are: (1) command l anguage users (2) System cal l users.
Command l anguage users are those who obtai n servi ces of the operati ng system by means
of commands, say typed at the termi nal or embedded i n a batch job. System cal l users
i nvoke servi ces of the operati ng system by means of run-ti me system cal l s. These are
usual l y embedded i n and acti vated duri ng executi on of programs.
Operating System 65
10. What i s Multitasking?
I t denotes an operati ng system that supports concurrent executi on of programs on a
si ngl e pr ocessor wi thout necessar i l y suppor ti ng el abor ate for ms of memor y and fi l e
management. A mul ti programmi ng operati ng system i s al so a mul ti taski ng operati ng
system whereas the converse i s not i mpl i ed.
11. What i s Implicit tasking?
I t means that the processes are defi ned by the system. I t i s used i n general purpose
mul ti programmi ng systems such as ti me-shari ng.
12. What i s Explicit tasking?
Thi s means that programmers expl i ci tl y defi ne each process and some of i ts attri butes. I t
i s used i n si tuati ons where hi gh performance or expl i ci t control of system acti vi ti es i s
desi red.
13. What are the two fundamental rel ati ons among concurrent processes?
(a) Competi ti on (b) Cooperati on
14. What i s a process?
A process i s a program i n executi on. As a process executes, i t changes state. The state of
a process i s defi ned by that processs current acti vi ty.
15. What are the general categori es of process states?
(i) Dormant (ii) Ready (iii) Runni ng (iv) Suspended
16. What i s PCB?
The operati ng system groups al l i nformati on that i t needs about a parti cul ar process i nto
a data structure cal l ed a PCB (Process Control Bl ock) or process descri ptor.
17. What i s Scheduling?
Schedul i ng refers to a set of pol i ci es and mechani sms bui l t i nto the operati ng system that
govern the order i n whi ch the work to be done by a computer system i s compl eted.
18. What i s a Scheduler?
A Schedul er i s an operati ng system modul e that sel ects the next job to be admi tted i nto
the system and the next process to run.
19. Name the three different types of schedulers?
(i) Long-term schedul er (ii) Medi um-term schedul er (iii) Short-term schedul er.
20. What i s swapping?
Savi ng the i mage of a suspended process i n secondary storage i s cal l ed Swapping and
the process i s sai d to be swapped out or rol l ed out.
21. What ar e the cr i ter i a fol l owed by schedul er s i n thei r attempt to maxi mi ze system
performance?
(i) Processor uti l i zati on (ii) Throughput (iii) Turnaround ti me (iv) Wai ti ng ti me
(v) Response ti me.
66 Placement Preparation
22. What i s throughput?
I t i s the number of jobs whi ch are compl eted per ti me uni t.
23. Defi ne Turnaround time.
I t i s the ti me that el apses from the moment a program or a job i s submi tted unti l i t i s
compl eted by a system.
24. Defi ne Waiting time.
I t i s the ti me that a process or a job spends wai ti ng for resource al l ocati on due to contenti on
wi th others i n a mul ti programmi ng system.
25. Defi ne Response time.
I t i s the ti me that el apses from a moment the l ast character of a command l i ne l aunchi ng
a program or a transacti on i s entered unti l the fi rst resul t appears on the termi nal .
26. Name the vari ous scheduling algorithms.
(a) FCFS (Fi rst-come, Fi rst-served) schedul i ng.
(b) STRT (Shortest Remai ni ng Ti me Next) Schedul i ng.
(c) Preempti ve al gori thms.
(d) Round-Robi n al gori thms.
27. What are Multi-level/Multi Queues scheduling?
A mul ti -queue schedul i ng al gori thm has been created for a si tuati on i n whi ch jobs are
easi l y cl assi fi ed i nto di fferent groups. A mul ti -queue schedul i ng al gori thm parti ti ons the
ready queue i nto separate queues.
28. What i s Multi-level Feedback queue?
Here, jobs are permanentl y assi gned to a queue upon entry to the system. Jobs do not
move between queues.
29. What i s interprocess synchronization?
A set of protocol s and mechani sms used to preserve system i ntegri ty and consi stency
when the concurrent processes share resources that are seri al l y reusabl e.
30. What i s a critical section?
I t i s a sequence of i nstructi ons wi th a cl earl y marked begi nni ng and end. I t usual l y
safeguards updati ng of one or more shared vari abl es. Onl y the process executi ng the
cri ti cal secti on i s al l owed to access the shared vari abl e. Al l other processes shoul d be
prevented from doi ng so.
31. What i s a mutual exclusion?
I t i s a concept by means of whi ch the si ngl e process temporari l y excl udes al l others from
usi ng the shared resources.
32. Defi ne the term semaphore.
A semaphore S i s an i nteger vari abl e that, apart from the i ni ti al i zati on, can be accessed
onl y through two standard atomi c operati ons: P and V. The cl assi cal defi ni ti ons of P and
V are:
Operating System 67
Wai t (S): whi l e S<0 do ski p;
S: = S1;
Si gnal (S): S: = S+1.
A semaphore mechani sm basi cal l y consi sts of two pri mi ti ve operati ons SI GNAL and WAI T
whi ch operate on a speci al type of semaphore vari abl e.
33. What i s a binary semaphore?
A semaphore whose vari abl e i s al l owed to take on onl y the val ues of 0(busy) and 1(free) i s
cal l ed a bi nary semaphore.
34. What i s Producers/Consumers problem?
I n general , Producers/Consumers may be stated as fol l ows:
Gi ven a set of cooperati ng processes, some of whi ch produce data i tems (Producers) to
be consumed by others (Consumers), wi th possi bl e di spari ty between producti on and
consumpti on rates.
35. Why i s interprocess synchronization essenti al ?
I t i s necessary to prevent ti mi ng errors due to concurrent accessi ng of shared resources,
such as data structures or I /O devi ces by contendi ng processes.
36. What i s a monitor?
I t provi des the synchroni zati on mechani sm for shari ng abstract data types.
37. Li st the di sadvantages of semaphores.
(a) Semaphores are unstructured.
(b) They do not support data abstracti on.
(c) They encourage i nterprocess communi cati on vi a gl obal vari abl es that are protected
onl y from changes of concurrency.
38. What are the advantages of usi ng critical regions?
I t enforces restri cted usage of shared vari abl es and prevents potenti al errors resul ti ng
from i mproper use of ordi nary semaphores.
39. What i s the di sadvantage of usi ng moni tors?
I t forces the users to l i ve wi th whatever methods system desi gners may deem appropri ate
to access a gi ven resource. These are unacceptabl e to system programmers.
40. What i s a Deadlock?
A Deadl ock i s a si tuati on where a group of processes are permanentl y bl ocked as a resul t
of each process havi ng acqui red a subset of the resources needed for i ts compl eti on and
wai ti ng for rel ease of the remai ni ng resources hel d by others i n the same group thus
maki ng i t i mpossi bl e for any of the processes to proceed.
41. Li st the necessary conditions for a deadlock to take pl ace.
A deadl ock si tuati on can ri se i f and onl y i f the fol l owi ng four condi ti ons hol d si mul taneousl y
i n a system: (a) Mutual excl usi on (b) Hol d and Wai t (c) No preempti on (d) Ci rcul ar
wai t.
68 Placement Preparation
42. What i s contiguous memory allocation?
Contiguous memory allocation means that each l ogi cal object i s pl aced i n a set of
memory l ocati ons wi th stri ctl y consecuti ve addresses.
43. What i s internal fragmentation?
Wasti ng of memory wi thi n a parti ti on, due to a di fference i n si ze of a parti ti on and of the
object resi dent wi thi n i t, i s cal l ed internal fragmentation.
44. What i s external fragmentation?
Wasti ng of memory between parti ti ons due to scatteri ng of the free space i nto a number
of di sconti nuous areas i s cal l ed external fragmentation.
45. What i s PDT?
Once parti ti ons are defi ned, an operati ng system needs to keep track of thei r status, such
as free or i n use, for al l ocati on purposes. Current parti ti on status and attri butes are often
col l ected i n a data structure cal l ed the Partition Description Table (PDT).
46. What are the two ways of al l ocati ng parti ti ons i n PDT?
(a) Fi rst-fi t (b) Best-fi t.
47. What i s Buddy system?
An al l ocati on-deal l ocati on strategy, cal l ed the buddy system, faci l i tates mergi ng of free
space by al l ocati ng free areas wi th an affi ni ty to recombi ne. Si zes of free bl ocks i n a
buddy system are usual l y an i nteger power of base 2.
48. What i s Segmentation?
Segmentati on i s basi cal l y a mul ti pl e base-l i mi t versi on of parti ti oned memory. As such,
segmentati on al l ows the breakup of the vi rtual address space of a process i nto several
pi eces, each of whi ch can be assi gned a di fferent parti ti on of the physi cal memory.
49. What are the meri ts and demeri ts of Segmentati on?
The advantages are: (a) El i mi nati on of i nternal fragmentati on (b) Support for dynami c
growth of segments (c) Protecti on (d) Shari ng. The di sadvantages are: (i) Management of
segmented memory requi re comparati vel y more compl ex mechani sms than for ei ther
stati c or dynami c parti ti oni ng of memory and thus i ncurs hi gher operati ng system overhead.
(ii) Several di fferent segment base addresses may have to be used for address transl ati ons.
50. What i s Non-Contiguous memory allocation?
Non-conti guous al l ocati on means that memory i s al l ocated i n such a way that parts of a
si ngl e l ogi cal object may be pl aced i n non-conti guous areas of physi cal memory.
51. What i s virtual memory?
The memory management scheme cal l ed vi rtual memory al l ows executi on of processes
when onl y porti ons of thei r address spaces are resi dent i n the pri mary memory.
52. What i s demand paging/demand segmentation?
Dependi ng on whether pagi ng or segmentati on i s used to manage physi cal memory, vi rtual
memory management i s referred to as demand pagi ng or demand segmentati on.
Operating System 69
53. What i s paging?
Paging i s a memory management scheme that removes the requi rement of conti guous
al l ocati on of the physi cal memory. Basi cal l y, the physi cal memory i s di vi ded i nto a number
of fi xed-si ze sl ots cal l ed page frames. The vi rtual address space of a process i s al so spl i t
i nto fi xed-si ze bl ocks of the same si ze cal l ed pages.
54. What i s thrashing?
A very hi gh pagi ng acti vi ty i s cal l ed thrashing. A process i s thrashi ng i f i t i s spendi ng
more ti me pagi ng than executi ng. Thrashi ng can cause severe performance probl ems.
55. What i s the concept behi nd overlays?
A techni que cal l ed overlays i s someti mes used to al l ow a program to be l arger than the
amount of memory al l ocated to i t. The i dea of overl ays i s to keep i n memory onl y those
i nstructi ons and data that are needed at any gi ven ti me.
56. What are seek time, rotational latency and transfer time?
Seek time i s the ti me necessary for the read/wri te heads to travel to the target cyl i nder.
Rotational latency i s the ti me spent wai ti ng for the target sector to appear under the
read/wri te heads. Transfer time i s the ti me necessary to transfer a sector between the
di sk and the memory buffer.
57. What i s disk fragmentation?
Di sk uti l i zati on refers to the percentage of di sk space al l ocatabl e to users. One of the
pri mary contri buti ons to l ow di sk uti l i zati on i s di sk fragmentati on whi ch occurs when
free bl ocks are avai l abl e but the system i s unabl e to al l ocate them to requesti ng users.
58. What i s meant by file organization?
Fi l e or gani zati on r efer s to the manner i n whi ch the r ecor ds of a fi l e ar e ar r anged
on secondary storage. They are: (1) Sequenti al (2) I ndexed Sequenti al (3) Di rect and
(4) Parti ti oned.
59. What are the characteri sti cs of a file?
Fi l es may be characteri zed by (1) Vol ati l i ty (2) Acti vi ty and (3) Si ze.
60. What i s a thread?
A thread, someti mes cal l ed a lightweight process (LWP), i s a basi c uni t of CPU
uti l i zati on; i t compri ses of a thread I D, a program counter, a regi ster set and a stack.
61. What i s multithreading?
A mul ti threaded process contai ns several di fferent fl ows of control wi thi n the same address
space. The benefi ts of mul ti threadi ng i ncl ude i ncreased responsi veness to the user, resource
shari ng wi thi n the process, economy and the abi l i ty to take advantage of mul ti processor
archi tectures.
62. What are the basic services provi ded by an operati ng system?
(a) Program executi on (b) I /O operati ons (c) Fi l e system mani pul ati on (d) Communi cati ons
(e) Error detecti on
70 Placement Preparation
63. What are system calls?
I t provi des the i nterface between a process and the operati ng system. These cal l s are
general l y avai l abl e as assembl y-l anguage i nstructi ons, and they are usual l y l i sted i n the
vari ous manual s used by the assembl y-l anguage programmers.
64. Li st the types of system calls.
(a) Process control (b) Fi l e management (c) Devi ce management (d) I nformati on mai ntenance
(e) Communi cati ons.
65. What are the features of the UNIX operating system?
Portabi l i ty, Machi ne-i ndependence, Mul ti -user operati ons, Hi erarchi cal fi l e system, UNI X
shel l , Pi pes and Fi l ters, Uti l i ti es and Background processi ng.
66. What type of an operati ng system i s the UNI X?
The UNI X operati ng system i s a mul ti -programmi ng, ti me-shari ng, and mul ti -taski ng
system.
67. What are the components of UNIX?
Kernel , UNI X uti l i ti es and appl i cati on software are the components of the UNI X.
68. Li st the types of files in UNIX.
Ordi nary fi l es, Di rectory fi l es and Speci al fi l es.
69. Li st the various types of users in UNIX.
System admi ni strator, Fi l e owner, Group owner and other users.
70. What i s a Shell?
A Shell i s an i ntermedi ary program whi ch i nterprets the commands that are typed at the
termi nal , and transl ates them i nto commands that the kernel understands.
71. Li st the vari ous types of shel l s.
The shel l runs l i ke any other program under the UNI X system. Some of the popul ar
shel l s are: Bourne shel l , C shel l , Korn shel l and restri cted shel l .
72. Name the directory i n whi ch user wi l l be worki ng i n UNI X.
/usr/bi n
73. Li st the si mpl e directory commands i n UNI X.
(a) pwd (pri nt worki ng di rectory) command i s used to di spl ay the ful l path-name of the
current di rectory. $pwd<enter>
(b) The cd (Change di rectory) command changes the current di rectory to the di rectory
speci fi ed.
(c) The mkdi r (make di rectory) command i s used to create di rectori es.
(d)The rmdi r (remove di rectory) removes the di rectory speci fi ed.
74. How wi l l you l i st the contents of a di rectory i n UNI X?
The l s command i s used to di spl ay the names of fi l es and subdi rectori es i n a di rectory.
$l s /user/games <enter>
Operating System 71
75. What wi l l be the output of l s l command?
$ l s l /user/games<enter>
total 3
- r w r - - r - - 1 games staff 12 Apr 1 10:10 abc
- r w x r w x r w x 1 games staff 15 Apr 1 10:11 xyz
d r w x r w x r - - 2 games staff 30 Feb 1 11:10 pqr
There are ni ne col umns above and they represent:
Column 1 Column 2 Column 3 Column 4 Column 5 Column 6,7,8 Column 9
Day and ti me
Fi l e type Number Fi l e Group Fi l e si ze of l ast Name
of Li nks owner owner (i n bytes) modi fi cati on fi l e
to the fi l e.
The fi rst character i n col umn 1 can be - (ordi nary fi l e), d(di rectory fi l e) or speci al fi l e.
76. How wi l l you di spl ay the contents of a fi l e?
The cat (concatenate) command di spl ays the contents of the fi l e speci fi ed.
$ cat data10 <enter>
exampl e fi l e
77. What i s the use of who command?
The who command i s used to di spl ay the names of al l users who are currentl y l ogged i n.
The who am I command di spl ays the name of current users.
78. Li st the Wildcard characters i n UNI X.
Character Purpose
[ ] Matches exactl y one of a speci fi ed set of characters.
? Matches exactl y one character.
* Matches none or one character or a stri ng of more than one characters.
79. What i s FAP?
File Access Permissions (FAP) refers to the permi ssi ons associ ated wi th a fi l e wi th
respect to the fol l owi ng:
(a) Fi l e owner (b) Group owner (c) Other users. The fi l e read permi ssi on i s denoted by r,
wri te w and execute x i n the fi rst col umn of output of l s-l command.
80. What i s the use of chmod command?
Access permi ssi ons associ ated wi th a fi l e or di rectory can be changed usi ng the chmod
command. Permi ssi ons associ ated wi th a fi l e can be changed onl y by the owner of the
fi l e.
81. What i s vi edi tor?
The vi stands for vi sual edi tor, used to enter and edi t text fi l es contai ni ng data, documents
or programs. I t di spl ays the contents of fi l es on the screen, and al l ows the user to add,
i nsert, del ete or change parts of text.
72 Placement Preparation
82. How wi l l you i nvoke the vi edi tor?
$ vi fi l e name <enter>
83. What i s a filter?
A fi l ter i s a program that takes i ts i nput from the standard i nput fi l e, processes (or fi l ters)
i t and sends i ts output to the standard output fi l e. Exampl es of fi l ters i n the UNI X are:
grep, cat, pg, wc, tr and cut.
84. What are the opti ons avai l abl e wi th grep fi l ter?
The grep command has opti ons whi ch al ter the output of the command. These are:
-n Thi s pri nts each l i ne matchi ng the pattern al ong wi th i ts l i ne number.
-c Thi s pri nts onl y a count of the l i nes that match a pattern
-v Thi s pri nts out al l those l i nes that do not match the pattern speci fi ed by
regul ar expressi on
86. What i s a cut filter?
I t i s useful when speci fi c col umns from the output of certai n commands need to be
extracted.
Exampl e:
$ who > temp1<enter>
$ tr s temp1 > temp2 <enter>
$ cut d f1 temp2 <enter>
87. What are the options of cut filter?
Cut d Speci fi es the col umn del i mi ter
Cut c Di spl ays the character
Cut f Di spl ays the col umns speci fi ed
88. What i s a Pipe?
Pi pe i s a feature by whi ch the standard output of a command or user program can be sent
as the standard i nput to another command or user program.
89. What i s the use of the echo command?
The echo command i s used to di spl ay messages on the screen.
90. How are variables handl ed i n UNI X?
Vari abl es i n shel l scri pts do not have associ ated data types. That i s, they are not decl ared
to be i ntegers or characters. Al l vari abl es i n UNI X are treated as character stri ngs.
91. How are comments used i n UNI X?
Comments whi ch are requi red to be i gnored by the shel l can be i ncl uded by prefi xi ng
them wi th the #symbol .
92. What are environmental variables i n UNI X?
Theses are speci al vari abl es created by the shel l . Exampl es are PATH, HOME and
LOGNAME
Operating System 73
93. Gi ve exampl es of a multi-user operating system.
UNI X, Sol ari s for SUN workstati ons, OS/2 for PS/2 machi nes and VMS (Vi rtual Memory
System) for VAX machi nes.
94. What are the rul es for handl i ng passwords i n UNI X?
A user password i n UNI X cannot be l ess than 6 or more than 14 characters, but i t can
contai n any character i n the keyboard character set.
95. What are the languages supported by UNIX?
UNI X system supports a wi de vari ety of l anguages namel y C, PASCAL, ADA, COBOL,
BASI C, LI SP and PROLOG.

Computer Networks 75
11. What i s a host?
A WAN consi sts of a col l ecti on of machi nes i ntended for runni ng user (i .e. appl i cati on)
programs. These machi nes are cal l ed Machine hosts. The hosts are connected by a
communication subnet or just subnet.
12. What are the two components of a subnet?
(i) Transmi ssi on l i nes (ii) Swi tchi ng el ements.
13. What i s internet?
A col l ecti on of i nterconnected networks i s cal l ed an internetwork or just INTERNET.
14. What i s a protocol?
A protocol i s an agreement between the communi cati ng parti es on how communi cati on i s
to proceed. A set of l ayers and protocol s i s cal l ed a Network Architecture. A l i st of
protocol s used by a certai n system, one protocol per l ayer, i s cal l ed a PROTOCOL STACK.
15. What are connecti on-ori ented and connecti onl ess servi ces?
Layers can offer two di fferent types of servi ces to the l ayers above them. They are:
(a) Connecti on-ori ented servi ce (b) Connecti onl ess servi ce
Connecti on-ori ented servi ce i s model ed after the tel ephone system. To use a connecti on-
or i ented networ k ser vi ce, the ser vi ce user fi r st establ i shes a connecti on, uses the
connecti on and then rel eases the connecti on. Connecti onl ess servi ce i s model ed after the
postal system. Each servi ce can be characteri zed by a qual i ty of servi ce.
16. Name the two network architectures consi dered i mportant.
(a) OSI Reference Model (b) TCP/I P Reference Model .
17. What i s the OSI Model?
Thi s model i s based on a proposal devel oped by the I nternati onal Standards Organi zati on
(I SO) as a fi rst step towards i nternati onal standardi zati on of the protocol s used i n the
vari ous l ayers. The model i s cal l ed the Open Systems I nterconnecti on Reference Model
because i t deal s wi th connecti ng open systems (i .e.) the systems that ar e open for
communi cati on wi th other systems.
18. What i s the TCP/IP model?
The TCP/I P (Transmi ssi on Control Protocol /I nternet Protocol ) Reference Model i s the
archi tecture whi ch has the abi l i ty to connect mul ti pl e networks together i n a seaml ess
way.
19. What are the l ayers avai l abl e i n the OSI model and the TCP/I P model ?
The seven l ayers of the OSI model are (1) Physi cal l ayer (2) Data l i nk l ayer (3)Transport
l ayer (4) Sessi on l ayer (5) Presentati on l ayer (6) Appl i cati on l ayer (7) Network l ayer
20. What i s the purpose of the physical layer?
I t i s used to transport a raw bi t stream from one machi ne to another. Vari ous physi cal
medi a can be used for transmi ssi on namel y (a) Magneti c medi a (b) Twi sted pai r (c) Baseband
coaxi al cabl e (d) Broadband coaxi al cabl e (e) Fi ber opti cs
76 Placement Preparation
21. What are the major probl ems i n transmi ssi on l i nes?
(i) Attenuati on (ii) Del ay di storti on (iii) Noi se.
22. What i s a MODEM?
A devi ce that accepts a seri al stream of bi ts as i nput and produces a modul ated carri er as
output (or vi ce versa) i s cal l ed a MODEM (Modulator-Demodulator).
23. What i s a NULL MODEM?
A MODEM i s cal l ed NULL MODEM whi ch connects the transmi t l i ne of one machi ne to
the recei ve l i ne of the other. I t al so crosses some of the other l i nes i n a si mi l ar way. A
NULL MODEM l ooks l i ke a short cabl e.
24. What are the vari ous multiplexing schemes?
FDM Frequency Di vi si on Mul ti pl exi ng
TDM Ti me Di vi si on Mul ti pl exi ng
WDM Wavel ength Di vi si on Mul ti pl exi ng
25. Name the two switching techniques.
Ci rcui t swi tchi ng and Packet swi tchi ng
26. Compare Circuit switching and Packet switching.
When a computer pl aces a tel ephone cal l , the swi tchi ng equi pment wi thi n the tel ephone
system seeks out a physi cal copper path al l the way from the tel ephone l i ne to the recei vers
tel ephone. Thi s techni que i s cal l ed the ci rcui t swi tchi ng. Packet swi tchi ng networks
pl ace a ti ght upper l i mi t on bl ock si ze, al l owi ng packets to be buffered i n router mai n
memory i nstead of on di sk. Thi s swi tchi ng network i s wel l sui ted to handl e i nteracti ve
traffi c.
27. What i s Narrowband ISDN?
I t i s a ci rcui t-swi tched di gi tal system that i s an i ncremental i mprovement over the current
system.
28. What i s broadband ISDN?
I t represents a paradi gm shi ft, si nce i t i s based on cel l swi tchi ng ATM technol ogy. Vari ous
ki nds of ATM swi tches exi st i ncl udi ng knockout swi tch, and the Batcher-Banyan swi tch.
A Broadband I SDN i s a di gi tal vi rtual ci rcui t for movi ng fi xed si ze packets from servi ce to
desti nati on at 155 Mbps.
29. What i s meant by a communication satellite?
A communi cati on satel l i te can be thought of as a bi g mi crowave repeater i n the sky. I t
contai ns several transponders, each of whi ch l i stens to some porti on of the spectrum,
ampl i fi es the i ncomi ng si gnal , and then rebroadcasts i t at another frequency, to avoi d
i nterference wi th the i ncomi ng si gnal .
30. Name the vari ous framing methods.
(a) Character count (b) Starti ng and endi ng character wi th character stuffi ng
(c) Starti ng and endi ng fl ags wi th bi t stuffi ng (d) Physi cal l ayer codi ng vi ol ati ons.
Computer Networks 77
31. Name the el ementary data link protocols.
(a) An Unrestri cted si mpl ex protocol
(b) A si mpl ex stop and wai t protocol
(c) A si mpl ex protocol for a noi sy channel
32. What i s Piggybacking?
The techni que of temporari l y del ayi ng outgoi ng acknowl edgements so that they can be
hooked onto the next outgoi ng data frame i s known as Piggybacking.
33. What i s the key i ssue i n broadcast network?
I n any broadcast network, the key i ssue i s how to determi ne who gets to use the channel
when there i s competi ti on for i t. Broadcast channel s are someti mes referred to as multi-
access channels or random access channels.
34. What i s MAC?
The protocol used to determi ne who goes next on a mul ti -access channel bel ongs to a
subl ayer of the data l i nk l ayer cal l ed the MAC (Medi um Access Control ) subl ayer. The
MAC subl ayer i s i mportant i n LAN, whi ch uses broadcast networks.
35. Compare pure ALOHA and slotted ALOHA.
I n pure ALOHA, frames are transmi tted compl etel y at arbi trary ti me. Sl otted ALOHA
requi res gl obal ti me synchroni zati on. The best we hope for channel uti l i zati on i n pure
ALOHA i s 18 percent. For sl otted ALOHA, i t i s 37 percent.
36. What i s a carrier sense protocol?
Protocol s i n whi ch stati ons l i sten for a carri er (i .e. transmi ssi on) and act accordi ngl y are
cal l ed carrier sense protocols.
37. What are the three cl asses of traffi c supported by a protocol ?
(i) Constant data rate connecti on-ori ented traffi c
(ii)Vari abl e data rate connecti on-ori ented traffi c
(iii)Datagram traffi c
38. What are wireless LAN protocols?
A system of portabl e computers that communi cate by radi o can be regarded as a wi rel ess
LAN. These LANs requi res speci al MAC (Medi um Access Control ) subl ayer protocol s.
39. Name the IEEE standard 802 for LAN and MAN.
I EEE standard 802.3 = Ethernet
I EEE standard 802.4 = Token Bus
I EEE standard 802.5 = Token Ri ng
I EEE standard 802.6 = Di stri buted Queue Dual Bus
I EEE standard 802.2 = Logi cal Li nk Control
40. What i s a Repeater?
To al l ow l arger networks, mul ti pl e cabl es can be connected by repeaters. A repeater i s a
physi cal l ayer devi ce. I t recei ves, ampl i fi es and retransmi ts si gnal s i n both di recti ons.
78 Placement Preparation
41. What i s Manchester Encoding?
The recei ver shoul d determi ne the start, end or mi ddl e of each bi t wi thout reference to
an exter nal cl ock. Two such appr oaches ar e cal l ed Manchester Encoding and
Differential Manchester Encoding.
42. What are the functions of vari ous l ayers i n the OSI reference model ?
(i) The physi cal l ayer i s concerned wi th transmi tti ng raw bi ts over a communi cati on
channel . (ii) The mai n task of the data l i nk l ayer i s to take a raw transmi ssi on faci l i ty
and transform i t i nto a l i ne that appears free of transmi ssi on error to the network l ayer.
(iii) The network l ayer i s concerned wi th control l i ng the operati on of the subnet. (iv) The
basi c functi on of the transparent l ayer i s to accept data from the sessi on l ayer, spl i t i t up
i nto smal l er uni ts i f need be, pass these to the network l ayer, and ensure that the pi eces
al l arri ve correctl y at the other end. (v) The sessi on l ayer al l ows users on di fferent machi nes
to establ i sh sessi ons between them. I t provi des two servi ces namel y token management
and synchroni zati on. (vi) The presentati on l ayer i s concerned wi th the syntax and semanti cs
of the i nformati on transmi tted. (vii) The appl i cati on l ayer contai ns a vari ety of protocol s
that are commonl y needed.
43. What are the properti es requi red for a routing algorithm?
Correctness, si mpl i ci ty, robustness, stabi l i ty, fai rness and opti mal i ty.
44. How are routing algorithms cl assi fi ed?
Routi ng al gori thms are cl assi fi ed i nto two major cl asses namel y non-adapti ve and adapti ve.
Non-adapti ve al gori thms do not base thei r routi ng deci si ons on measurements or esti mates
of the current traffi c and topol ogy, whereas adapti ve ones do. Adapti ve al gori thms can be
further subdi vi ded i nto central i zed, i sol ated and di stri buted.
45. What i s flooding?
I t i s an extreme form of i sol ated routi ng, i n whi ch every i ncomi ng packet i s sent out on
every outgoi ng l i ne except the one i t arri ved on.
46. What i s a Client-server model?
Communi cati on al ways takes the form of request-repl y pai rs, al ways i ni ti ated by the
cl i ents, never by the ser ver . Thi s model i s cal l ed the cl i ent-ser ver model . I n the
cl i ent-server model , the cl i ent sends a request and the server sends a repl y.
47. What i s RPC?
Remote Procedure Call (RPC) can be vi ewed as a ki nd of connecti onl ess sessi on. I n
thi s model , when a cl i ent cal l s a remote procedure, the cal l i s actual l y made to a l ocal
stub. Thi s stub marshal s the parameters and transmi ts a request message to the server.
When the message arri ves, the parameters are unmarshal l ed and the server procedure i s
cal l ed. The resul t traces the same path i n the reverse di recti on.
48. What are Plaintext and Cipher text?
The messages to be encrypted known as the pl ai ntext are transformed by a functi on that
i s parameteri zed by a key. The output of the encrypti on process, known as the Ci pher
text or Cryptogram, i s then transmi tted, often by messenger.
49. What i s Cryptanalysis?
The art of breaki ng of ci phers i s cal l ed Cryptanalysis. The art of devi si ng ci phers
(Cryptography) and breaki ng them (Cryptanal ysi s) i s col l ecti vel y known as CRYPTOLOGY.
Computer Networks 79
50. What are the three ways of data exchange?
Si mpl ex, Hal f-dupl ex and Ful l -dupl ex.
51. Name the vari ous topologies for networks.
Bus topol ogy, Star topol ogy, Ri ng topol ogy and Mesh network.
52. Compare gateway and router.
Gateways operate i n al l seven l ayers of the OSI model . Routers operate i n the physi cal ,
data l i nk and network l ayers.
53. What i s a brouter?
They are hybri d devi ces that have the capabi l i ty to combi ne the features of both bri dges
and routers.
54. What i s a Subnet?
I t i s a generi c term for a secti on of l arge networks whi ch are usual l y separated by a
bri dge or router.
55. Defi ne bandwidth.
Bandwi dth i s the amount of i nformati on that can be sent over a gi ven transmi ssi on channel .
56. Expand the following: I CMP, ARP, RARP, TFTP, FTP, OSPF, SLI P and RI P.
I CMP I nternet Control Message Protocol
ARP Address Resol uti on Protocol
RARP Reverse Address Resol uti on Protocol
TFTP Tri vi al Fi l e Transfer Protocol
FTP - Fi l e Transfer Protocol
OSPF Open Shortest Path Fi rst Protocol
SLI P Seri al Li ne I nternet Protocol
RI P Routi ng I nformati on Protocol
57. Why i s the HELLO protocol preferred?
The HELLO protocol uses ti me i nstead of di stance to determi ne opti mal routi ng.
58. What i s the speci al feature of anonymous FTP?
Anonymous FTP enabl es users to connect to a host wi thout usi ng a val i d l ogi n and
password.
59. Name the vari ous types of servers.
Fi l e servers, database servers, transacti on servers, web servers and object servers.
60. What i s multicast routing?
Sendi ng a message to a group i s cal l ed mul ti casti ng and i ts routi ng al gori thm i s cal l ed
multicast routing.

80 Placement Preparation
10
Digital Principles and
Microprocessor
1. What i s the mai n di fference between analog and digital operations?
The di fference between anal og and di gi tal operati ons i s the way the l oad l i ne i s used.
Wi th anal og ci rcui ts, adjacent poi nts on the l oad l i ne may be used, so that the output
vol tage i s conti nuous. Di gi tal ci rcui ts are di fferent. Al most al l di gi tal ci rcui ts are desi gned
for twostate operati on.
2. What i s a gate?
A di gi tal ci rcui t wi th one or more i nput vol tages but onl y one output vol tage.
3. Defi ne AND Gate and OR Gate.
A gate wi th two or more i nputs i s cal l ed AND gate. The output i s hi gh onl y when al l
i nputs are hi gh. A gate wi th two or more i nputs i s cal l ed OR gate where the output i s
hi gh when any i nput i s hi gh.
4. What i s an inverter?
A gate wi th onl y one i nput and a compl emented output.
5. Defi ne a Nibble.
A Ni bbl e i s a bi nary number wi th 4 bi ts.
6. What i s timing diagram?
The pi cture that shows the i nputoutput waveforms of a l ogi c ci rcui t i s cal l ed a timing
diagram.
7. Defi ne a Truth Table.
A tabl e that shows al l of the i nputoutput possi bi l i ti es of a l ogi c ci rcui t.
8. What are the two fundamental approaches i n l ogi c desi gn?
Sumofproducts method and productofsums method.
9. State the DoubleInversion rule.
I t states that A = A, whi ch shows that the doubl e compl ement of a vari abl e equal s the
vari abl e.
10. How wi l l you execute dual property?
The dual pr oper ty i s obtai ned by changi ng the OR si gn to an AND si gn, and by
compl ementi ng the 0 to get a 1.
11. What i s a Karnaugh map?
A Karnaugh map i s a vi sual di spl ay of the fundamental products needed for a Sumof
products sol uti on.
Digital Principles and Microprocessor 81
12. What i s a Quad?
A quad i s a group of four ones that i s hori zontal l y or verti cal l y adjacent.
13. State the Dont care condition.
An i nputoutput condi ti on that never occurs duri ng normal operati on i s cal l ed Dont
care condition.
14. What i s a Multiplexer?
Mul ti pl ex means many i nto one. A mul ti pl exer i s a ci rcui t wi th many i nputs but onl y one
output.
15. What i s Demultiplexer?
Demul ti pl exer means one i nto many. A demul ti pl exer i s a l ogi c ci rcui t wi th one i nput and
many outputs.
16. What are Decoder and Encoder?
A Decoder i s si mi l ar to a demul ti pl exer, wi th one excepti onthere i s no data i nput. An
Encoder converts an acti ve i nput si gnal i nto a coded output si gnal .
17. What i s PAL?
Programmabl e Array Logi c (PAL) i s a programmabl e array of l ogi c gates on a si ngl e chi p.
I t i s di fferent from a PROM because i t has a programmabl e AND array and a fi xed OR
array.
18. What i s a Strobe?
An i nput that di sabl es or enabl es a ci rcui t.
19. What i s FullAdder and HalfAdder?
Ful l Adder i s a l ogi c ci rcui t wi th three i nputs and two outputs. The ci rcui t adds 3 bi ts at
a ti me, gi vi ng a sum and a carry output. Hal fAdder i s a l ogi c ci rcui t wi th two i nputs and
two outputs. I t adds 2 bi ts at a ti me, produci ng a sum and a carry output.
20. Name the Bipolar families.
The fol l owi ng fami l i es bel ong to the bi pol ar category: (1) DTL (Di odetransi stor l ogi c) (2)
TTL (Transi stortransi stor l ogi c) (3) ECL (Emi ttercoupl ed l ogi c).
21. Name the MOS families.
These fami l i es are i n the metal -oxi de semi conductor (MOS) category:
(a) PMOS = p-channel MOSFET
(b) NMOS = n-Channel MOSFET
(c) CMOS = Compl i mentary MOSFET
MOSFET stands for MOS fi el d effect transi stors.
22. What i s a bus?
A bus i s a group of wi res that transmi t bi nary data.
23. What i s noise immunity?
The amount of noi se vol tages that causes unrel i abl e operati on.
82 Placement Preparation
24. What i s saturation delay time?
The ti me del ay encountered when a transi stor tri es to come out of the saturati on regi on.
25. What i s CMOS?
Compl ementar y metal -oxi de semi conductor (CMOS) devi ces ar e chi ps that combi ne
p-channel and n-channel MOSFETs i n a pushpul l arrangement.
26. What i s a flip-flop?
An el ectroni c ci rcui t that has two stabl e states i s cal l ed a fl i p-fl op.
27. Defi ne Hold time.
The mi ni mum amount of ti me that data must be present after the cl ock tri gger arri ves i s
cal l ed Hold time.
28. Defi ne Edge Triggering.
Edge Tri ggeri ng i s a ci rcui t that responds onl y when the cl ock i s i n transi ti on between i ts
two vol tage states.
29. What i s a clock?
A cl ock i s a peri odi c waveform that i s used as a synchroni zi ng si gnal i n a di gi tal system.
30. What i s Monostable?
A Monostabl e i s a ci rcui t that has two output states, onl y one of whi ch i s stabl e.
31. What i s a shift register?
A group of fl i pfl ops connected i n such a way that a bi nary number can be shi fted i nto or
out of the fl i pfl ops i s cal l ed a shift register.
32. Defi ne a ring counter.
A ri ng counter i s a basi cshi ft regi ster wi th di rect feedbacksuch that the contents of
the regi ster si mpl y ci rcul ate around the regi ster when the cl ock i s runni ng.
33. What i s a counter?
A counter i s probabl y one of the most useful and versati l e subsystems i n a di gi tal system.
A counter dri ven by a cl ock can be used to count the number of cl ock cycl es.
34. What i s Dynamic memory?
Dynami c memory i s a memory whose contents must be restored peri odi cal l y.
35. What are Field-programmable and Mask-programmable?
A PROM that can be programmed by the user i s cal l ed fi el dprogrammabl e and a PROM
that can be programmed onl y by the manufacturer i s cal l ed maskprogrammabl e.
36. What are Hard saturation and Soft saturation?
Har d satur ati on means the tr ansi stor has suffi ci ent base cur r ent to be satur ated
under al l operati ng condi ti ons. Soft saturati on means the transi stor i s barel y saturated.
The base current i s just enough to operate the transi stor at the upper end of the l oad
l i ne.
Digital Principles and Microprocessor 83
37. What i s a Microprocessor?
A Mi croprocessor i s a programmabl e l ogi c devi ce, desi gned wi th regi sters, fl i psfl ops and
ti mi ng el ements. The mi croprocessor has a set of i nstructi ons desi gned i nternal l y to
mani pul ate data and communi cate wi th peri pheral s.
38. What i s MasterSlave triggering?
A type of tri ggeri ng usi ng two cascade l atches cal l ed the Master and the Sl ave. The
master i s cl ocked duri ng the posi ti ve hal f cycl e of the cl ock and the sl ave i s tri ggered
duri ng the negati ve hal f cycl e.
39. What i s stack pointer?
The stack poi nter i s 16 bi ts l ong. Al l stack operati ons wi th the 8085 mi croprocessor use
16 bi t regi ster pai rs. The stack poi nter contai ns the address of the l ast data byte wri tten
i nto the stack.
40. What i s program counter?
The program counter i s 16 bi ts l ong to address up to 64 k of memory. I t usual l y addresses
the next i nstructi on to be executed.
41. What are the addressing modes of 8085 mi croprocessor?
The 8085 mi croprocessor has the fol l owi ng fi ve addressi ng modes:
(1) DI RECT (2) REGI STER (3) REGI STER I NDI RECT
(4) I MPLI ED OR I NHERENT (5) I MMEDI ATE.
42. Name the four onebyte 8085 interrupt instructions.
(1) DI (2) EI (3) RIM (4) SI M.
43. What are SID and SOD?
The Seri al I nput Data (SI D) and Seri al Output Data (SOD) l i nes are associ ated wi th the
8085 seri al I /O transfer. The SOD l i ne can be used to output the most si gni fi cant bi t of
the accumul ator . The SI D si gnal can be i nput i nto the most si gni fi cant bi t of the
accumul ator.
44. What are HOLD and HLDA si gnal s?
The HOLD and HLDA si gnal s are used for the DMA (Di rect Memory Access) type of data
transfer. The HOLD functi on i s acknowl edged by the 8085 by pl aci ng a HI GH output on
the HLDA pi n.
45. What i s TRAP?
TRAP i s a nonmaskabl e i nterrupt; (i .e.) i t cannot be enabl ed or di sabl ed by an i nstructi on.
The TRAP has the hi ghest property.
46. What are the advantages of RIM instruction?
RI M i nstructi on can be used to read the i nterrupt pendi ng bi ts i n the accumul ator. These
bi ts can then be checked by software to determi ne whether any hi gher pri ori ty i nterrupts
are pendi ng.
47. What are the meri ts of SIM instruction?
SI M i s a 1 byte i nstructi on. Thi s i nstructi on reads the contents of the accumul ator and
enabl es or di sabl es the i nterrupts accordi ng to the contents of the accumul ator.
84 Placement Preparation
48. What i s DMA?
The Di rect Memory Access (DMA) i s a process of communi cati on or data transfer control l ed
by external peri pheral s. The si tuati on, where the mi croprocessor control l ed data transfer
i s too sl ow, the DMA i s general l y used.
49. Speci fy the general features of INTEL 8086.
The 8086 i s I ntel s fi rst 16bi t mi croprocessor. I ts desi gn i s based on the 8080 but i t i s not
di rectl y compati bl e wi th 8080. The 8086 i s desi gned usi ng the HMOS technol ogy and
contai ns approxi matel y 29000 transi stors.
50. Name the si x one bi t fl ags of the 8086 mi croprocessor.
Auxi l i ary fl ag, carry fl ag, overfl ow fl ag, pari ty fl ag, zero fl ag and si gn fl ag.
51. Name the three control bi ts fl ag of the 8086 mi croprocessor.
Di recti on fl ag, I nterrupt fl ag and Trace fl ag.
52. Name the 8086 Addressing modes.
(a) Addressi ng modes for accessi ng immediate and register data.
(b) Addressi ng modes for accessi ng data i n memory.
(c) Addressi ng modes for accessi ng I /O ports.
(d) Rel ati ve addressi ng mode.
(e) I mpl i ed Addressi ng mode.
53. What i s String Addressing Mode?
The stri ng mode uses i ndex regi sters. I t al l ows stri ng memory operati ons.
54. What i s ASM86?
The ASM86 i s the assembl er wri tten by I NTEL for the 8086 mi croprocessor.
55. Name the ASM86 assembler directives.
(1) SEGMENT (2) ENDS (3) ASSUME (4) DUP
56. What i s Assembly Language Programming?
I t i s a programmi ng l anguage i n whi ch the programmer can use mnemoni c i nstructi on
codes, l abel s, and names to refer di rectl y to thei r bi nary equi val ents. An assembl er i s
used to convert the assembl y l anguage i nto a machi ne l anguage program.

DBMS, RDBMS and DDBMS 85
11
DBMS, RDBMS and DDBMS
1. What i s DBMS?
A Database Management System (DBMS) consi sts of a col l ecti on of i nterrel ated data and
a set of programs to access those data. There are two other systems to manage database
namel y RDBMS (Rel ati onal Database Management System) and DDBMS (Di stri buted
Database Management System).
2. What i s a database?
The Col l ecti on of data, usual l y referred to as the database, contai ns i nformati on about
one parti cul ar enterpri se.
3. What i s the pri mary goal of a DBMS?
The pri mary goal of a DBMS i s to provi de an envi ronment that i s both conveni ent and
effi ci ent to use i n retri evi ng and stori ng database i nformati on.
4. What are the three l evel s of data abstraction i n DBMS?
Physi cal l evel , l ogi cal l evel , and vi ew l evel .
5. What i s the di fference between the i nstance of the database and the database schema?
The col l ecti on of i nformati on stored i n the database at a parti cul ar moment i s cal l ed an
i nstance of the database. The overal l desi gn of the database i s cal l ed the database schema.
6. What i s data independence? How i t i s cl assi fi ed?
The abi l i ty to modi fy a schema defi ni ti on at one l evel wi thout affecti ng a schema defi ni ti on
i n the next hi gher l evel i s cal l ed data i ndependence. Ther e ar e two l evel s of data
i ndependence:
(1) Physi cal data i ndependence
(2) Logi cal data i ndependence
7. What i s a Data model?
Underl yi ng the structure of a database i s the data model : a col l ecti on of conceptual tool s
for descri bi ng data, data rel ati onshi ps, data semanti cs and consi stency constrai nts.
8. Name the vari ous data model s.
Object-based l ogi cal model , Record-based l ogi cal model and Physi cal model .
9. What i s an E-R data model?
I t i s an object based l ogi cal model . I t i s based on a percepti on of a real worl d that consi sts
of a col l ecti on of basi c objects cal l ed enti ti es and of rel ati onshi ps among these objects.
10. What i s mapping cardinality?
I t expresses the number of enti ti es to whi ch another enti ty can be associ ated vi a a
rel ati onshi p set.
86 Placement Preparation
11. Name the three most wi del y accepted record-based data model s.
Rel ati onal model , Network model and Hi erarchi cal model .
12. How do we handl e a database system?
A database system provi des two di fferent types of l anguages: one to speci fy the database
schema and the other to express database queri es and updates.
13. What i s DDL?
A database schema i s speci fi ed by a set of defi ni ti ons expressed by a speci al l anguage
cal l ed Data Definition Language (DDL).
14. What i s a data dictionary?
The resul t of compi l ati on of DDL statements i s a set of tabl es that i s stored i n a speci al
fi l e cal l ed data di cti onary or data di rectory. I t contai ns metadata.
15. What i s DML?
A data mani pul ati on l anguage (DML) i s a l anguage that enabl es users to access or
mani pul ate data as organi zed by the appropri ate data model .
16. Name the two basic types of DML.
Procedural DML and non-procedural DML
17. What i s a query?
A query i s a statement requesti ng retri eval of i nformati on. The porti on of a DML that
i nvol ves i nformati on retri eval i s cal l ed a query language.
18. What i s a transaction?
A transacti on i s a col l ecti on of operati ons that performs a si ngl e l ogi cal functi on i n a
database appl i cati on. Each transacti on i s a uni t of both atomi ci ty and consi stency.
19. What i s a storage manager?
A storage manager i s a program modul e that provi des the i nterface between the l ow-l evel
data stored i n the database and the appl i cati on programs and queri es submi tted to the
system.
20. What i s the rol e of a DBA?
The functi ons of the DBA (Database Administrator) i ncl ude the schema defi ni ti on,
stor age str uctur e and access-method defi ni ti on, schema and physi cal or gani zati on
modi fi cati on, access ri ghts and i ntegri ty of data.
21. Name the four di fferent types of database system users.
Appl i cati on programmers, sophi sti cated users, speci al i zed users and nave users.
22. Name the query processor components.
DML compi l er, Embedded DML pre-compi l er, DDL i nterpreter and Query eval uati on
engi ne.
23. Name the storage manager components.
Authori zati on and i ntegri ty manager, Transacti on manager, Fi l e manager and Buffer
manager.
DBMS, RDBMS and DDBMS 87
24. Name the three basi c noti ons that the E-R data model empl oys.
The enti ty sets, rel ati onshi p sets and attri butes.
25. How are attributes cl assi fi ed?
Si mpl e and Composi te attri butes, Si ngl e-val ued and Mul ti val ued attri butes, Nul l attri butes
and Deri ved attri butes.
26. What i s a Super key?
A Super key i s a set of one or more attri butes that, taken col l ecti vel y, al l ows us to
i denti fy uni quel y an enti ty i n the enti ty set.
27. Compare a Weak entity set and a Strong entity set.
An enti ty set may not have suffi ci ent attri butes to form a pri mary key. Such an enti ty set
i s termed as a weak enti ty set. An enti ty set that has a pri mary key i s termed a strong
enti ty set.
28. Di sti ngui sh between Specialization and Generalization.
Speci al i zati on and General i zati on defi ne a contai nment rel ati onshi p between a hi gher-
l evel enti ty set and one or more l ower-l evel enti ty sets. Speci al i zati on i s the resul t of
taki ng a subset of a hi gher-l evel enti ty set to form a l ower-l evel enti ty set. General i zati on
i s the resul t of taki ng the uni on of two or more di sjoi nt (l ower-l evel ) enti ty sets to produce
a hi gher-l evel enti ty set.
29. What i s the drawback of the E-R model?
One l i mi tati on of the E-R model i s that i t cannot express rel ati onshi ps among rel ati onshi ps.
The sol uti on i s to use aggregati on.
30. What forms the basi s for deri vi ng a rel ati onal -database desi gn from an E-R di agram?
Converti ng of database representati on from an E-R di agram to a tabl e format i s the basi s
for deri vi ng a rel ati onal -database desi gn from an E-R di agram.
31. Speci fy the di sti ncti ons among the terms primary key, candidate key and super key.
A super key i s a set of one or more attri butes that, taken col l ecti vel y, al l ows us to
i denti fy uni quel y an enti ty i n the enti ty set. Super keys for whi ch no proper subset i s a
super key i s cal l ed candidate keys. A primary key i s used to denote a candidate key
that i s chosen by the database desi gner as the pri nci pal means of i denti fyi ng enti ti es
wi thi n an enti ty set.
32. What i s relational algebra?
Rel ati onal al gebra i s a procedural query l anguage. I t consi sts of a set of operati ons that
take one or two rel ati ons as i nput and produce a new rel ati on as thei r resul ts.
33. Name the fundamental operati ons i n the relational algebra.
Sel ect, Project, Uni on, Set di fference, Cartesi an product and Rename; there are other
operati ons l i ke set i ntersecti on, natural joi n, di vi si on and assi gnment.
34. What are unary operations and binary operations?
The sel ect, project and rename operati ons are cal l ed unary operati ons, because they
operate on one rel ati on. The other three operati ons are pai rs of rel ati ons and are, therefore,
cal l ed bi nary operati ons.
88 Placement Preparation
35. Defi ne a view.
Any rel ati on that i s not part of the l ogi cal model but i s made vi si bl e to a user as a vi rtual
rel ati on i s cal l ed a view.
36. What are the three cl auses supported by SQL?
Sel ect, From and Where.
37. Name the vari ous ki nds of set operati ons.
The Uni on operati on, The I ntersect operati on and The Except operati on.
38. What i s an aggregate function?
Aggregate functi ons are functi ons that take a col l ecti on of val ues as i nput and return a
si ngl e val ue. SQL offers fi ve bui l t-i n aggregate functi ons: Average, Mi ni mum, Maxi mum,
Total and Count.
39. Defi ne a host language and embedded SQL.
A l anguage i n whi ch SQL queri es are embedded i s referred to as a host language and
the SQL structures permi tted i n the host l anguage consti tute the embedded SQL. An
embedded SQL program must be processed by a speci al preprocessor pri or to compi l ati on.
40. What i s QBE?
Query-by-Example (QBE) i s the name of both a data-mani pul ati on l anguage and the
database system that i ncl uded thi s l anguage.
41. Defi ne the term Integrity constraints.
I ntegri ty Constrai nts provi de a means of ensuri ng that changes made to the database by
authori zed users do not resul t i n a l oss of data consi stency. Thus I ntegri ty Constrai nts
guard agai nst acci dental damage to the database.
42. What i s the use of check cl ause i n SQL?
The check cl ause permi ts the schema desi gner to speci fy a predi cate that must be sati sfi ed
by any val ue assi gned to a vari abl e whose type i s the domai n.
43. What i s Referential Integrity?
Referenti al I ntegri ty i s a condi ti on whi ch ensures that a val ue that appears i n one rel ati on
for a gi ven set of attri butes al so appears for a certai n set of attri butes i n another rel ati on.
44. Defi ne the term Assertion.
An Asserti on i s a predi cate expressi ng a condi ti on that we wi sh the database al ways to
sati sfy. Domai n constrai nts and Referenti al -i ntegri ty constrai nts are speci al form of
asserti ons.
45. Gi ve the syntax of an assertion.
Create asserti on <asserti on-name> check <predi cate>.
46. What i s a trigger?
A tri gger i s a statement that i s executed automati cal l y by the system as a si de effect of a
modi fi cati on to the database.
DBMS, RDBMS and DDBMS 89
47. What are the requi rements for tri gger mechani sm?
(a) Speci fyi ng the condi ti ons under whi ch the tri gger i s to be executed.
(b) Speci fyi ng the acti ons to be taken when the tri gger executes.
48. What i s Functional Dependency (FD)?
Functi onal Dependency (FD) i s a parti cul ar ki nd of constrai nt. I t i s a general i zati on of the
noti on of key: Let ACR and BCR. The FD AB hol ds on R i f, i n any l egal rel ati on r(R),
for al l pai rs of tupl es t1 and t2 i n r such that t1 [A] =t2 [A], i t i s al so the case that t1 [B]
=t2 [B]. Functi onal dependenci es al l ow us to express constrai nts that we cannot express
usi ng super keys.
49. When i s FD sai d to be trivial?
Some FD i s sai d to be tri vi al because they are sati sfi ed by al l rel ati ons.
50. State the rul es of i nference for FD.
(a) Refl exi vi ty rul e (b) Augmentati on rul e (c) Transi ti vi ty rul e.
51. What are the pi tfal l s i n Relational-database design?
(a) Repeti ti on of i nformati on.
(b) I nabi l i ty to represent certai n i nformati on.
52. When i s a rel ati on cal l ed legal?
We say a rel ati on i s legal i f i t sati sfi es al l rul es or constrai nts that we i mpose on our
database.
53. What i s Lossless-join decomposition?
Let C represent a set of constrai nts on the database. A decomposi ti on {R1, R2,.Rn} of a
rel ati on schema R i s a l ossl ess-joi n decomposi ti on for R i f, for al l rel ati ons r on schema R
that are l egal under C, r = R1(r)XR2(r)XRn(r)
54. What i s Normalization?
Normal i zati on i s a process of anal yzi ng the gi ven rel ati on schemas. Normal i zati on appl i es
functi onal dependenci es and pri mary key to reduce redundancy, i nserti on, del eti on and
updati on anomal i es.
55. What i s 1NF (Normal Form)?
The domai n of attri bute must i ncl ude onl y atomi c val ues (i .e) si mpl e, i ndi vi si bl e val ues.
56. What i s 2NF?
A rel ati on schema R i s i n 2NF i f and onl y i f i t i s i n 1NF and every non-pri me attri bute A
i n the rel ati on schema R i s ful l y functi onal l y dependent on the pri mary key.
57. What i s BCNF (Boyce-Codd Normal Form)?
A rel ati on schema R i s i n BCNF i f and onl y i f i t i s i n 3NF and sati sfi es addi ti onal constrai nts
that for every functi onal dependency XA, X must be a candi date key.
58. How i s checkpoint useful i n DBMS?
By taki ng checkpoi nts, the DBMS can reduce the amount of work to be done duri ng
restart i n the event of subsequent crashes.
90 Placement Preparation
59. What i s object-oriented data model?
I t i s an adaptati on to database systems of the object-ori ented programmi ng paradi gm. I t
i s based on the concept of encapsul ati ng i n an object the data, and the code that operates
on those data.
60. Name the l anguages used to i mpl ement object ori entati on.
Data mani pul ati on l anguage, Persi stent programmi ng l anguage.
61. Defi ne object-relational systems.
Systems that provi de object-ori ented extensi ons to rel ati onal systems are cal l ed Object-
relational systems.
62. Defi ne Persistent programming languages.
An exi sti ng object-ori ented programmi ng l anguage can be extended to deal wi th databases.
Such l anguages are cal l ed Persistent programming languages.
63. What i s Nesting and Unnesting?
The transformati on of a nested rel ati on i nto the fi rst normal form i s cal l ed Unnesti ng.
The reverse process of transformi ng a fi rst normal form i nto a nested rel ati on i s cal l ed
nesti ng. Nesti ng can be carri ed out by an extensi on of groupi ng i n SQL.
64. Defi ne an Index of a file.
An I ndex of a fi l e i n the system works i n much the same way as a catal og for a book i n
a l i brary. There are two basi c ki nds of i ndi ces: (1) Order I ndi ces (2) Hash I ndi ces.
65. What i s Query processing?
Query processi ng refers to the range of acti vi ti es i nvol ved i n extracti ng data from a
database.
66. What are the steps i nvol ved i n processi ng a query?
Parsi ng and transl ati on, opti mi zati on and eval uati on.
67. What i s a transaction? What are i ts properti es?
A transacti on i s a uni t of program executi on that accesses and possi bl y updates vari ous
data i tems. The database system mai ntai ns the fol l owi ng properti es of transacti ons:
(a) Atomi ci ty (b) Consi stency (c) I sol ati on (d) Durabi l i ty.
68. Li st the vari ous states whi ch a transaction can occupy.
Acti ve, parti al l y commi tted, fai l ed, aborted and commi tted are the vari ous states. Out of
these a transacti on must occupy one of the states.
69. What i s a spatial database?
Spati al databases i ncl ude geogr aphi c databases, whi ch stor e maps and associ ated
i nformati on, and computer-ai ded desi gn databases, whi ch store i nformati on such as
i ntegrated-ci rcui t or bui l di ng desi gns.
70. What i s Data Mining?
The term Data Mining refers l oosel y to fi ndi ng rel evant i nformati on, or discovering
knowledge, from a l arge vol ume of data. Data mi ni ng attempts to di scover stati sti cal
rul es and patterns automati cal l y from data.
DBMS, RDBMS and DDBMS 91
71. What are the two i mportant cl asses of probl em i n data mi ni ng?
Cl assi fi cati on and Associ ati on rul es.
72. What i s meant by a Data Warehouse?
A Data Warehouse i s a reposi tory (or archi ve) of i nformati on gathered from mul ti pl e
sources, stored under a uni fi ed scheme, at a si ngl e si te. The i ssues to be addressed i n
bui l di ng a warehouse are: (a) When and how to gather data (b) What schema to use
(c) How to propagate updates (d) What data to summari ze.
73. Name the two types of spatial databases?
Desi gn databases and Geographi c databases.
74. Defi ne a distributed database.
A distributed database i s a col l ecti on of data whi ch bel ong l ogi cal l y to the same system
but are spread over the si tes of a computer network.
75. Li st the advantages of di stri buted database.
The mai n advantages are: (a) Organi zati onal and Economi c reasons (b) I nterconnecti on of
exi sti ng databases (c) I ncr emental gr owth (d) Reduced communi cati on over head
(e) Rel i abi l i ty and avai l abi l i ty.
76. What i s DDBMS?
A Di str i buted Database Management System (DDBMS) suppor ts the cr eati on and
mai ntenance of di stri buted databases. An i mportant property of DDBMS i s whether they
are homogeneous or heterogeneous.
77. What i s distribution transparency?
Di stri buti on transparency provi des the i ndependence of programs from the di stri buti on of
the database. Di fferent l evel s of di stri buti on transparency can be provi ded by a DDBMS;
at each l evel , di fferent aspects of the real di stri buti on of data are hi dden from the
appl i cati on programmers.
78. What are the four phases i n the desi gn of a di stri buted database?
(1) The desi gn of the gl obal schema
(2) The desi gn of fragmentati on
(3) The desi gn of al l ocati on
(4) The desi gn of physi cal structures at each si te
79. What i s Database administration?
I t refers to a vari ety of acti vi ti es for the devel opment, control , mai ntenance and testi ng
the software of the database appl i cati on.
80. What i s a catalog?
Catal ogs are smal l , di stri buted databases, whose di stri buti on and al l ocati on are not
constrai ned. Catal ogs of di stri buted databases store al l the i nformati on whi ch i s useful to
the system for accessi ng data correctl y and effi ci entl y and for veri fyi ng that users have
the appropri ate access ri ghts to them.
81. Name the three cl asses of concurrency control algorithms.
(a) Two-phase l ocki ng (b) Ti mestamps (c) Opti mi sti c methods.
92 Placement Preparation
82. What are the rul es to be observed for the successful concurrent executi on of transacti on?
(a) Transacti ons are wel l -formed.
(b) Compati bi l i ty rul es for l ocki ng are observed.
(c) Each transacti on does not request new l ocks after i t has rel eased a l ock.
83. What are the approaches to store a rel ati on r i n a di stri buted database?
(1) Repl i cati on (2) Fr agmentati on (3) Repl i cati on and Fr agmentati on ar e the thr ee
approaches for stori ng the rel ati on r i n the di stri buted database.
84. What i s the usage of commit protocol?
To ensure atomi ci ty, a transacti on T must ei ther commi t at al l si tes, or i t must abort at
al l si tes. To ensure thi s property, the transacti on coordi nator of T must execute a commi t
protocol . The two types of commi t protocol s i n practi ce are: (1) Two-phase commi t protocol
(2PC) and (2) Three-phase commi t protocol (3PC).
85. What are the two types of transacti ons supported by a multidatabase system?
(1) Local transacti ons (2) Gl obal transacti ons.
86. Name the unary operations i n rel ati onal al gebra.
PROJECTI ON and SELECTI ON.
87. Compare PRODUCT and J OIN operati ons.
PRODUCT and JOI N operati ons are not the same. Concatenati on of every row i n one
rel ati on wi th every row i n another i s PRODUCT operati on. Concatenati on of rows from
one rel ati on and rel ated rows from another i s JOI N operati on.
88. Li st the tool s of ORACLE.
(i) SQL *PLUS (ii) PL/SQL (iii) Forms (iv) Reports.
89. Name the Oracles database language.
SQL (Structured Query Language).
90. What are the commands supported by SQL?
(a) Data Defi ni ti on Language (DDL)--Create, Al ter, Drop commands.
(b) Data Mani pul ati on Language (DML)--I nsert, Sel ect, Update and Del ete commands.
(c) Transacti on Control Language (TCL)--Commi t, Save poi nt, Rol l back commands.
(d) Data Control Language (DCL)--Grant and Revoke commands.
91. What i s SQL *PLUS?
SQL *PLUS i s an oracl e speci fi c program whi ch accepts SQL commands and PL/SQL
bl ocks and executes them. SQL *PLUS enabl es mani pul ati on of SQL commands and
PL/SQL bl ocks.
92. Name the oracle internal data types.
(a) Char data type (b) Varchar2 data type (c) Long data type (d) Number data type
(e) Date data type (f) Long raw data type (g) Raw data type

Test Yourself (Objective Type Questions) 93
12
Test Yourself
(Objective Type Questions)
CHOOSE THE BEST ANSWER
1. #defi ne MAX(x,y) ((x)>(y)?(x):(y))
mai n()
{
i nt x=5, y=5;
pri ntf (%d, MAX(++x,++y));
}
The output of the program i s:
(a) 7 (b) 5 (c) 6 (d) none of these
2. Gi ven the fol l owi ng defi ni ti ons, what wi l l be the val ue of r?
i nt *p, *q, r;
i nt val ues[30];
p=&val ues[0];
q=val ues+29;
r=++q-p;
(a) address of q mi nus p (b) number of el ements i n the array
(c) (val ue poi nted by q)+1-(val ue poi nted by p) (d) none of these
3. What wi l l be the output of the program?
#i ncl ude <stdi o.h>
stati c i nt =5;
mai n()
{
i nt sum=0;
do
{
sum+=(1/i );
}whi l e(0<i --);
pri ntf (%d, sum);
}
(a) sum of the seri es i s pri nted (b) compi l ati on error
(c) runti me error (d) none of these
4. #i ncl ude <stdi o.h>
enum mode={green, red, orange, bl ue, whi te};
mai n()
{
green = green+1;
pri ntf (%d%d,green,red);
}
94 Placement Preparation
The output of the program wi l l be:
(a) 1,1 (b) 0,1
(c) no output, error i n compi l ati on (d) none of these
5. What i s the si ze of ptr1 and ptr2?
Struct x{
I nt j;
Char k[100];
Unsi gned I ;
};
i nt *ptr1;
struct x *ptr2;
(a) same (b) 2, 104
(c) 2, undefi ned for memory i s not al l owed (d) 2, 4
6. What i s the output of the fol l owi ng program?
#i ncl ude <stdi o.h>
mai n( )
{
i nt i =0;
swi tch(i )
{
case 0: i ++;
case 1: i ++2;
case 2: ++i ;
}
pri ntf (%d, i ++);
}
The output of the program i s:
(a) 1 (b) 3 (c) 4 (d) 5
7. I f i =5, what i s the output for pri ntf (%d%d%d, ++i ,i ,i ++)?
(a) 5,6,7 (b) 6,6,7 (c) 7,6,5 (d) 6,5,6
8. For the fol l owi ng code, how many ti mes i s the printf functi on executed?
i nt i ,j;
for (i =0;i <=10;i ++);
for (j=0;j<=10;j++);
pri ntf(i =%d,j=%d\n,i ,j);
(a) 121 (b) 11 (c) 10 (d) none of these
9. What i s the output generated for the fol l owi ng code?
#defi ne square (a) (a*a)
pri ntf(%d,square(4+5));
(a) 81 (b) 4 (c) 29 (d) none of these
Test Yourself (Objective Type Questions) 95
10. For the fol l owi ng statement, fi nd the val ues generated for p and q.
i nt p=0, q=1;
p=q++;
p=++q;
p=q ;
p= q;
(a) 1,1 (b) 0,0 (c) 3,2 (d) 1,2
11. What i s the output generated by the fol l owi ng program?
#i ncl ude <stdi o.h>
mai n()
{
i nt a, count;
i nt func(i nt);
for(count=1;count<=5;++count)
{
a=func(count);
pri ntf(%d,a);
}}
i nt func(i nt x)
{
i nt y;
y=x*x;
return (y);
}
(a) 1234567 (b) 2516941 (c) 9162514 (d) 1491625
12. C programmi ng al l ows
(a) onl y cal l by val ue
(b) onl y cal l by reference
(c) both (a) and (b)
(d) onl y cal l by val ue and someti mes cal l by reference
13. The statement The si ze of a struct i s al ways equal to the sum of the si zes of i ts members
is
(a) valid (b) invalid
(c) cant say (d) depends on struct
14. How many Xs are pri nted?
for (i =0;j=10;i <j;i ++,j )
pri ntf(X);
(a) 10 (b) 5 (c) 4 (d) none of these
15. X=mal l oc(Y). Whi ch of the fol l owi ng statement i s correct?
(a) X i s the si ze of the memory al l ocated
(b) Y poi nts to the memory al l ocated
(c) X poi nts to the memory al l ocated
(d) none of these
96 Placement Preparation
16. How many vari abl es are requi red to swap two numbers usi ng a temporary vari abl e and
wi thout usi ng a temporary vari abl e?
(a) 3,2 (b) 3,3 (c) 2,3 (d) 2,2
17. Whi ch of the fol l owi ng i s val i d?
(a) Poi nters can be added
(b) Poi nters can be subtracted
(c) I ntegers can be added to poi nters
(a) al l are correct (b) (a) i s correct (c) (a) and (b) (d) (a) and (c)
18. i nt *i ;
fl oat *f;
char *c;
Whi ch are the val i d casti ngs?
(a) (i nt ) &c (b) (fl oat ) &c (c) (char ) &i b (d) none of these
19. i nt i =20;
pri ntf (%x, i );
What i s the output?
(a) x14 (b) 14 (c) 20 (d) none of these
20. mai n()
{
char *name = name;
change (name);
pri ntf(%s,name);
}
change (char *name)
{
char *nm=newname;
name=nm;
}
What i s the output?
(a) name (b) newname
(c) name=nm i s not val i d (d) functi on cal l i nval i d
21. #defi ne max(a,b) (a>b?b:a)
#defi ne square(x) x*x;
i nt i =2, j=3, k=1;
pri ntf(%d%d, max(i ,j), square(k));
What i s the output?
(a) 32 (b) 23 (c) 31 (d) 13
22. Whi ch i s the val i d decl arati on?
(a) #typedef struct {i nt i ;}i n; (b) typedef struct i n {i nt i ;};
(c) #typedef struct i nt{i nt i ;}; (d) typedef struct {i nt i ;}i n;
Test Yourself (Objective Type Questions) 97
23. What i s the opti mum number of operati ons for 2*(X**3)+3*(X**2)+5*X+5?
(a) 3 mul ti pl i cati ons, 3 addi ti ons (b) 2 mul ti pl i cati ons, 2 addi ti ons
(c) 3 mul ti pl i cati ons, 4 addi ti ons (d) 4 mul ti pl i cati ons, 3 addi ti ons
24. mai n()
{char a[2];
*a[0]=7;
*a[1]=5;
pri ntf(%d,&a[1]-a);
}
The output i s:
(a) 1 (b) i l l egal i ni ti al i zati on
(c) 2 (d) none of these
25. i nt *p;
i =10;
p=i ;
pri ntf(%d,*p);
The output i s:
(a) er r or (b) 10 (c) i (d) none of these
26. I s mai n() i n C programmi ng
(a) a functi on (b) a procedure (c) a decl arati on (d) a header fi l e
27. I s there any di fference between for(i =0;i <10;i ++) and for(i =10;i <n;++i ) ?
(a) no (b) yes
(c) depends on i (d) depends on the program
28. How many for l oops are requi red to carry out a matri x mul ti pl i cati on?
(a) 3 (b) 4 (c) 2 (d) 1
29. How wi l l you represent *a[i ]?
(a) *(a+i ) (b) (*a+i ) (c) (a+*i ) (d) (*a+*i )
30. i nt count=11;
whi l e ( count+1)
pri ntf(count down i s %d\n,count);
How many ti mes i s the pri ntf statement executed?
(a) 11 (b) 10 (c) 8 (d) none of these
31. How many bytes of memory wi l l the fol l owi ng arrays need?
Char s[80], char s[80][10], i nt d[10], fl oat d[10][5]
(a) 80,800,20,200 (b) 80,80,20,200
(c) 80,800,10,50 (d) 80,800,10,15
98 Placement Preparation
32. Gi ve the name of the standard l i brary functi on for the fol l owi ng: stri ng l ength, stri ng
compare, stri ng copy and stri ng concatenati on.
(a) strl en, strcmp, strcpy, strcat (b) stri ngl en, stri ngcmp, strcpy, strcat
(c) strl en,strcompare,stri ngcopy,strcat (d) strl en[], strcmp[],strcpy[],strcat[]
33. Suppose i and j are both i nteger type vari abl es, and j has been assi gned a val ue of 5. Fi nd
the val ue of i for the fol l owi ng expressi ons:
(a) i =2*j-2*j/5 (b) i =j/2 (c) i =2*j/2 (d) i =(2*j)/2
(a) 8,2,4,2 (b) 8,0,4,5 (c) 8,2,0,0 (d) none of these.
34. Whi ch of the fol l owi ng represents scope resol uti on operator?
(a) :: (b) * (c) & (d) none of these
35. Whi ch of the fol l owi ng i s cal l ed a cl ass member access operator?
(a) & (b) dot operator (c) [ ] (d) **
36. A constructor that accepts no parameters i s cal l ed
(a) defaul t constructor (b) parameteri zed constructor
(c) overl oaded constructor (d) i mpl i ci t constructor
37. Whi ch of the fol l owi ng operators cannot be overl oaded?
(a) dot operator (b) + (c) - (d) *
38. Whi ch of the fol l owi ng operators i s not rel ated to a fri end functi on?
(a) = (b) + (c) - (d) *
39. A functi on decl ared i n a base cl ass that has no defi ni ti on rel ati ve to the base cl ass i s
cal l ed
(a) pure vi rtual functi on (b) vi rtual functi on
(c) fri end cl ass (d) fri end functi on
40. Whi ch of the fol l owi ng i s used to represent an object that i nvokes a member functi on?
(a) thi s (b) scope resol uti on operator
(c) #symbol (d) assi gnment operator
41. Whi ch of the fol l owi ng access speci fi ers are accessi bl e from own cl ass, from deri ved cl ass
and from objects outsi de the cl ass?
(a) public (b) protected
(c) pri vate (d) pri vate and publ i c
42. The destructor for the cl ass i nteger can be defi ned as:
(a) ~i nteger(){} (b) ~i nteger{}() (c) ~i nteger (d) i nteger()
43. The process of creati ng a speci fi c cl ass from a cl ass templ ate i s cal l ed
(a) i nstanti ati on (b) i nstant cl ass
(c) functi on templ ate (d) templ ate i nstanti ati on
Test Yourself (Objective Type Questions) 99
44. The decl arati ons for the mani pul ators are avai l abl e i n:
(a) i ostream.h (b) stdi o.h
(c) i omani p.h (d) coni o.h
45. Whi ch of the fol l owi ng i nvol ves context swi tch?
(a) SPOOL (b) processor (c) thread (d) none of these
46. For 1MB memory, the number of address l i nes requi red i s:
(a) 11 (b) 16 (c) 22 (d) 24
47. Semaphore i s used for
(a) synchroni zati on (b) dead-l ock (c) excepti on (d) (b) and (c)
48. Whi ch hol ds true for the fol l owi ng statement?
Cl ass C: Publ i c A, Publ i c B
(a) 2 member i n cl ass A, B shoul d not have the same name
(b) 2 member i n cl ass A, C shoul d not have the same name
(c) both a & b
(d) none of these
49. Pi ggybacki ng i s a techni que for
(a) fl ow control (b) error control (c) acknowl edgement (d) (a) and (b)
50. I n a si gned magni tude notati on, what i s the mi ni mum val ue that can be represented wi th
8 bi ts?
(a) 128 (b) 255 (c) 127 (d) 0
51. I n the fol l owi ng statement, what i s the val ue of may?
Enum = {jan=1,feb=4,apri l ,may}
(a) 4 (b) 5 (c) 6 (d) none of these
52. What i s the output for the fol l owi ng C program?
i =20,k=0;
for(j=1;j<i ;j=1+4*(i /j))
{
k+=j<10?4:3;
}
pri ntf(%d,k);
(a) k=4 (b) 4 (c) 3 (d) none of these
53. Fi nd the output:
i nt i =10;
mai n()
{
i nt i =20,n;
for(n=0;n<=i ;)
{
100 Placement Preparation
i nt i =10;
i ++;
}
pri ntf(%d,i );
(a) i =20; (b) 20 (c) 10 (d) none of these
54. What i s the si zeof(l ong i nt)?
(a) 4 bytes (b) 2 bytes
(c) 8 bytes (d) depends on compi l er
55. The mai n() i n C must be
(a) The fi rst functi on i n the program (b) The fi rst statement i n the program
(c) Wri tten anywhere i n the program (d) None of these
56. Whi ch of the fol l owi ng about automati c vari abl es wi thi n a functi on i s correct?
(a) i ts type must be decl ared before usi ng the vari abl e
(b) they are l egal
(c) they are not i ni ti al i zed to zero
(d) they are gl obal
57. Wri te one statement equi val ent to the fol l owi ng two statements: x=sqr(a); return(x);
(a) return(sqr(a)); (b) pri ntf(sqr(a));
(c) return(a*a*a); (d) pri ntf(%d,sqr(a));
58. Whi ch of the fol l owi ng about the C comments i s I NCORRECT?
(a) comments can go over mul ti pl e l i nes.
(b) comments can start anywhere i n the l i ne.
(c) a l i ne can contai n comments wi thout any l anguage statements.
(d) comments can occur wi thi n comments.
59. What i s the val ue of y i n the fol l owi ng code?
x=7; y=0;
i f(x=6) y=7;
el se y=1;
(a) 7 (b) 0 (c) 1 (d) none of these
60. What val ue i s returned by the fol l owi ng functi on?
Conver(i nt t)
{
i nt u;
u=5/9*(t-32);
return (u);
}
(a) 15 (b) 0 (c) 16.1 (d) 29
61. Whi ch of the fol l owi ng i s I NCORRECT?
(a) automati c vari abl es are automati cal l y i ni ti al i zed to 0.
Test Yourself (Objective Type Questions) 101
(b) stati c vari abl es are automati cal l y i ni ti al i zed to 0.
(c) the address of a regi ster vari abl e i s not accessi bl e.
(d) stati c vari abl es cannot be i ni ti al i zed wi th any expressi on.
62. The operator used for exponenti ati on i s
(a) ** (b) ^ (c) % (d) #
63. Whi ch of the fol l owi ng i s I NVALI D?
(a) a+=b (b) a*=b (c) a>>=b (d) a**=b
64. How many ti mes does the fol l owi ng l oop occur?
a=0;
whi l e(a<5)
pri ntf(%d,a++);
(a) i nfi ni te (b) 5 (c) 4 (d) 6
65. How many ti mes does the fol l owi ng l oop occur?
for(i =0;i =10;i +=2)
pri ntf(hai );
(a) 10 (b) 2 (c) 5 (d) none of these
66. Whi ch of the fol l owi ng i s I NCORRECT regardi ng a recursi ve functi on?
(a) cal l s i tsel f (b) i s equi val ent to a l oop
(c) has a termi nati on condi ti on (d) does not have a return val ue at al l
67. Fi nd the odd one out among the fol l owi ng.
(a) mal l oc() (b) cal l oc() (c) free() (d) real l oc()
68. Consi der the fol l owi ng program:
mai n()
{
i nt a[5]={1,3,6,7,0};
i nt *b;
b=&a[2];
}
The val ue of b[1] i s
(a) 1 (b) 3 (c) 6 (d) none of these
69. The format used for hexadeci mal i s
(a) %d (b) %o (c) %x (d) %u
70. What i s the output?
mai n()
{i nt x=5,*p;
p=&x;
pri ntf(%d,++*p);
}
(a) 5 (b) 6 (c) 0 (d) none of these
102 Placement Preparation
71. i nt *a[5] refers to
(a) array of poi nters (b) poi nter to an array
(c) poi nter to a poi nter (d) none of these
72. Whi ch of the fol l owi ng i s not a group functi on?
(a) avg() (b) sqrt() (c) sum() (d) max()
73. Once defi ned, how l ong wi l l a vari abl e remai n so i n SQL *PLUS?
(a) unti l the database i s shutdown (b) unti l the i nstance i s shutdown
(c) unti l the statement ends (d) unti l the sessi on ends
74. Whi ch functi on bel ow can best be categori zed as si mi l ar i n functi on to an I F-THEN-ELSE
statement?
(a) SQRT (b) DECODE
(c) NEW-TI ME (d) ROWI DTOCHAR
75. Whi ch of the fol l owi ng two orders are used by ORDER BY cl ause?
(a) ABS, ASC (b) ASC, DESC (c) ABS, DESC (d) none of these
76. Whi ch of the fol l owi ng i s not a feature of a cursor FOR l oop?
(a) record type decl arati on (b) openi ng and parsi ng of SQL statements
(c) fetches records from cursor (d) requi res exi t condi ti on to be defi ned
77. The command used to open a cursor FOR LOOP i s
(a) open (b) fetch (c) parse (d) none of these
78. What happens when rows are found usi ng a FETCH statement?
(a) I t causes the cursor to cl ose
(b) I t causes the cursor to open
(c) I t l oads the current rows val ues i nto vari abl es
(d) I t creates the vari abl es to hol d the current row val ues
79. Whi ch procedure can be used to create a customi zed error message?
(a) RAI SE_ERROR (b) SQLERRM
(c) RAI SE_APPLI CATI ON_ERROR (d) RAI SE_SERVER_ERROR
80. What i s the CPU schedul i ng al gori thm used by the UNI X operati ng system?
(a) preempti ve (b) non-preempti ve
(c) preempti ve wi th dynami c pri ori ty (d) preempti ve wi th stati c pri ori ty
81. The UNI X operati ng system i s based on
(a) monol i thi c (b) mi cro-kernel (c) mul ti threadi ng (d) mul ti taski ng
82. After servi ng a page faul t, the control returns to
(a) the next i nstructi on
(b) depends on operati ng system
(c) the same i nstructi on but the program hal ts
(d) the same i nstructi on but the program hangs
Test Yourself (Objective Type Questions) 103
83. A program wri tten usi ng the data structure resul ts i n mi ni mum page faul ts.
(a) stack (b) hash queue
(c) pri ori ty queue (d) pri ori ty l i sts
84. Vi rtual memory i s i mpl emented by
(a) si mpl e pagi ng
(b) demand pagi ng
(c) stati c parti ti oned memory management
(d) dynami c parti ti oned memory management
85. WI NDOWS NT i s desi gned as
(a) RI SC (b) CI SC (c) both (a) and (b) (d) none of these
86. Web cl i ent tal ks to web server through
(a) TCP port 80 (b) TCP port 21 (c) UDP port 80 (d) UDP port 21.
87. DLL stands for
(a) dynami c l i nk l i brary (b) dynami c l anguage l i brary
(c) dynami c l oad l i brary (d) none of these
88. POST-BLOCK tri gger i s a
(a) navi gati onal tri gger (b) key tri gger
(c) transacti onal tri gger (d) none of these
89. Whi ch of the fol l owi ng packaged procedure i s UNRESTRI CTED?
(a) CALL_I NPUT (b) CLEAR-BLOCK (c) EXECUTE_QUERY (d) USER-EXI T
90. I denti fy the RESTRI CTED packaged procedure from the fol l owi ng:
(a) USER_EXI T (b) MESSAGE (c) BREAK (d) EXI T_FORM
91. What i s SQL*FORMS?
(a) I t i s a 4GL tool for devel opi ng and executi ng oracl e based i nteracti ve appl i cati ons.
(b) SQL*FORMS i s a 3GL tool for connecti ng to the database.
(c) SQL*FORMS i s a reporti ng tool .
(d) none of these
92. What i s a DATABLOCK?
(a) set of extents (b) set of segments
(c) smal l est database storage uni t (d) none of these
93. A Transacti on ends
(a) onl y when i t i s commi tted (b) onl y when i t i s rol l ed back
(c) when i t i s commi tted or rol l ed back (d) none of these
94. PL/SQL supports datatypes(s)
(a) scal ar datatype (b) composi te datatype (c) both (a) and (b) (d) none of these
104 Placement Preparation
95. Fi nd the odd datatype out of the fol l owi ng
(a) VARCHAR2 (b) RECORD (c) BOOLEAN (d) RAW
96. Fi nd the ODD one out of the fol l owi ng
(a) OPEN (b) CLOSE (c) I NSERT (d) FETCH
97. Whi ch of the fol l owi ng i s NOT CORRECT about cursor?
(a) cursor i s a named pri vate SQL area
(b) cursor hol ds temporary resul ts
(c) cursor i s used for retri evi ng mul ti pl e rows
(d) SQL uses i mpl i ci t cursors to retri eve rows
98. Whi ch of the fol l owi ng i s NOT VALI D i n PL/SQL?
(a) Sel ecti nto (b) Update (c) Create (d) Del ete
99. I s i t possi bl e to modi fy a datatype of a col umn when the col umn contai ns data i n a tabl e?
(a) yes (b) no
(c) depends on data (d) depends on datatype
100. The DML statements are
(a) I NSERT (b) SELECT (c) UPDATE (d) al l of these
101. What i s the SYSTEM VARI ABLE used to refer DATABASE ti me?
(a) $$dbti me$$ (b) $$ti me$$ (c) $$date$$ (d) none of these
102. The sequence of events that takes pl aces whi l e starti ng a database i s
(a) database opened, fi l e mounted, i nstance started
(b) i nstance started, database mounted, database opened
(c) database opened, i nstance started, fi l e mounted
(d) none of these
103. The status of the rol l back segment can be vi ewed through
(a) DBA_SEGMENTS (b) DBA_ROLES
(c) DBA_FREE_SPACES (d) DBA_ROLLBACK_SEG
104. What fi l e i s read by ODBC to l oad dri vers?
(a) ODBC.I NI (b) ODBC.DLL (c) ODBCDRV.I NI (d) none of these
105. Whi ch of the fol l owi ng i s a feature of ERP software?
(a) ERP i s packaged software (b) I t i s fl exi bl e
(c) I t i ntegrates i nformati on (d) I t supports CRM
106. ERP stands for
(a) Enterpri se resource pl anni ng (b) Enti re resource pl anni ng
(c) Enterpri se requi rements pl anni ng (d) Enterpri se resource programme
107. I denti fy the ERP vendor
(a) SAP (b) TCS (c) PATNI (d) CTS
Test Yourself (Objective Type Questions) 105
108. SAP stands for
(a) System, Appl i cati ons, Products i n data processi ng
(b) Software, Appl i cati ons, Products
(c) Software, Appl i cati ons, Projects
(d) Software admi ni strati on programme
109. How many l ayers are i n the OSI reference model ?
(a) 7 (b) 6 (c) 8 (d) 4
110. JAVA i s a
(a) pure OOPS l anguage (b) object based l anguage
(c) scri pt l anguage (d) hypertext l anguage
111. Schedul er i n an operati ng system i s
(a) an operati ng system modul e (b) a l oader
(c) a compi l er (d) a system cal l
112. Whi ch of the fol l owi ng i s used to convert a stri ng to an i nteger?
(a) atoi () (b) i toa() (c) govt() (d) strcmp()
113. Whi ch of the fol l owi ng returns a random number?
(a) rand( ) (b) random( ) (c) randomi ze( ) (d) r( )
114. The page faul t frequency parameter p i s usual l y measured i n
(a) number of page faul ts per mi l l i second (b) number of page faul ts per second
(c) number of page faul ts per mi nute (d) none of these
115. What are the two pri mi ti ve operati ons of semaphore?
(a) SI GNAL & WAI T (b) BUSY & WAI T
(c) FREE & SI GNAL (d) WAI T & FREE
116. Name the operator whi ch i s automati cal l y overl oaded i n JAVA.
(a) + (b) (c) * (d) none of these
117. JAVA provi des two di fferent stri ng cl asses from whi ch stri ng objects can be i nstanti ated.
What are they?
(a) Stri ng, Stri ngBuffer (b) Strcmp, Strl en
(c) Strobj, Stri ng() (d) none of these
118. Whi ch of the fol l owi ng i s a keyword for handl i ng excepti on i n JAVA?
(a) try (b) stati c (c) obj (d) final
119. What method of whi ch cl ass woul d you use to extract the message from an excepti on
object?
(a) The getMessage() method of the Throwabl e cl ass
(b) The Message() method
(c) The GetMessage() method
(d) None of these
106 Placement Preparation
120. What i s the name of the method that can be used to determi ne i f a thread i s al i ve?
(a) i sAl i ve() (b) Al i ve() (c) i sl i ve() (d) none of these
121. Whi ch of the fol l owi ng counts the number of current i tems i n the l i st?
(a) Count (b) Li stCount (c) CountLi st (d) none of these
122. The val ue returned by the MsgBox functi on when VbAbort i s cl i cked i s
(a) 1 (b) 2 (c) 3 (d) 4
123. Stri ngBuffer cl ass bel ongs to
(a) SDK (b) JDK (c) JAVA API (d) JVM
124. Whi ch of the fol l owi ng creates a cl ass that cannot be extended?
(a) abstract (b) final (c) public (d) al l of these
125. Mul ti threadi ng i s i mpl emented i n JAVA through
(a) i nterface (b) cl ass (c) methods (d) al l of these
126. Whi ch of the fol l owi ng statement can be used to come out of i ndefi ni te l oops?
(a) break (b) swi tch (c) if (d) i f-el se
127. The character set of JAVA i s cal l ed
(a) ASCI I (b) BYTECODE (c) UNI CODE (d) none of these
128. Whi ch of the fol l owi ng i n JAVA al l ows you to bui l d GUI ?
(a) SDK (b) AWT (c) JAVA BEANS (d) none of these
129. The extensi on for i con fi l es i s
(a) .i con (b) .i co (c) .i no (d) .i nc
130. A functi on that does not return a val ue i s cal l ed
(a) voi d (b) dynami c (c) stati c (d) constant
131. The method used to add i tems to the l i stbox control i s
(a) AddLi stI tem (b) AddI tem (c) Li stI tem (d) AddList
132. I n JAVA, Pol ymorphi sm i s i mpl emented by a techni que cal l ed
(a) overl oadi ng (b) overri di ng (c) ADT (d) none of these
133. The three attri butes that shoul d be compul sori l y used wi th <Appl et> tags are
(a) Code, Name, Wi dth (b) Name, Code, Hei ght
(c) Code, Hei ght (d) Name, Al i gn
134. The method used to start the appl ets i s
(a) Voi d start() (b) Start() (c) Void() (d) none of these
135. Mul ti threadi ng i s i mpl emented i n JAVA through an i nterface cal l ed
(a) Thread (b) Runnabl e (c) Start() (d) I nit()
136. Whi ch method i s executed onl y once at the start of Appl et executi on?
(a) destroy() (b) start() (c) i ni t() (d) stop()
Test Yourself (Objective Type Questions) 107
137. The term bi t stands for
(a) byte di gi t (b) bi nary di gi t
(c) bool ean di gi t (d) byte i nformati on transfer
138. Whi ch one of the fol l owi ng i s used for desi gni ng di gi tal ci rcui ts i n a di gi tal computer?
(a) hardware (b) software
(c) bool ean al gebra (d) i ntegrated ci rcui t
139. Whi ch one of the fol l owi ng i s a combi nati on of NOR gate?
(a) NOT & OR (b) NOT & AND
(c) AND & OR (d) AND, OR & NOT
140. Whi ch one of the fol l owi ng i s al so cal l ed a fl i pfl op?
(a) stabl e gate (b) l ogi c stabl e gate (c) bi -stabl e gate (d) tri -stabl e gate
141. I n whi ch network, are computers connected to a central hub?
(a) star (b) bus (c) ri ng (d) hybri d
142. I n whi ch mode, can data be transmi tted i n one di recti on?
(a) si mpl ex (b) half-duplex (c) ful l -dupl ex (d) a & b
143. Whi ch one of the fol l owi ng i s cal l ed ANSI standard of LI NUX?
(a) shel l (b) ker nel (c) C l anguage (d) none of these
144. I n LI NUX, whi ch one of the fol l owi ng i s the prompt for the root user?
(a) $ (b) @ (c) # (d) C
145. How many modes of operati on are there i n vi edi tor?
(a) 3 (b) 6 (c) 4 (d) 2
146. The bool ean expressi on ABC +ABC +ABC +ABC after si mpl i fi cati on wi l l be
(a) B (b) A (c) ABC (d) ABC
147. Whi ch one of the fol l owi ng establ i shes De-Morgans fi rst theorem?
(a) A+B=A.B (b) = A +B A.B (c) = A +B A.B (d) = A.B A.B
148. Whi ch of the fol l owi ng i s an exampl e of sequenti al ci rcui t?
(a) fl i p-fl op ci rcui t (b) di gi tal ci rcui t
(c) l ogi cal ci rcui t (d) combi nati onal ci rcui t
149. Whi ch one of the fol l owi ng gates i s cal l ed l ogi cal i nverter?
(a) NAND (b) XOR (c) NOR (d) NOT
150. How many types of users are i n the LI NUX operati ng system?
(a) 2 (b) 3 (c) 4 (d) 6
151. Whi ch one of the fol l owi ng i s known as response ti me or l atency?
(a) cycl e ti me (b) memory ti me (c) access ti me (d) ti me
108 Placement Preparation
152. Whi ch one of the fol l owi ng ci rcui ts i s capabl e of stori ng one bi t of i nformati on?
(a) ful l adder (b) hal f adder
(c) flip-flop (d) combi nati onal ci rcui t
153. How many stabl e states are there i n a si mpl e fl i p-fl op?
(a) 5 (b) 2 (c) 3 (d) 4
154. Whi ch command i s used to show the contents of the fi l e on the screen i n LI NUX?
(a) cat (b) man (c) pwd (d) echo
155. How many bytes of memory are requi red to store an i nteger?
(a) 8 (b) 2 (c) 4 (d) 1
156. The expressi on XYZ + XYZ + XYZ i s cal l ed
(a) canoni cal sum (b) sum of standard product terms
(c) sum of mi nterms (d) al l of these
157. DeMorgans second theorem i s
(a) = A.B A +B (b) = A.B A.B (c) A.B=A+B (d) A.B =A+B
158. The devi ce that accompl i shes the modul ati on-demodul ati on process i s cal l ed
(a) flip-flop (b) MODEM (c) chip (d) CPU
159. Job schedul i ng l ed to the concept known as the
(a) SPOOLI NG (b) resi dent moni tors
(c) ti me-shari ng (d) mul ti programmi ng
160. Sendi ng a message to a group i s cal l ed
(a) mul ti taski ng (b) group message
(c) routi ng (d) mul ti cast routi ng
161. An open source testi ng tool used to test the performance of the appl i cati on when i t i s
under heavy l oad i s
(a) Apache JMeter (b) Loadrunner (c) TSL (d) PSP
162. The expected ti me to search for an el ement i n a hash tabl e i s
(a) O(1) (b) O(2) (c) 0 (d) None of these
163. The Cl i que probl em i s
(a) NP-Compl ete (b) NP-Hard (c) NP-Soft (d) MST
164. The COCOMO model deal s wi th
(a) software cost (b) software ri sk (c) schedul i ng (d) testi ng
165. What type of l anguage i s Vi sual Basi c?
(a) object-based (b) object-ori ented
(c) pure OOPS l anguage (d) hypertext
Test Yourself (Objective Type Questions) 109
166. The ti me compl exi ty for Bi nary search al gori thm i s
(a) l ogn (b) O(l ogn) (c) O(1) (d) none of these
167. The mechani sm by whi ch two di fferent fi l e systems can be combi ned together i s cal l ed
(a) mounti ng (b) paging (c) process (d) buddy system
168. A bi nary semaphore can take onl y one of the fol l owi ng 2 val ues:
(a) 0 and 1 (b) 0 and 10 (c) 0 and 2 (d) 1 and 10
169. What i s the range of val ues ProcessI D (PI D) can take?
(a) 0 to 32767 (b) 0 to 128 (c) 0 to 256 (d) 0 to 1024
170. What i s the system cal l to create a new process?
(a) fork (b) ni ce (c) exec( ) (d) brk( )
171. A Local vari abl e whi ch exi sts and retai ns i ts val ue even after the control i s transferred
to the cal l i ng functi on i s cal l ed
(a) stati c vari abl e (b) gl obal vari abl e
(c) temporary vari abl e (d) constant vari abl e
172. I n header fi l es, functi ons are
(a) decl ared (b) defi ned (c) cal l ed (d) overl oaded
173. Whi ch of the fol l owi ng al l ocates the requested si ze of bytes and returns a poi nter to the
fi rst byte of the al l ocated space?
(a) mal l oc (b) cal l oc (c) real l oc (d) none of these
174. Whi ch of the fol l owi ng al l ocates space for an array of el ements, i ni ti al i zes them to zero
and then returns a poi nter to the memory?
(a) mal l oc (b) cal l oc (c) real l oc (d) none of these
175. Wri te down an equi val ent poi nter expressi on for referri ng to the same el ement a[i ][j][k][l ]
(a) *(*(*(*(a+i )+j)+k)+l ) (b) a(*i +*j+*k+*l )
(c) *a[i][j][k][l] (d) a[*i ][*j][*k][*l ]
176. How wi l l you decl are an array of three functi on poi nters where each functi on recei ves
two i nteger val ues and returns a fl oat?
(a) fl oat (*arr[3](i nt,i nt); (b) fl oat(arr[3](*i nt,*i nt);
(c) fl oat (*arr[3])(&i nt,&i nt); (d) none of these.
177. How many bytes are occupi ed by the far, huge and near poi nters?
(a) near poi nter 2 bytes, far and huge poi nter 4 bytes
(b) near poi nter 2 bytes, far and huge poi nter 2 bytes
(c) near poi nter 4 bytes, far and huge poi nter 4 bytes
(d) near poi nter 4 bytes, far and huge poi nter 2 bytes
178. The functi on atoi ()
(a) converts a stri ng to an i nteger (b) converts an i nteger to a stri ng
(c) converts a floating point number to a string (d) none of these
110 Placement Preparation
179. The functi on i toa()
(a) converts a fl oati ng poi nt number to a stri ng
(b) converts an i nteger to a stri ng
(c) converts a stri ng to an i nteger
(d) none of these
180. The functi on govt()
(a) converts a stri ng to an i nteger
(b) converts an i nteger to a stri ng
(c) converts a fl oati ng poi nt number to a stri ng
(d) none of these
181. The rand() functi on returns a
(a) random number (b) 0 (c) 1 (d) garbage val ue
182. A Bus whi ch carri es the data to or from memory i s known as a
(a) data bus (b) memory bus (c) I /O bus (d) none of these
183. Whi ch of the fol l owi ng stores the resul t of each ari thmeti c or l ogi cal operati on?
(a) accumul ator (b) stack poi nter (c) bus (d) CPU
184. A sol uti on to the probl em of i ndefi ni te bl ockage of l ow pri ori ty jobs i s
(a) agi ng (b) si mul ati on
(c) event-dri ven programs (d) none of these
185. The wasted bytes al l ocated to keep everythi ng i n uni ts of bl ocks (i nstead of bytes) are
cal l ed
(a) parti ti on (b) external fragmentati on
(c) i nternal fragmentati on (d) deal l ocati on
186. Name the techni que of di vi di ng each bi t peri od i nto two equal i nterval s.
(a) manchester encodi ng (b) modul ator
(c) transponders (d) mul ti pl exer
187. Whi ch of the fol l owi ng i s used to control concurrent access of data between users?
(a) l ocks (b) forms (c) vi ews (d) none of these
188. Name the database object whi ch i s used as an al ternati ve name for a tabl e, vi ew or
sequences. They are al so used to si mpl i fy SQL statements.
(a) synonym (b) sequences (c) i ndex (d) none of these
189. Name the database object whi ch can generate uni que, sequenti al i nteger val ues.
(a) sequence (b) synonym (c) vi ew (d) i ndex
190. Name a speci al bi t pattern that ci rcul ates around the ri ng whenever al l stati ons are i dl e.
(a) token (b) token ri ng (c) token bus (d) bri dge
Test Yourself (Objective Type Questions) 111
191. PAR stands for
(a) Posi ti ve acknowl edgement wi th retransmi ssi on
(b) Program access regi sters
(c) Program address regi ster
(d) Posi ti ve acknowl edgement wi thout retransmi ssi on
192. Whi ch of the fol l owi ng deal s wi th software cost esti mati on?
(a) COCOMO model (b) spi ral model (c) prototypi ng model (d) RAD model
193. Name the software devel opment approach that deal s wi th ri sk prone projects and unstabl e
requi rements.
(a) extreme programmi ng (b) system programmi ng
(c) appl i cati on programmi ng (d) reengi neeri ng
194. When does software testi ng end?
(a) when we run out of ti me (b) when we run out of memory
(c) when there i s no error (d) veri fi cati on & val i dati on are compl eted
195. Cycl omati c compl exi ty i s a software metri c deal i ng wi th
(a) basi s path testi ng (b) regressi on testi ng
(c) smoke testi ng (d) mutati on testi ng
196. MTBF i s equal to
(a) MTTF-MTTR (b) MTTR-MTTF
(c) MTTF*MTTR (d) MTTF-2*(MTTR)
197. Name the qual i ty management techni que that transl ates the needs of the customer i nto
techni cal requi rements.
(a) QFD (b) SRS (c) CSPEC (d) PSPEC
198. Whi ch of the fol l owi ng i s an OOPS metri c?
(a) LOC (b) cycl omati c compl exi ty
(c) NOC (d) comment %
199. Software confi gurati on management deal s wi th
(a) change management (b) requi rements speci fi cati on
(c) ri sk anal ysi s (d) reengi neeri ng
200. How are the ri sks documented i n SDLC?
(a) usi ng RI S (b) usi ng Ri sk Tabl e (c) RMMM (d) KPA
201. A web ser ver sends a pr ogr am to be stor ed on the user s har d dr i ve cal l ed a
frequentl y wi thout a di scl osure or the users content.
(a) cooki e (b) websi te (c) ser ver (d) datastore
202. The process of encrypti ng and decrypti ng messages i s cal l ed.
(a) cryptography (b) authenti ci ty
(c) cryptanal ysi s (d) authenti cati on
112 Placement Preparation
203. A si tuati on where a busi ness i s sel l i ng onl i ne to an i ndi vi dual consumer i s
(a) Busi ness-to-Consumer E-Commerce (b) Busi ness-to-Busi ness E-Commerce
(c) E-Busi ness (d) banner
204. The processi ng ti me of a busi ness process from begi nni ng to end i s
(a) cycl e ti me (b) l ead ti me
(c) l apsed ti me (d) process ti me
205. Computer-to-Computer di rect transfer of standard busi ness documents i s
(a) EDI (El ectroni c data i nterchange) (b) EFT (El ectroni c Fund transfer)
(c) El ectroni c di stri butor (d) e-broker
206. A network that l i nks the i ntranets of busi ness partners usi ng the vi rtual l y pri vate network
on the I nternet i s
(a) Extranet (b) I ntranet (c) VAN (d) MAN
207. A network node consi sti ng of both hardware and software that i sol ates a pri vate network
from publ i c networks i s
(a) fi rewal l (b) fare tracker (c) i ntermedi ary (d) i nternet mal l
208. The concept of del i veri ng the ordered i tems at a desi gnated ti me i s
(a) JI T (Just-i n-ti me) (b) onti me shi ppi ng
(c) onl i ne del i very (d) none of these
209. Whi ch among the fol l owi ng i s not a structured data type i n C?
(a) uni on (b) poi nter (c) stri ng (d) bool ean
210. A B-Tree of order m i s an m-way search tree wi th
(a) al l l eaves of the tree on the same l evel
(b) each node, except for root and l eaves, havi ng l ess than m/2 subtrees
(c) the root of the tree havi ng more than m subtrees
(d) al l i ts l eaves connected to form a l i nked l i st
211. A browser i s a software tool that hel ps
(a) l i nki ng of appl i cati on program modul es
(b) vi ewi ng of appl i cati on i nformati on
(c) devel opi ng appl i cati on programs
(d) debuggi ng of appl i cati on software
212. Whi ch of the fol l owi ng i s not an el ement of C?
(a) tokens (b) i denti fi ers (c) datatypes (d) structures
213. Whi ch of the fol l owi ng i s not an el ement of C++?
(a) tokens (b) i denti fi ers (c) vari abl es (d) constructors
214. Name the two communi cati on satel l i tes.
(a) geosynchronous and l ow-orbi t (b) synchronous and orbi t
(c) geosynchronous and trunks (d) trunks and tunnel i ng
Test Yourself (Objective Type Questions) 113
215. Whi ch of the fol l owi ng i s not a memory management scheme?
(a) pagi ng memory (b) l ock (c) mutual excl usi on (d) cri ti cal regi on
216. Whi ch of the fol l owi ng al gori thm deal s wi th deadl ock?
(a) Bankers al gori thm (b) Bakery al gori thm
(c) RR (d) Pri ori ty al gori thm
217. Whi ch of the fol l owi ng i s not an asymptoti c notati on?
(a) Bi g oh (b) Omega (c) Theta (d) Alpha
218. Kuhn.-tucker condi ti ons deal wi th
(a) non-l i near programmi ng (b) matroi ds
(c) LPP (d) assi gnment probl em
219. The Max-Fl ow-Mi n-Cut theorem deal s wi th
(a) network fl ow probl em (b) LPP
(c) matroi ds (d) non-l i near programmi ng
220. I nternet-based broadcasti ng of audi o and vi deo content i s
(a) webcasti ng (b) webonomi cs
(c) webhosti ng (d) web content desi gn
221. The pl acement of the websi te on a cer tai n ser ver and pr ovi di ng the necessar y
i nfrastructure for i ts operati ons i s
(a) web hosti ng (b) webcasti ng (c) webonomi cs (d) webserver
222. Whi ch of the fol l owi ng i s CORRECT?
(a) Java does not support I CMP
(b) Java does not al l ow you to send raw I P packets
(a) (a) i s true (b) (b) i s true
(c) (a) and (b) are true (d) depends on data.
223. A typi cal C program i s made up of several functi ons whi ch may be contai ned i n
(a) onl y one source fi l e (b) one or more source fi l es
(c) depends on functi ons (d) two or more source fi l es
224. Every C program must have a
(a) mai n() (b) voi d mai n() (c) coni o.h (d) getch()
225. I n C, the semi col on i s used as
(a) statement termi nator (b) separator
(c) nul l statement (d) new l i ne generator
226. A free tree i s defi ned as a connected undi rected graph wi th
(a) 1 cycl e (b) 2 cycl es (c) 3 cycl es (d) no cycl e
227. Depth-fi rst traversal of a graph i s roughl y anal ogous to..traversal
(a) preorder (b) i norder (c) l evel -by-l evel (d) postorder
114 Placement Preparation
228. The method of wri ti ng al l operators ei ther before thei r operands, or after them, i s cal l ed
(a) pol i sh notati on (b) infix (c) postfi x (d) prefi x
229. A l i nked bi nary tree wi th n nodes, n>=0 has exactl yNULL l i nks.
(a) n (b) n+1 (c) n1 (d) n+2
230. A pri ori ty queue i s a data structure wi th onl y two operati ons
(a) i nsert an i tem, remove an i tem havi ng the l argest or smal l est key
(b) i nserti ng and orderi ng the i tems
(c) removi ng and orderi ng the i tems
(d) i nserti ng and setti ng pri ori ty val ue to exi sti ng i tems
231. The process of spl i tti ng a text or expressi on i nto pi eces to determi ne i ts syntax i s cal l ed
(a) parsi ng (b) recursi ve descent (c) pruni ng (d) token
232. The subscri pt of an array must be
(a) >0 (b) >1 (c) negati ve (d) >=0
233. I nstance vari abl es are the vari abl es that are decl ared wi thi n a .
(a) cl ass (b) method (c) objects (d) constructor
234. The si ze of the appl et vi ewer wi ndow can be determi ned by usi ng the method
(a) getSi ze() (b) i nt getDescent
(c) i nt getHei ght() (d) i nt getAscent
235. The process of removi ng errors from a program i s cal l ed ..
(a) testi ng code (b) documentati on (c) debuggi ng (d) bug
236. How many characters are there i n the ASCI I characters set?
(a) 127 (b) 128 (c) 129 (d) 130
237. I n Java, the i ndex number of a stri ng al ways starts wi th
(a) 0 (b) 1 (c) 2 (d) 3
238. Mnemoni cs are provi ded by
(a) al gori thm (b) hi gh l evel l anguage
(c) assembl y l anguage (d) machi ne l anguage
239. The subscri pt cannot be
(a) an i nteger (b) posi ti ve number (c) negati ve number (d) equal to 0
240. .i s a cl ass modi fi er
(a) final (b) public (c) pri vate (d) abstract
241. Whi ch of the fol l owi ng i s used to determi ne pri me i mpl i cants and mi ni mal forms for
Bool ean expressi ons?
(a) karnaugh map (b) truth tabl e
(c) gate (d) i nverter
Test Yourself (Objective Type Questions) 115
242. Karnaugh map i nvol ves atmost.vari abl es
(a) 6 (b) 4 (c) 1 (d) 2
243. Whi ch attri bute i s not compul sory wi th the appl et tag?
(a) code base (b) hei ght (c) width (d) code
244. The method whi ch returns the current capaci ty of the stri ngbuffer object i s
(a) capacity() (b) l ength() (c) buffercapaci ty() (d) capa()
245. Whi ch one of the fol l owi ng i s not a method i ncl uded i n java.appl et.Appl et cl ass..
(a) start() (b) stop() (c) destroy() (d) end()
246. Fi nd out the super cl ass of al l appl ets.
(a) java.awt.graphi cs (b) java.appl et.Appl et
(c) java.appl et (d) java.awt.*;
247. A functi on can return
(a) many val ues (b) two val ues (c) onl y one val ue (d) three val ues
248. Fi nd the odd one out:
(a) cl ass di agram (b) acti vi ty di agram (c) sequence di agram (d) DFD
249. I n sol vi ng a probl em, the sequence of steps to be carri ed out i s cal l ed
(a) a program (b) a fl ow-chart (c) a pseudo code (d) an al gori thm
250. Whi ch of the fol l owi ng i s I NCORRECT?
(a) Val i dati on takes pl ace after veri fi cati on
(b) Veri fi cati on takes pl ace after val i dati on
(a) a (b) b
(c) depends on software (d) depends on data
251. The destructed object i s and
(a) memory recl ai med and garbage col l ected (b) destroyed and thrown away
(c) reused and i mpl emented (d) none of the above
252. When a subcl ass i s deri ved from a si ngl e super cl ass, the i nheri tance i s cal l ed
(a) si ngl e i nheri tance (b) doubl e i nheri tance
(c) mul ti pl e i nheri tance (d) none of the above
253. The ..keyword hal ts the executi on of the current l oop out of the l oop
(a) conti nue (b) break
(c) sl eep (d) none of the above
254. The AWT i s a package of cl asses that hel ps i n
(a) wri ti ng character based appl i cati ons (b) creati ng GUI based appl i cati ons
(c) creati ng networki ng appl i cati ons (d) none of the above
116 Placement Preparation
255. A..defi nes the shape and behavi our of an object and i s a templ ate for mul ti pl e objects
wi th si mi l ar features.
(a) Struct (b) Class
(c) templ ate (d) none of the above
256. An EventLi stener i nterface defi nes one or more methods to be i nvoked by the
(a) Event source (b) Event l i stener
(c) Event cl ass (d) none of the above.
257. The.read b.l ength bytes i nto the array b and returns the actual number of bytes
successful l y read.
(a) read[] (b) read(byte[])
(c) read[byte b()] (d) none of the above
258. To i mport a cl ass, the..keyword shoul d be used.
(a) new (b) i mport
(c) stati c (d) none of the above
259. The..i s used to fi nd the l ength of an array.
(a) Dot operator (b) Length
(c) new keyword (d) none of the above
260. An appl et can al so be executed usi ngappl i cati on, whi ch i s a part of the JDK.
(a) Appl etvi ewer (b) javac
(c) javacc (d) none of the above
261. The keywordi s used to enabl e synchroni zati on.
(a) runnabl e (b) synchroni zed
(c) throwabl e (d) none of the above
262. The most commonl y used protocol of the web i s
(a) SMTP (b) HTTP
(c) NNTP (d) none of the above
263. Thecl ass i s a non-abstract, recursi vel y nestabl e contai ner.
(a) button (b) panel
(c) l i st (d) none of the above
264. Each property i s treated as..of the cl ass.
(a) attri bute (b) i nstance
(c) vari abl e (d) none of the above
265. Thekeyword i ndi cates that i t i s a cl ass method and can be accessed wi thout creati ng
an object.
(a) stati c (b) l ocal
(c) extern (d) none of the above
Test Yourself (Objective Type Questions) 117
266. Two or more processes runni ng concurrentl y i n a computer i s cal l ed.
(a) mul ti threadi ng (b) mul ti programmi ng
(c) mul ti taski ng (d) none of the above
267. ....are used to destroy the objects created usi ng constructors.
(a) del etors (b) fi nal i zers
(c) final (d) none of the above
268. method sets background col or of the appl et.
(a) Background() (b) setBackground()
(c) setbackground() (d) none of the above
269. The.l ays out components i n a way very si mi l ar to a spreadsheet by rows and col umns.
(a) Gri dl ayout (b) Fl owl ayout
(c) Borderl ayout (d) none of the above
270. The.method i s used to pri nt error messages.
(a) System.out (b) Syste.err
(c) System.error (d) none of the above
271. ..i s a program that hel ps us l og on to other networks.
(a) Usenet (b) Fi nger servi ce
(c) FTP (d) none of the above
272. .i s a program or a tool that hel ps i n l ocati ng a fi l e anywhere on the net.
(a) FTP (b) Tel net
(c) Archi e (d) none of the above
273. The defaul t al i gnment of a l i ne i s..
(a) l ow (b) bottom l eft
(c) bottom ri ght (d) none of the above
274. A hyperl i nk can be.
(a) text onl y (b) i mage onl y
(c) text or i mage (d) none of the above
275. The tag used for comments i n java i s
(a) // (b) **
(c) /*.*/ (d) none of the above
276. The defaul t method to submi t data to the server i s
(a) GET (b) POST (c) SEND (d) END
277. ..al l ows di vi si on of a document i nto di sti nct secti ons.
(a) buttons (b) panel
(c) grid (d) none of the above
118 Placement Preparation
278. The fol l owi ng datatypes are supported by the Javascri pt
(a) number onl y (b) stri ngs onl y
(c) both Nul l and Bool ean (d) none of the above
279. ....i s used to defi ne the name and properti es of the object.
(a) destructor (b) #defi ne
(c) constructor (d) none of the above
280. Parsi ng i nvol ves eval uati ng each l i ne of the scri pt code and converti ng i t to.
(a) an i nteger (b) a stri ng
(c) bytes (d) pseudo-compi l ed byte code
281. Java i s anand ..l anguage devel oped by Sun Mi crosystems i n 1991.
(a) object-ori ented, mul ti -threaded (b) object-ori ented, mul ti -taski ng
(c) structured and procedural (d) scri pt and web desi gn
282. Thecl ass accepts i nput by usi ng a buffered array of bytes that acts as cache.
(a) buffer (b) i nputstream
(c) outputstream (d) none of the above
283. Networki ng i n Java i s possi bl e through the use of
(a) Java.net (b) Java.networks
(c) Java.networki ng (d) none of the above
284. ...vari abl es can be decl ared as fi nal vari abl es.
(a) temporary (b) auto
(c) gl obal (d) none of the above
285. To fi nd out what cl ass the object bel ongs to, thecan be used.
(a) get() (b) Get()
(c) GetCl ass() (d) none of the above
286. .i s a 32 bi t number whi ch has four numbers separated by peri ods.
(a) I P address (b) URL (c) DNS (d) FTP
287. ...l ayout i s often used al ong wi th panel s to di vi de the screen space i nto number of
cel l s.
(a) Fl owLayout (b) Gri dLayout
(c) BorderLayout (d) none of the above
288. The object cl ass has a subcl ass cal l edto handl e excepti ons and errors.
(a) Throwabl e (b) ThrowEnabl ed
(c) Throwi ng (d) none of the above
289. Whi ch two fi l es are used duri ng operati on of the DBMS?
(a) SQL and PL/SQL (b) DML and query l anguage
(c) Data di cti onary and transacti on l og (d) Data di cti onary and DDL.
Test Yourself (Objective Type Questions) 119
290. A data di cti onary i s a speci al fi l e that contai ns
(a) the names of al l fi el ds i n al l fi el ds (b) the data types of al l fi el ds i n al l fi l es
(c) the wi dths of al l fi el ds i n al l fi l es (d) metadata
291. An i nformati on system that suppl i es i nformati on speci fi cal l y to ai d managers wi th deci si on-
maki ng responsi bi l i ti es i s cal l ed a
(a) DBMS (b) MI S (c) DSS (d) ERP
292. The l ongest sequence of events i n a project i s cal l ed the...path.
(a) cri ti cal path (b) acti vi ty path (c) compl ex path (d) PERT
293. PERT and CPM are..techni ques.
(a) network (b) assi gnment
(c) project eval uati on (d) project management
294. Hungari an method i s a way of sol vi ng operati ons research probl em i n
(a) LPP (b) si mpl ex method
(c) assi gnment method (d) transportati on method
295. A constrai nt that does not affect the feasi bl e sol uti on regi on i s known as
(a) redundant constrai nt (b) sl ack vari abl e
(c) surpl us vari abl e (d) opti mal i ty
296. Probabi l i ty normal l y range from
(a) 0 to 1 (b) 0 to 0.1
(c) 1 to 100 (d) depends on the sampl e space
297. I n compi l ers, the syntax anal ysi s i s done by
(a) l exi cal anal yzer (b) syntax anal yzer
(c) parser (d) code generator
298. Bi nary means..
(a) two (b) thr ee (c) four (d) fi ve
299. The hexadeci mal di gi ts are 0 to 9 and A to..
(a) D (b) E (c) F (d) Z
300. BCD numbers express each di gi t as a ..
(a) byte (b) ni bbl e (c) bit (d) i nteger
301. An XOR gate recogni zes onl y words wi th an.number of 1s.
(a) odd (b) even
(c) depends on i nput (d) none of these
302. The EXCLUSI VE NOR gate i s equi val ent to a..gate fol l owed by an i nverter.
(a) OR (b) AND (c) NAND (d) XOR
120 Placement Preparation
303. A shi ft regi ster can be used for
(a) paral l el to seri al conversi on (b) seri al to paral l el conversi on
(c) di gi tal del ay l i ne (d) al l of these
304. ..i s known as uni versal gate.
(a) NOT gate (b) NAND gate (c) OR gate (d) NOR gate
305. A mul ti pl exer i s al so known as
(a) encoder (b) decoder
(c) data sel ector (d) data di stri butor
306. Whi ch i s the earl i est and most wi del y used shel l that came wi th the UNI X system?
(a) C shel l (b) Korn shel l (c) Bourne (d) Smi th shel l
307. A si ngl e character i nput from the keyboard can be obtai ned by usi ng the functi on
(a) printf() (b) scanf() (c) getchar() (d) putchar()
308. What wi l l be the output for the fol l owi ng?
#i nl cude <stdi o.h>
mai n()
{
fl oat f;
f=10/3;
pri ntf(%d,f);
}
(a) 3.3 (b) 3.0
(c) 3 (d) 3.33333333333
309. The functi on that sets the posi ti on to a desi red poi nt i n the fi l e i s
(a) fseek() (b) ftel l () (c) getw() (d) putc()
310. The process of cal l i ng a functi on usi ng poi nters to pass the address of vari abl e i s known
as
(a) cal l by val ue (b) cal l by reference
(c) poi nter argument (d) address val ue
311. Enumerati on i s
(a) a set of i ntegers (b) a l i st of stri ngs
(c) a set of l egal val ues possi bl e for a vari abl e (d) a l i st of operators
312. The C l anguage was devel oped by
(a) Marti ng Ri chards (b) Denni s Ri tchi e (c) Brain (d) Kani tkar
313. The comments i n C l anguage are pl aced between
(a) /* and *\ (b) /* and */ (c) //*and *// (d) #and #
Test Yourself (Objective Type Questions) 121
314. I n C l anguage, 5 represents
(a) an i nteger (b) a stri ng
(c) a character (d) al phanumeral
315. goto i s a..i n C programmi ng l anguage
(a) l abel (b) keyword (c) functi on (d) procedure
316. The statement pri ntf(%5.4f, 1.23459); i n C pri nts the fol l owi ng:
(a) 1.234560 (b) 1.2346 (c) 1.2345 (d) 1.234
317. The nul l character i s represented by
(a) \n (b) \0 (c) \o (d) \t
318. The bi twi se OR operator i s a
(a) unary operator (b) bi nary operator
(c) di gi tal operator (d) l ogi cal operator
319. Whi ch programmi ng l anguage was used for wri ti ng the UNI X operati ng system?
(a) C (b) C++ (c) PASCAL (d) BASI C
320. I n OSI network archi tecture, the routi ng i s performed by
(a) network l ayer (b) transport l ayer (c) sessi ons l ayer (d) physi cal l ayer
321. A devi ce that converts di gi tal si gnal s to anal og si gnal s i s
(a) modem (b) demodul ator (c) conver ter (d) si mpl i fi er
322. End-to-End connecti vi ty i s provi ded from host-to-host i n
(a) transport l ayer (b) physi cal l ayer (c) r outer (d) hub
323. Whi ch of the fol l owi ng deal s wi th error detecti on at a data l i nk l ayer?
(a) bi t stuffi ng (b) hammi ng codes
(c) character stuffi ng (d) cycl i c redundancy codes
324. A devi ce that l i nks two homogeneous packet-broadcast l ocal networks i s
(a) bri dge (b) hub (c) r outer (d) repeater
325. Whi ch of the fol l owi ng TCP/I P protocol i s used for remote termi nal connecti on servi ce?
(a) TELNET (b) FTP (c) SLI P (d) TFTP
326. A MODEM i s connected i n between a tel ephone l i ne and a
(a) computer (b) seri al port (c) paral l el port (d) adapter
327. Method of detecti ng and correcti ng transmi ssi on errors i n data i s known as
(a) handshake (b) debuggi ng (c) hammi ng code (d) checksum
328. Whi ch of the fol l owi ng i s used to mi ni mi ze data errors when data i s transferred?
(a) checksum (b) check bi t (c) transmi t (d) patchi ng
329. ALGOL i s a.l anguage.
(a) al gori thmi c (b) assembl y (c) machi ne (d) l ow l evel
122 Placement Preparation
330. The symbol s used i n assembl y l anguage are
(a) codes (b) mnemoni cs (c) # (d) 0 and 1
331. The ti me requi red for the fetchi ng and executi on of one sampl e machi ne i nstructi on i s
(a) throughput (b) CPU cycl e (c) access ti me (d) seek ti me
332. The range of frequenci es avai l abl e for data transmi ssi on i s known as
(a) baud (b) bandwidth (c) byte (d) bi ts
333. The term MI PS refers to
(a) mi l l i on i nstructi ons per second (b) mi l l i on i nstructi ons per mi nute
(c) mi l l i on i nformati on per second (d) megabytes of i nstructi on per system
334. Bankers al gori thm deal s wi th
(a) deadl ock avoi dance (b) deadl ock preventi on
(c) cri ti cal regi on (d) segmentati on
335. The term process i n operati ng system refers to
(a) program i n executi on (b) sequence of events
(c) set of jobs (d) segments
336. The Round Robi n schedul i ng i s essenti al l y the preempti ve versi on of
(a) FI FO (b) LI FO (c) SJF (d) SSTE
337. The pri nci pal of l ocal i ty of reference justi fi es the use of
(a) cache memory (b) vi rtual memory
(c) paging (d) segmentati on
338. CAD/CAM i s the i nter-rel ati onshi p between
(a) desi gn and manufacturi ng
(b) desi gn and marketi ng
(c) desi gn and management
(d) engi neeri ng and materi al s management
339. Name the r egi ster or stor age l ocati on that for ms the r esul t of ar i thmeti c or l ogi c
operati on?
(a) accumul ator (b) adapter (c) memory regi sters (d) processor
340. Name the i nterface card that al l ows the PC to connect to peri pheral ?
(a) adapter (b) MODEM (c) connector (d) cel l
341. Name the devi ce whi ch regenerates an anal ogue si gnal , thus i ncreasi ng the di stance
wi th whi ch the si gnal can be sent?
(a) ampl i fi er (b) regul ator
(c) mul ti pl exer (d) anal og transmi tter
342. Whi ch of the fol l owi ng i s used to change the shape of an object?
(a) aspect rati o (b) assembl er (c) attenuati on (d) appl etal k
Test Yourself (Objective Type Questions) 123
343. Name the el ectroni c tube wi th a screen upon whi ch i nformati on may be di spl ayed?
(a) carri er (b) scr een (c) moni tor (d) CRT
343. The provi si on of a di rect, dedi cated, physi cal path between two communi cati ng devi ces i s
referred as
(a) ci rcui t swi tchi ng (b) packet swi tchi ng (c) di ode (d) cabl i ng
344. The degree of dependence of one modul e upon another i s cal l ed
(a) coupl i ng (b) cohesi on (c) data i ndependence (d) modul ari ty
345. The si mul taneous sendi ng and recei vi ng of data over a communi cati on path i s cal l ed
(a) ful l -dupl ex transmi ssi on (b) si mpl ex transmi ssi on
(c) hal f-dupl ex transmi ssi on (d) ful l -dupl ex frame
346. Name the bar chart that depi cts the ti mi ng of compl eti on of a seri es of tasks?
(a) pi e chart (b) gantt chart (c) hi stogram (d) PERT
347. The fetch and decode steps i n the process of performi ng an i nstructi on i s cal l ed
(a) i nstructi on cycl e (b) i nstructi on set (c) process cycl e (d) i nstructor
348. I nternet i s a
(a) VAN (b) set of computers
(c) network of network (d) col l ecti on of routers
349. Whi ch of the fol l owi ng i s not a memory management techni que?
(a) paging (b) segmentati on (c) demand pagi ng (d) thrashi ng
350. Whi ch of the fol l owi ng i s rel ated wi th operati ng system?
(a) CRT (b) SPOOL (c) mul ti pl exi ng (d) crashi ng
351. ...i s a decl arati on of a functi on type (what i t returns) and the number and type
of arguments, i f any, that the functi on expects.
(a) functi on prototype (b) functi on cal l
(c) functi on decl arati on (d) functi on defi ni ti on
352. The i nformati on we pass to the functi on i s cal l ed..
(a) argument (b) r efer ence
(c) parameter (d) functi on prototype
353. An el ement of a structure can be a poi nter to another structure of the same type. Thi s
i s cal l ed a
(a) cl ass (b) nested structures
(c) sel f-referenti al structure (d) poi nter to structure
354. Whi ch of the fol l owi ng i s not a reserved word i n C?
(a) for (b) goto (c) if (d) newl i ne
355. Whi ch of the fol l owi ng i s used when dereferenci ng a poi nter to a structure?
(a) arrow operator (b) dot operator
(c) & (d) member name as decl ared i n structure
124 Placement Preparation
356. Whi ch of the fol l owi ng i s not a network topol ogy?
(a) star (b) ri ng (c) mesh (d) square
357. A forest F i s a set of
(a) rooted trees (b) nodes (c) B-tree (d) set of subtrees
358. An orchard O wi l l consi st of
(a) an ordered tree (b) B-tree (c) subtree (d) rooted tree
359. A free tree i s defi ned as a connected undi rected graph wi th
(a) two cycl es (b) onl y one cycl e (c) no cycl es (d) three cycl es
360. Al l i nternal nodes except the root have at most m chi l dren, and at l east %m/2% chi l dren
i s the property of
(a) B-Tree (b) forest
(c) AVL tree (d) bi nary search tree
361. Transl ati on of an expressi on by recursi ve descent i s cal l ed..
(a) parsi ng (b) top-down parsi ng
(c) pruni ng (d) pol i sh notati on
362. I f E i s a properl y formed expressi on i n postfi x form, then E must sati sfy the fol l owi ng
condi ti on..
(a) race condi ti on (b) runni ng-sum condi ti on
(c) quadrati c formul a (d) pol i sh notati on
363. A tree wi th n verti ces i s an __________i f each edge i s assi gned a uni que posi ti ve i nteger
between 1 and (n-1).
(a) edge-l abel ed tree (b) tr ee (c) rooted tree (d) AVL tree
364. Every branch of a spanni ng tree defi nes a ______________
(a) uni que fundamental cut-set (b) cut-set
(c) cut-vertex (d) tr ee
365. I n order to traverse a graph we have to process every node exactl y __________.
(a) once (b) twi ce (c) thri ce (d) at l east twi ce
366. General l y two traversal techni ques are used for the graph______________.
(a) depth-fi rst search, breadth-fi rst search (b) top down and bottom up
(c) greedy and dynami c strategy (d) depth and best-fi rst search
367. The Breath-fi rst search mai ntai ns a _________, fi rst-i n, fi rst-out where the unvi si ted
el ements are kept.
(a) stack (b) queue (c) l i nked l i st (d) l i st
368. The predecessor poi nters of the breadth-fi rst search defi nes ___________
(a) tr ee (b) i nverted tree (c) stack (d) queue
Test Yourself (Objective Type Questions) 125
369. Whenever depth-fi rst search appl i es on any graph, i t yi el ds a ____________.
(a) tr ee (b) depth-fi rst tree
(c) l i st (d) best-fi rst search
370. Let a graph G = (V,E), i f T i s a sub-graph of G and contai ns al l the verti ces but no cycl e
ci rcui t, then T i s sai d to be a ______.
(a) tr ee (b) spanni ng tree (c) cycl e (d) AVL tree
371. A mi ni mum spanni ng tree (MST i n short) i s a spanni ng tree of _________.
(a) no wei ght (b) mi ni mum wei ght (c) l arge wei ght (d) none of these
372. For computi ng the mi ni mum cost spanni ng tree there are two al gori thms ______________
whi ch are based on greedy techni que.
(a) breadth-fi rst and depth-fi rst (b) Kruskal s and Pri ms
(c) breadth-fi rst and best-fi rst (c) Kruskal s and Dynami c programmi ng
373. The ________i s based upon dynami c programmi ng techni que i n whi ch the key part i s to
reduce a l arge probl em i nto smal l er probl ems.
(a) heuri sti c al gori thm (b) fl oyd-warshal l al gori thm
(c) MST (d) graphs
374. A _______i s a wei ghted graph or a wei ghted di graph.
(a) MST (b) network (c) connected graph (d) cut-set
375. A _________i s a di graph whose underl yi ng graph i s a forest
(a) tr ee (b) di rected forest (c) MST (d) i nverted tree
376. I f a graph i s strongl y connected, i t has an arborescence rooted at _________
(a) every edge (b) every vertex (c) every tree (d) any vertex
377. The number of fundamental cycl es of a connected graph wi th respect to a spanni ng tree
i s _____________
(a) 0 (b) based on verti ces & edges
(c) 1 (d) none of these
378. Network fl ow probl ems can be formul ated and sol ved usi ng ______
(a) tr ee (b) MST (c) graphs (d) None of these
379. The max-fl ow mi n-cut theorem i s rel ated to
(a) IC (b) OR (c) graphs (d) stack
380. A project i s di vi ded i nto many wel l -defi ned and non overl appi ng i ndi vi dual jobs, cal l ed
_________
(a) events (b) path (c) acti vi ti es (d) subnet
381. A _______can be drawn to depi ct the project
(a) graph (b) tr ee (c) wei ghted graph (d) PERT
126 Placement Preparation
382. A wei ghted, connected di graph representi ng acti vi ti es i n a project i s cal l ed an _________
(a) forest (b) CPM (c) acti vi ty network (d) network
383. The vertex denoti ng the termi nati on of the project must have _________
(a) zero i n-degree (b) nul l vertex (c) zero out-degree (d) nul l tree
384. The l ongest di rected path i s cal l ed a _________.
(a) path (b) l ongest path (c) cri ti cal path (d) di rected graph
385. _________i s whi te-box testi ng techni que fi rst proposed by Tom McCabe.
(a) fl ow graphs (b) deci si on tree (c) basi s path testi ng (d) smoke testi ng
386. A fl owchart i s used to depi ct _________
(a) swi tch statement (b) structure
(c) cl ass (d) program control structure
387. _________i s software metri c that provi des a quanti tati ve measure of the l ogi c compl exi ty
of a program.
(a) WMC (b) LOC
(c) DI T (d) cycl omati c compl exi ty
388. Cycl omati c compl exi ty, V(G), for a fl ow graph, G, i s defi ned as __________.
(N- Number of verti ces and E- Number of edges)
(a) V(G) = E+N+2 (b) V(G) = EN2
(c) V(G) = E*N+2 (d) V(G) = EN+2
389. The basi s path testi ng method can be appl i ed to a ___________
(a) source code onl y (b) structure
(c) cl ass (d) procedural desi gn or source code
390. To devel op a software tool that assi sts i n basi s path testi ng, a data structure cal l ed a
___________, can be qui te useful .
(a) stack (b) queue (c) l i nked l i st (d) graph matri x
391. ________can al so be appl i ed at the behavi oral (bl ack-box) l evel . The graph wi l l assi st i n
i denti fyi ng those l oops that need to be tested.
(a) control testi ng (b) smoke testi ng (c) regressi on testi ng (d) l oop testi ng
392. _____________________hel ps i n anal yzi ng the i ntri nsi c paral l el i sm of a program.
(a) deci si on tabl e (b) deci si on tree
(c) DFD (d) structured chart
393. Whi ch of the fol l owi ng i s not a part of SDLC?
(a) anal ysi s (b) software cost esti mati on
(c) desi gn (d) SRS
394. Whi ch of the fol l owi ng i s not a part of software testi ng?
(a) fi xi ng bugs (b) debuggi ng (c) V&V (d) faul t tol erance
Test Yourself (Objective Type Questions) 127
395. .... i s an umbrel l a acti vi ty that i s appl i ed throughout the software process.
(a) SQA (b) V&V
(c) confi gurati on management (d) change management
396. FTR (Formal techni cal revi ew) i s a performed by software engi neers.
(a) software qual i ty assurance acti vi ty (b) software testi ng acti vi ty
(c) change management acti vi ty (d) confi gurati on management acti vi ty
397. Whi ch of the fol l owi ng addresses both software and hardware qual i ty management?
(a) CMM (b) PCMM (c) TQM (d) CMMI
398. How many cl asses of l oops are there?
(a) 1 (b) 2 (c) 3 (d) 4
399. Whi ch of the fol l owi ng i s an approach of i ntegrati on testi ng?
(a) stress testi ng (b) performance testi ng
(c) smoke testi ng (d) V&V
400. Whi ch of the fol l owi ng testi ng tool i s used to test cl i ent/server appl i cati ons?
(a) JMeter (b) Load Runner (c) Wi n Runner (d) TSL
401. .... i s an i nformal meeti ng for eval uati on or i nformati onal purposes?
(a) i nspecti on (b) wal kthrough (c) revi ew (d) testi ng
402. ...i s a document that descri bes the objecti ves, scope, approach, and focus of
a software testi ng effort.
(a) software test case (b) software test pl an
(c) TSL (d) test desi gn
403. A .. i s a document that descri bes an i nput, acti on, or event and an expected
response, to determi ne i f a feature of an appl i cati on i s worki ng correctl y.
(a) test document (b) test case (c) test pl an (d) test fi l e
404. What to do when there i s no enough ti me for thorough testi ng?
(a) use ri sk anal ysi s (b) use SCM
(c) use test budget (d) reduce test cases
405. Whi ch of the fol l owi ng can be qui te compl ex to test?
(a) open systems (b) OOPS
(c) packaged software (d) C/S appl i cati on
406. ...software metri c deal s wi th counti ng al l physi cal l i nes of code, the number of
statements and the number comment l i nes.
(a) l i ne count (b) CC (c) WMC (d) DI T
407. .... i s a count of the methods i mpl emented wi thi n a cl ass or the sum of the
compl exi ti es of the methods.
(a) wei ghted methods per cl ass (b) DI T
(c) CC (d) NOC
128 Placement Preparation
408. . i s the cardi nal i ty of the set of al l methods that can be i nvoked i n response to
a message to an object of the cl ass or by some method i n the cl ass.
(a) response for a cl ass (b) wei ghted methods per cl ass
(c) mappi ng cardi nal i ty (d) cardi nal i ty rati o
409. Hi gh cohesi on i ndi cates .
(a) good cl ass subdi vi si on (b) poor cl ass subdi vi si on
(c) compl exi ty of a cl ass (d) rel i abi l i ty of a software modul e
410. .... i s a count of the number of other cl asses to whi ch a cl ass i s coupl ed.
(a) coupl i ng between object cl asses (CBO) (b) DI T
(c) LCOM (d) cycl omati c compl exi ty
411. ....i s the number of i mmedi ate subcl asses subordi nate to a cl ass i n the hi erarchy.
(a) number of chi l dren (NOC) (b) LCOM
(c) coupl i ng between object cl asses (CBO) (d) RFC
412. Whi ch one of the fol l owi ng i s rel ated to recursi on?
(a) stack (b) queue (c) l i nked l i st (d) tr ee
413. The i nserti on operati on i n a queue i s cal l ed
(a) enqueue (b) dequeue (c) i nqueue (d) i nsert
414. The del eti on operati on i n a queue i s cal l ed
(a) dequeue (b) enqueue (c) del ete (d) del queue
415. I n a tree, nodes havi ng degree zero are known as .and the nodes other than
these nodes are known as ..
(a) termi nal nodes and non-termi nal nodes (b) non-termi nal nodes and termi nal nodes
(c) root and l eaf (d) l eaf and root
416. The .of a node are al l the nodes al ong the path from the root node to that node.
(a) ancestors (b) path (c) depth (d) hei ght
417. The .of a tree i s the maxi mum l evel of any node i n the tree.
(a) hei ght (b) wei ght (c) depth (d) l ength
418. ....i s a speci al cl ass of data structure i n whi ch the number of chi l dren of any
node i s restri cted to atmost two.
(a) bi nary tree (b) heap (c) sparse matri x (d) AVL tree
419. A tree havi ng m nodes has exactl y ..edges or branches.
(a) (m-1) (b) (m+1) (c) (m-2) (d) (m+2)
420. A tree i s a .
(a) non-l i near data structure (b) l i near data structure
(c) ci rcul ar data structure (d) rooted structure
Test Yourself (Objective Type Questions) 129
421. A..i s an ordered set of el ements whi ch i s defi ned recursi vel y.
(a) bi nomi al tree (b) bi nomi al heap
(c) fi bonacci heap (d) bi nary tree
422. The runni ng ti me for i nserti on sort al gori thm under best case i s
(a) O(n) (b) O(l og n) (c) O(l og n*n) (d) O(n l og n)
423. The runni ng ti me for merge sort al gori thm under best case i s
(a) O(n) (b) O(l og n) (c) O(l og n*n) (d) O(n l og n)
424. Whi ch of the fol l owi ng was i ntroduced by Adel son-Vel ski i and Landi s i n 1962?
(a) AVL tree (b) bi nary tree (c) bi nary search tree (d) bal anced tree
425. Whi ch of the fol l owi ng refl ects the bal ance factor for a node i n AVL tree?
(a) {0,1,2} (b) {0,-1,1} (c) {0,1} (d) {-1,0,1}
426. Whi ch of the fol l owi ng i s not a property of Red-Bl ack tree?
(a) the root node i s col oured bl ack
(b) the root node contai ns a val ue
(c) a red col oured node has no red col oured chi l dren
(d) every l eaf node i s col oured bl ack
427. An edge to a bl ack node i n Red-Bl ack tree i s cal l ed
(a) red edge (b) bl ack edge (c) bl ack l evel (d) edge poi nt
428. ... provi des the di rect access of record from the fi l e no matter where the
record i s i n the fi l e.
(a) hashi ng (b) chai ni ng (c) red-bl ack tree (d) AVL tree
429. Whi ch of the fol l owi ng deal s wi th mi ni mi si ng col l i si on?
(a) open addressi ng (b) cl osed addressi ng (c) sorti ng (d) l i near probi ng
430. I n Bi nary search tree, every nodes val ue i s greater than i ts and l esser than i ts
....
(a) l eft subtree, ri ght subtree (b) ri ght subtree, l eft subtree
(c) depends on roots val ue (d) depends on hei ght of the tree
431. I f any NP-compl ete probl ems bel ong to cl ass P, then
(a) P=NP (b) PNP (c) P>NP (d) P<NP
432. Whi ch of the fol l owi ng i s true wi th respect to ci rcul ar l i nked l i st?
(a) Last node poi nts to the fi rst node
(b) Last node contai ns nul l poi nter
(c) I f l ast node contai ns val ue, then i t wi l l not poi nt to fi rst node
(d) The fi rst node and l ast node must contai n the same val ue
130 Placement Preparation
433. The basi c tree traversal techni ques are
(a) breadth-fi rst, depth-fi rst and best-fi rst (b) prefi x, i nfi x and postfi x
(c) pre-order, i n-order and post-order (d) breadth-fi rst, depth-fi rst and heuri sti c
434. The amount of ti me needed by an al gori thm to run to compl eti on i s referred as
(a) space compl exi ty (b) ti me compl exi ty
(c) al gori thm val i dati on (d) executi on ti me
435. An i ncorrect step, process, or data defi ni ti on i n a computer program i s termed as
(a) fault (b) er r or (c) fai l ure (d) None of these
436. To detect, l ocate, and correct faul ts i n a computer program i s cal l ed
(a) testi ng (b) debuggi ng (c) error fi xi ng (d) faul t tol erance
437. Whi ch of the fol l owi ng adversel y affects software testi ng?
(a) poor project schedul i ng (b) unstabl e requi rements
(c) compl exi ty i n desi gn (d) LOC i s hi gh
438. Can we wri te a functi on si mi l ar to pri ntf()?
(a) YES (b) NO
(c) depends on scanf() (d) usi ng poi nters onl y
439. Name the functi on whi ch can be used to convert an i nteger or a fl oat to a stri ng?
(a) mal l oc() (b) sprintf() (c) typecasti ng (d) stri ng()
440. What are the di fferent fi l e extensi ons that are created by Oracl e Reports?
(a) .RDF fi l e & .RPX fi l e (b) .RDX fi l e & .RDF fi l e
(c) .REP fi l e & .RDF fi l e (d) none of these
441. SHOW_ALERT functi on returns
(a) bool ean (b) number
(c) character (d) none of the above
442. What are the di fferent events i n Tri ggers?
(a) Defi ne, Create (b) Drop, Comment
(c) I nsert, Update, Del ete (d) Update, Del ete
443. Whi ch of the fol l owi ng i s VALI D i n PL/SQL ?
(a) Sel ect ... i nto (b) Updates (c) Create (d) Del etes
444. Whi ch of the fol l owi ng i s CORRECT about Cursor?
(a) Cursor i s a named PL/SQL area
(b) Cursor cannot hol ds resul ts from a query
(c) Cursor i s used for retri evi ng mul ti pl e rows
(d) SQL uses i mpl i ci t Cursors to i nsert rows
Test Yourself (Objective Type Questions) 131
445. Fi nd the ODD one out?
(a) DDL (b) DML (c) DCL (d) PL/SQL
446. Whi ch of the fol l owi ng i s not correct about User_Defi ned Excepti ons ?
(a) must be decl ared
(b) must be rai sed expl i ci tl y
(c) rai sed automati cal l y i n response to an oracl e error
(d) none of these
447. Name the two parts of the procedure i n ORACLE?
(a) procedure speci fi cati on and procedure body.
(b) procedure defi ni ti on and procedure body.
(c) procedure decl arati on and procedure body.
(d) none of these
448. Name the error handl i ng part of PL/SQL bl ock?
(a) excepti on (b) bug (c) tri gger (d) debuggi ng
449. Name the two types of cursors i n PL/SQL?
(a) i mpl i ci t and expl i ci t cursors (b) i nternal and external cursors
(c) l ower and hi gher l evel cursors (d) user defi ned and bui l t-i n cursors
450. I n PL/SQL, the term PL stands for
(a) procedural l anguage (b) programmi ng l anguage
(c) procedural l atex (d) packaged l anguage
132 Placement Preparation
ANSWERS
1. (c) 44. (c) 87. (a) 130. (a) 173. (a) 216. (a)
2. (b) 45. (d) 88. (a) 131. (b) 174. (a) 217. (d)
3. (b) 46. (d) 89. (d) 132. (a) 175. (a) 218. (a)
4. (c) 47. (a) 90. (d) 133. (c) 176. (a) 219. (a)
5. (a) 48. (d) 91. (a) 134. (d) 177. (a) 220. (a)
6. (a) 49. (c) 92. (c) 135. (b) 178. (a) 221. (a)
7. (a) 50. (c) 93. (c) 136. (c) 179. (b) 222. (c)
8. (a) 51. (c) 94. (c) 137. (b) 180. (a) 223. (b)
9. (a) 52. (c) 95. (b) 138. (c) 181. (a) 224. (a)
10. (a) 53. (b) 96. (c) 139. (a) 182. (a) 225. (a)
11. (a) 54. (c) 97. (b) 140. (c) 183. (a) 226. (a)
12. (a) 55. (d) 98. (c) 141. (a) 184. (a) 227. (d)
13. (a) 56. (a) 99. (b) 142. (a) 185. (a) 228. (a)
14. (b) 57. (b) 100. (d) 143. (d) 186. (a) 229. (a)
15. (b) 58. (c) 101. (a) 144. (a) 187. (a) 230. (b)
16. (a) 59. (c) 102. (b) 145. (d) 188. (a) 231. (a)
17. (a) 60. (b) 103. (d) 146. (d) 189. (a) 232. (a)
18. (d) 61. (d) 104. (a) 147. (b) 190. (a) 233. (d)
19. (d) 62. (b) 105. (a) 148. (a) 191. (a) 234. (a)
20. (b) 63. (c) 106. (a) 149. (d) 192. (a) 235. (c)
21. (b) 64. (c) 107. (a) 150. (c) 193. (a) 236. (b)
22. (d) 65. (c) 108. (a) 151. (c) 194. (d) 237. (a)
23. (b) 66. (d) 109. (a) 152. (d) 195. (a) 238. (c)
24. (b) 67. (c) 110. (a) 153. (b) 196. (a) 239. (c)
25. (b) 68. (d) 111. (a) 154. (a) 197. (a) 240. (d)
26. (a) 69. (c) 112. (a) 155. (b) 198. (c) 241. (a)
27. (a) 70. (c) 113. (a) 156. (a) 199. (a) 242. (a)
28. (a) 71. (a) 114. (a) 157. (a) 200. (a) 243. (a)
29. (a) 72. (b) 115. (a) 158. (b) 201. (a) 244. (a)
30. (c) 73. (a) 116. (a) 159. (c) 202. (a) 245. (d)
31. (a) 74. (d) 117. (a) 160. (a) 203. (a) 246. (b)
32. (a) 75. (b) 118. (a) 161. (b) 204. (a) 247. (c)
33. (b) 76. (d) 119. (a) 162. (d) 205. (a) 248. (d)
34. (a) 77. (a) 120. (a) 163. (a) 206. (a) 249. (d)
35. (b) 78. (b) 121. (d) 164. (a) 207. (a) 250. (b)
36. (a) 79. (a) 122. (a) 165. (a) 208. (b) 251. (a)
37. (a) 80. (c) 123. (b) 166. (d) 209. (d) 252. (a)
38. (d) 81. (d) 124. (a) 167. (d) 210. (a) 253. (b)
39. (a) 82. (c) 125. (a) 168. (a) 211. (b) 254. (b)
40. (a) 83. (c) 126. (a) 169. (c) 212. (d) 255. (b)
41. (a) 84. (b) 127. (b) 170. (c) 213. (d) 256. (c)
42. (a) 85. (c) 128. (b) 171. (a) 214. (a) 257. (d)
43. (a) 86. (a) 129. (b) 172. (b) 215. (a) 258. (a)
Test Yourself (Objective Type Questions) 133
259. (b) 302. (d) 345. (a) 388. (d) 431. (a)
260. (a) 303. (d) 346. (b) 389. (d) 432. (a)
261. (b) 304. (b) 347. (a) 390. (d) 433. (C)
262. (b) 305. (c) 348. (c) 391. (d) 434. (b)
263. (b) 306. (c) 349. (d) 392. (d) 435. (a)
264. (a) 307. (c) 350. (b) 393. (b) 436. (b)
265. (a) 308. (b) 351. (a) 394. (d) 437. (b)
266. (b) 309. (a) 352. (a) 395. (a) 438. (a)
267. (d) 310. (b) 353. (c) 396. (a) 439. (b)
268. (b) 311. (c) 354. (d) 397. (c) 440. (c)
269. (a) 312. (b) 355. (a) 398. (a) 441. (b)
270. (c) 313. (b) 356. (d) 399. (d) 442. (c)
271. (d) 314. (c) 357. (a) 400. (c) 443. (a)
272. (a) 315. (b) 358. (a) 401. (b) 444. (c)
273. (d) 316. (b) 359. (c) 402. (b) 445. (d)
274. (c) 317. (b) 360. (a) 403. (b) 446. (c)
275. (b) 318. (b) 361. (b) 404. (a) 447. (a)
276. (b) 319. (a) 362. (b) 405. (d) 448. (a)
277. (d) 320. (a) 363. (a) 406. (a) 449. (a)
278. (d) 321. (a) 364. (a) 407. (a) 450. (a)
279. (b) 322. (a) 365. (a) 408. (b)
280. (b) 323. (d) 366. (a) 409. (a)
281. (a) 324. (a) 367. (b) 410. (a)
282. (d) 325. (a) 368. (b) 411. (a)
283. (a) 326. (a) 369. (b) 412. (a)
284. (d) 327. (c) 370. (b) 413. (a)
285. (d) 328. (a) 371. (b) 414. (a)
286. (a) 329. (a) 372. (b) 415. (a)
287. (b) 330. (b) 373. (b) 416. (a)
288. (a) 331. (b) 374. (b) 417. (a)
289. (c) 332. (b) 375. (b) 418. (a)
290. (d) 333. (a) 376. (b) 419. (a)
291. (b) 334. (a) 377. (b) 420. (a)
292. (a) 335. (a) 378. (c) 421. (a)
293. (c) 336. (a) 379. (c) 422. (a)
294. (c) 337. (a) 380. (c) 423. (d)
295. (a) 338. (a) 381. (c) 424. (a)
296. (a) 339. (a) 382. (c) 425. (d)
297. (c) 340. (a) 383. (c) 426. (b)
298. (a) 341. (a) 384. (c) 427. (b)
299. (c) 342. (a) 385. (d) 428. (a)
300. (b) 343. (d) 386. (d) 429. (d)
301. (a) 344. (a) 387. (d) 430. (a)
134 Placement Preparation
1. Understandi ng Poi nters i n C, Yashvant P. Kanetkar, BPB Publ i cati ons, 1995.
2. C A Software Engi neeri ng Approach, Peter A. Darnel l , Phi l i p E. Margol i s, Narosa
Publ i shi ng House, 1991.
3. Programmi ng i n ANSI C, E. Bal agurusamy, Tata McGraw-Hi l l , 1998.
4. Test Your C Ski l l s, Yashvant P.Kanetkar, BPB Publ i cati ons, 1996.
5. Test your C++ ski l l s, Yashvant P. Kanetkar, BPB Publ i cati ons, 2002.
6. Object-Ori ented Programmi ng i n Turbo C++, Robert Lafore, Gal goti a Publ i cati ons, 1998.
7. Software Engi nneri ng, Roger S. Pressman, Tata McGraw-Hi l l , 2001.
8. Software Testi ng Tool s, Dr. K.V.K.K. Prasad, Dreamtech, NewDel hi , 2004.
9. Enterpri se Resource Pl anni ng, Al exi s Leon, Tata McGraw-Hi l l , 2003.
10. I ntroducti on to Al gori thms, Thomas H. Cormen, Prenti ce Hal l of I ndi a, 2002.
11. Java 2: The Compl ete Reference, Herbert Schi l dt, Tata McGraw-Hi l l , 2002.
12. Operati ng System Concepts, Abraham Si l berschatz, John Wi l ey & Sons, 2004.
13. Di gi tal Pri nci pl es and Appl i cati ons, Al bert Paul Mal vi no, Donal d P. Leach, Tata McGraw-
Hi l l , 1996.
14. Database System Concepts, Abraham Si l bertschatz, Henry F. Korth, S. Sudharshan,
Tata McGraw-Hi l l , 1997.
15. Computer Networks, Andrew S. Tenanbaum, Prenti ce Hal l of I ndi a, 1997
16. C Programmi ng Language, Brai n W. Kerni ghan and Denni s M.Ri tchi e, Prenti ce Hal l of
I ndi a, 1995.
17. An I ntroducti on to Database Systems, Date C.J., Addi son Wesl ey Publ i shi ng Company,
1997.
18. El ectroni c Commerce A Manageri al Perspecti ve, Efrai m Turban, Jae Lee, Davi d Ki ng,
H. Mi chael Chung, Pearson Educati on, 2000.
19. Data Structures and Program Desi gn i n C, Robert L. Kruse, Bruce P. Leung, Cl ovi s
L. Tondo, Prenti ce Hal l of I ndi a, 1998.
Bibliography

You might also like