most useful for freshers (1)

Upload: k-vinay-kumar

Post on 04-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Most Useful for Freshers (1)

    1/134

  • 8/13/2019 Most Useful for Freshers (1)

    2/134

    Table of Contents

    Data Structures Aptitude...........................................................3

    + Aptitude and OOPS..............................................................52

    Quantitative Aptitude..............................................................72

    UNIX Concepts........................................................................!

    Concepts................................................................................."3

    SQ#........................................................................................$%!

    Co&puter Net'or(s..............................................................$$%

    Operatin) S*ste&s................................................................$$

    5.IN,-/I-0 ,IPS................................................................$2$

    1otivatin) 'ords...................................................................$27

    $.At an* cost dont et *our 4ope do'n 6od is t4ere to support*ou........................................................................................$2"

    Useu 'e8sites.....................................................................$3%

    Co&pan* test patterns..........................................................$3$

    6enera a9s..........................................................................$32

  • 8/13/2019 Most Useful for Freshers (1)

    3/134

    Data Structures Aptitude1. What is data structure?

    A data structure is a way of organizing data that considers not only the items stored, but alsotheir relationship to each other. Advance knowledge about the relationship between data items allowsdesigning of efficient algorithms for the manipulation of data.

    2. List out the areas in which data structures are applied extensively? Compiler Design, Operating System,

    Database anagement System, Statistical analysis package, !umerical Analysis, "raphics, Artificial #ntelligence, Simulation

    3. What are the major data structures used in the following areas : !"#$% &etwor' data model ()ierarchical data model.

    $D%S & Array 'i.e. Array of structures( !etwork data model & "raph )ierarchical data model & *rees

    *. +f you are using , language to implement the heterogeneous lin'ed list% what pointer type will youuse?

    *he heterogeneous linked list contains different data types in its nodes and we need a link,

    pointer to connect them. #t is not possible to use ordinary pointers for this. So we go for void pointer. +oidpointer is capable of storing pointer to any type as it is a generic pointer type.-. #inimum numer of /ueues needed to implement the priority /ueue?

    *wo. One ueue is used for actual storing of data and another for storing priorities.

    0. What is the data structures used to perform recursion?Stack. %ecause of its -#O '-ast #n irst Out( property it remembers its /caller0 so knows whom to

    return when the function has to return. $ecursion makes use of system stack for storing the returnaddresses of the function calls.

    very recursive function has its e/uivalent iterative nonrecursive4 function. 1ven when sucheuivalent iterative procedures are written, e2plicit stack is to be used.

    5. What are the notations used in valuation of 6rithmetic xpressions using prefix and postfix forms?3olish and $everse 3olish notations.

    7. ,onvert the expression 6 8 "4 9 , ! 4 ; < 8 =44 to e/uivalent >refix and >ostfix notations.3refi2 !otation4

    5 6 7 8A%C 6 D1 8 "3ostfi2 !otation4

    A% 8 C 7 D1 6 6 " 8 5

    . $orting is not possile y using which of the following methods?

    a4 +nsertion4 $electionc4 xchanged4 !eletion

    Data StructuresAptitude

  • 8/13/2019 Most Useful for Freshers (1)

    4/134

    9sing insertion we can perform insertion sort, using selection we can perform selection sort,using e2change we can perform the bubble sort 'and other similar sorting methods(. %ut no sortingmethod can be done :ust using deletion.

    1@. 6 inary tree with 2@ nodes has null ranches?;7 arr;D(TT'7 arr;D >> arr;DM@N(( (W

    ]Ans'er

    aaaW it means that the first functionpointer in the array is initialized with the address of the function aaa. Similarly, theother two array elements also get initialized with the addresses of the functions bbb andccc. Since ptrM;N contains the address of the function ccc, the call to the function ptrM;N'( is same as calling ccc'(. So it results in printing LbyeL.

    88i >>?(W]

    Ans'er;1

    - '88i>>?(, because >> is of higher precedencethan > operator. #n the inner e2pression, 88i is eual to ? yielding true'

  • 8/13/2019 Most Useful for Freshers (1)

    40/134

    \ char pM N>LVdYnLW

    pM cWprintf'p,?=(W

    ]Ans'er;

    A- \/s0,0o0,0m0,0e0,0Y@0]Wwhile 'strcmp'str@W( printf'ZVd[,i(W

    ]

    Ans'er;Compiler 1rror4 -value reuired.

    -

  • 8/13/2019 Most Useful for Freshers (1)

    41/134

    int 7cptr > 'int7(calloc'sizeof'int(, 4 legala>L)iL 4 illegal

    B. Same as

  • 8/13/2019 Most Useful for Freshers (1)

    42/134

    i>iT>:TT,:>FW: > : UU i88 TT printf'LHO9 CA!L(Wprintf'LVd VdL, i, :(W

    ]

    Ans'er; VdL,a(W

    ]Ans'er;

    Compier 1rror4 T on register variableue to e&e&8er;

    = >address o ? operator cannot 8e appied on re)ister varia8es.

  • 8/13/2019 Most Useful for Freshers (1)

    43/134

    -inker 1rror 4 9nresolved e2ternal symbol i-

  • 8/13/2019 Most Useful for Freshers (1)

    44/134

    and 7 usage are euivalent(. *he return statement becomes, sizeof'int 7(K sizeof'int(that happens to be eual in this case.

    @WiQBWi88(\

    for':>@W:QBW:88(printf'LVdYtVdYtVdYtVdYnL,7'7'p8i(8:(,7'7':8p(8i(,7'7'i8p(8:(,7'7'p8:(8i((W

    ]]Ans'er;

    < < < Vd y>VdL,2,y(W

    ]void swap'int 7a, int 7b(\ 7a 5> 7b, 7b 5> 7a, 7a 5> 7bW]

    Ans'er;2>

    - 7b, 7b 5> 7a, 7a 5> 7bW]

    where the arguments follow the '(. So naturally the declaration for swap will look like,void swap'( which means the swap can take any number of arguments.

  • 8/13/2019 Most Useful for Freshers (1)

    45/134

    -B@@Wchar 7ptr > TiW

    788ptr>;Wprintf'LVdL,i(W]Ans'er;

    ==?- LhelloLWchar 7 ptr > strW

    char least >

  • 8/13/2019 Most Useful for Freshers (1)

    46/134

    scanf'LVsVdVdVdL, stud.rollno, Tstudent.dob.day, Tstudent.dob.month,Tstudent.dob.year(W

    ]Ans'er;

    Compiler 1rror4 9ndefined structure date-

  • 8/13/2019 Most Useful for Freshers (1)

    47/134

    int 7p>@Wint i>@Wwhile'i88Qn(

    p > TarrMiNW7p > @W

    ]Ans'er = -@ may result in problem 'may rise to runtime error Z!9--pointer assignment[ and terminate the program(.

    !9--(Wreturn sW

    ]Ans'er = - !9-- isfor errorKe2ception handling and for that assert shouldn0t be used. A plain if and thecorresponding remedy statement has to be given.

  • 8/13/2019 Most Useful for Freshers (1)

    48/134

    !ote4)owever this problem of Zmatching with nearest else[ cannot be solved by the usualmethod of placing the if statement inside a block like this,Xdefine assert'cond( \ Yif'R'cond(( Y 'fprintf'stderr, Lassertion failed4 Vs, file Vs, line Vd YnL,Xcond,YJJ#-1JJ,JJ-#!1JJ(, abort'(( Y]

  • 8/13/2019 Most Useful for Freshers (1)

    49/134

  • 8/13/2019 Most Useful for Freshers (1)

    50/134

    \char chWfor'ch>@WchQ>L)1--LWprintf'LVsL,a(W

    ]Ans'er;

    )1--VR`R___``R-

  • 8/13/2019 Most Useful for Freshers (1)

    51/134

    printf'LVdL,i(W] printf'LVdL,i(W]

    int iW

    Zstring constantLWreturn tempW]int main'(\puts'someun'((W]

    Answer4string constant

    -

  • 8/13/2019 Most Useful for Freshers (1)

    52/134

    8 Aptitude and OO3S!ote 4 All the programs are tested under *urbo C88 B.@, .= and icrosoft +C88 ?.@ compilers.

    #t is assumed that, 3rograms run under Eindows environment, *he underlying machine is an 2? based system, 3rogram is compiled using *urbo CKC88 compiler.

    *he program output may depend on the information based on this assumptions 'for e2amplesizeof'int( >> ; may be assumed(.

  • 8/13/2019 Most Useful for Freshers (1)

    53/134

    B( class base \ public4 int bvalW base'(\ bval>@W] ]W

    class deri4public base \ public4 int dvalW deri'(\ dval>@W iQsizeW i88,arr88( coutQQarr6PbvalWcoutQQendlW]

    int main'(\

    base %aseArrM=NWSomeunc'%aseArr,=(Wderi DeriArrM=NWSomeunc'DeriArr,=(W]

    Ans'er;@@@@@@

  • 8/13/2019 Most Useful for Freshers (1)

    54/134

    from base- \ new int'size(W

  • 8/13/2019 Most Useful for Freshers (1)

    55/134

    print'a(Wprint'b(W

    ]K7Answer4

    Compiler 1rror 4 function void print'int 7( already has a body

    12planation4

    Arrays cannot be passed to functions, only pointers 'for arrays, base addresses(can be passed. So the arguments int 7ptr and int prtMsizeN have no differenceas function arguments. #n other words, both the functoins have the same signature andso cannot be overloaded.7K

    class some\public4

    `some'(\

    coutQQLsomes destructorLQQendlW]

    ]W

    void main'(

    \ some sWs.`some'(W

    ]K7Answer4

    somes destructorsomes destructor

    12planation4Destructors can be called e2plicitly. )ere s.`some'( e2plicitly calls the

    destructor of s. Ehen main'( returns, destructor of s is called again,hence the result.7K

    Xinclude Qiostream.hP

    class fig;d\

    int dimFW]virtual void operatorQQ'ostream Trhs(W

    ]Wvoid figBd44operatorQQ'ostream Trhs(\

    fig;d44operator QQ'rhs(WrhsQQthis6PdimBW

  • 8/13/2019 Most Useful for Freshers (1)

    56/134

    ]7K

    void main'(\

    fig;d ob:>'opOverload temp(W]W

    bool opOverload44operator>>'opOverload temp(\if'7this >> temp (\

    coutQQL*he both are same ob:ectsYnLWreturn trueW

    ]else\

    coutQQL*he both are differentYnLWreturn falseW

    ]]

    void main'(\opOverload aa;W

    ]

    Answer 4$untime 1rror4 Stack Overflow

    12planation 4ust like normal functions, operator functions can be called recursively. *his program :ust

    illustrates that point, by calling the operator >> function recursively, leading to an infinite loop.

    class comple2\double reWdouble imW

    public4comple2'( 4 re'> rhs.re( TT 'this6Pim >> rhs.im((

    return trueWelse

    return falseW

  • 8/13/2019 Most Useful for Freshers (1)

    57/134

    ]

    int main'(\comple2 c

  • 8/13/2019 Most Useful for Freshers (1)

    58/134

    ]]Wclass deri\public 4 out'(\coutQQLderi LW]]W

    void main'(\ deri dpMBNW

    base 7bp > 'base7(dpWfor 'int i>@W iQBWi88('bp88(6Pout'(W

    ]

    ;( ustify the use of virtual constructors and destructors in C88.

    B( 1ach C88 ob:ect possesses the member fns,'which can be declared by the programmer e2plicitly orby the implementation if they are not available(. Ehat are those functions_

    ( Ehat is wrong with this class declaration_class something\

    char 7strWpublic4 something'(\ st > new charM

  • 8/13/2019 Most Useful for Freshers (1)

    59/134

    1. What is a modifier?Ans'er; A modifier, also called a modifying function is a member function that changes the value of at leastone data member. #n other words, an operation that modifies the state of an ob:ect. odifiers are alsoknown as /mutators0.

    2. What is an accessor?Ans'er;

    An accessor is a class operation that does not modify the state of an ob:ect. *he accessor functionsneed to be declared as constoperations

    3. !ifferentiate etween a template class and class template.Ans'er;,e&pate cass;

    A generic definition or a parameterized class not instantiated until the client provides the neededinformation. #t0s :argon for plain templates.Cass te&pate;

    A class template specifies how individual classes can be constructed much like the way a classspecifies how individual ob:ects can be constructed. #t0s :argon for plain classes.

    *. When does a name clash occur?Ans'er; A name clash occurs when aname is defined in more than one place. or e2ample., two different

    class libraries could give two different classes the same name. #f you try to use many class libraries at thesame time, there is a fair chance that you will be unable to compile or link the program because of nameclashes.

    -. !efine namespace.

    Ans'er;#t is a feature in c88 to minimize name collisions in the global name space. *his namespace

    keyword assigns a distinct name to a library that allows other libraries to use the same identifier nameswithout creating any name collisions. urthermore, the compiler uses the namespace signature fordifferentiating the definitions.

    0. What is the use of XusingF declaration.Ans'er;

    A using declaration makes it possible to use a name from a namespace without the scopeoperator.

    5. What is an +terator class?Ans'er;

    A class that is used to traverse through the ob:ects maintained by a container class. *here arefive categories of iterators4

    input iterators, output iterators, forward iterators, bidirectional iterators, random access.An iterator is an entity that gives access to the contents of a container ob:ect without violating

    encapsulation constraints. Access to the contents is granted on a one6at6a6time basis in order. *he ordercan be storage order 'as in lists and ueues( or some arbitrary order 'as in array indices( or according tosome ordering relation 'as in an ordered binary tree(. *he iterator is a construct, which provides aninterface that, when called, yields either the ne2t element in the container, or some value denoting thefact that there are no more elements to e2amine. #terators hide the details of access to and update of theelements of a container class.

    *he simplest and safest iterators are those that permit read6only access to the contents of acontainer class. *he following code fragment shows how an iterator might appear in code4 contJiter4>new contJiterator'(W 24>contJiter.ne2t'(W while 2K>none do ... s'2(W ... 24>contJiter.ne2t'(W endW

  • 8/13/2019 Most Useful for Freshers (1)

    60/134

    #n this e2ample, contJiter is the name of the iterator. #t is created on the first line by instantiationof contJiterator class, an iterator class defined to iterate over some container class, cont. Succesiveelements from the container are carried to 2. *he loop terminates when 2 is bound to some empty value.')ere, none(#n the middle of the loop, there is s'2( an operation on 2, the current element from thecontainer. *he ne2t element of the container is obtained at the bottom of the loop.

    . List out some of the EE!"#$ availale.Ans'er;

    "1S*O!1KO3A- of "emstone systems. O!*OS of Ontos. Ob:ectivity of Ob:ectivity inc. +ersant of +ersant ob:ect technology. Ob:ect store of Ob:ect Design. A$D1!* of A$D1!* software. 3O1* of 3O1* software.

    1@. List out some of the ojectoriented methodologies.Ans'er;

    Ob:ect Oriented Development 'OOD( '%ooch

  • 8/13/2019 Most Useful for Freshers (1)

    61/134

    15. What do you mean y $tac' unwinding?Ans'er;

    #t is a process during e2ception handling when the destructor is called for all local ob:ectsbetween the place where the e2ception was thrown and where it is caught.17. !efine precondition and postcondition to a memer function.Ans'er;Precondition;

    A precondition is a condition that must be true on entry to a member function. A class is usedcorrectly if preconditions are never false. An operation is not responsible for doing anything sensible if itsprecondition fails to hold.

    or e2ample, the interface invariants of stac' class say nothing about pushing yet anotherelement on a stack that is already full. Ee say that isful4is a precondition of thepushoperation.

    Post:condition; A post6condition is a condition that must be true on e2it from a member function if theprecondition was valid on entry to that function. A class is implemented correctly if post6conditions arenever false.

    or e2ample, after pushing an element on the stack, we know that isempty4 must necessarilyhold. *his is a post6condition of thepushoperation.

    1. What are the conditions that have to e met for a condition to e an invariant of the class?Ans'er;

    *he condition should hold at the end of every constructor. *he condition should hold at the end of every mutator'non6const( operation.2@. What are proxy ojects?Ans'er;

    Ob:ects that stand for other ob:ects are called pro2y ob:ects or surrogates.-

  • 8/13/2019 Most Useful for Freshers (1)

    62/134

    22. &ame the operators that cannot e overloaded.Ans'er;

    sizeof . .7 .6P 44 _4

    23. What is a node class?Ans'er;

    A node class is a class that, relies on the base class for services and implementation, provides a wider interface to te users than its base class, relies primarily on virtual functions in its public interface depends on all its direct and indirect base class can be understood only in the conte2t of the base class can be used as base for further derivation can be used to create ob:ects.A node class is a class that has added new services or functionality beyond the services inherited from itsbase class.

    2*. What is an orthogonal ase class?Ans'er;

    #f two base classes have no overlapping methods or data they are said to be independent of, ororthogonal to each other. Orthogonal in the sense means that two classes operate in different dimensionsand do not interfere with each other in any way. *he same derived class may inherit such classes with nodifficulty.

    2-. What is a container class? What are the types of container classes?Ans'er;

    A container class is a class that is used to hold ob:ects in memory or e2ternal storage. Acontainer class acts as a generic holder. A container class has a predefined behavior and a well6knowninterface. A container class is a supporting class whose purpose is to hide the topology used formaintaining the list of ob:ects in memory. Ehen a container class contains a group of mi2ed ob:ects, thecontainer is called a heterogeneous containerW when the container is holding a group of ob:ects that are allthe same, the container is called a homogeneous container.

    20. What is a protocol class?Ans'er;

    An abstract class is a protocol class if4 it neither contains nor inherits from classes that contain member data, non6virtual functions, or

    private 'or protected( members of any kind. it has a non6inline virtual destructor defined with an empty implementation,

    all member functions other than the destructor including inherited functions, are declared purevirtual functions and left undefined.

    25. What is a mixin class?Ans'er;

    A class that provides some but not all of the implementation for a virtual base class is oftencalled mi2in. Derivation done :ust for the purpose of redefining the virtual functions in the base classes isoften called mi2in inheritance. i2in classes typically dont share common bases.

    27. What is a concrete class?Ans'er;

    A concrete class is used to define a useful ob:ect that can be instantiated as an automaticvariable on the program stack. *he implementation of a concrete class is defined. *he concrete class is notintended to be a base class and no attempt to minimize dependency on other classes in theimplementation or behavior of the class.

    2.What is the handle class?Ans'er;

    A handle is a class that maintains a pointer to an ob:ect that is programmatically accessiblethrough the public interface of the handle class.-

  • 8/13/2019 Most Useful for Freshers (1)

    63/134

    A popular techniue for dealing with these issues is to separate what is used as a single ob:ect in twoparts4 a handle providing the user interface and a representation holding all or most of the ob:ects state.*he connection between the handle and the representation is typically a pointer in the handle. Often,handles have a bit more data than the simple representation pointer, but not much more. )ence thelayout of the handle is typically stable, even when the representation changes and also that handles aresmall enough to move around relatively freely so that the user needn0t use the pointers and thereferences.

    3@. What is an action class?Ans'er;

    *he simplest and most obvious way to specify an action in C88 is to write a function. )owever, ifthe action has to be delayed, has to be transmitted elsewhere before being performed, reuires its owndata, has to be combined with other actions, etc then it often becomes attractive to provide the action inthe form of a class that can e2ecute the desired action and provide other services as well. anipulatorsused with iostreams is an obvious e2ample.-

  • 8/13/2019 Most Useful for Freshers (1)

    64/134

    buffers and resources. the destruction of either ob:ect will not affect the remaining ob:ect. *he overloadedassignment operator would create a deep copy of ob:ects.

    Shallow copy involves copying the contents of one ob:ect into another instance of the same classthus creating a mirror image. Owing to straight copying of references and pointers, the two ob:ects willshare the same e2ternally contained contents of the other ob:ect to be unpredictable.-

  • 8/13/2019 Most Useful for Freshers (1)

    65/134

    35. What is slicing?Ans'er;

    Slicing means that the data added by a subclass are discarded when an ob:ect of the subclass ispassed or returned by value or from a function e2pecting a base class ob:ect.-'const baseT(W base 'const baseT(W ] void fun' ( \ base e>mW e>mW ]As base copy functions dont know anything about the derived only the base part of the derived is

    copied. *his is commonly referred to as slicing. One reason to pass ob:ects of classes in a hierarchy is toavoid slicing. Other reasons are to preserve polymorphic behavior and to gain efficiency.

    37. What is name mangling?Ans'er;

    !ame mangling is the process through which your c88 compilers give each function in yourprogram a uniue name. #n C88, all programs have at6least a few functions with the same name. !amemangling is a concession to the fact that l inker always insists on all function names being uniue.-

  • 8/13/2019 Most Useful for Freshers (1)

    66/134

    *@. !ifferentiate etween declaration and definition in ,88.Ans'er;

    A declaration introduces a name into the programW a definition provides a uniue description ofan entity 'e.g. type, instance, and function(. Declarations can be repeated in a given scope, it introduces aname in a given scope. *here must be e2actly one definition of every ob:ect, function or class used in aC88 program.

    A declaration is a definition unless4 it declares a function without specifying its body, it contains an e2tern specifier and no initializer or function body, it is the declaration of a static class data member without a class definition, it is a class name definition, it is a typedef declaration.A definition is a declaration unless4 it defines a static class data member, it defines a non6inline member function.

    *1. What is cloning?Ans'er;

    An ob:ect can carry out copying in two ways i.e. it can set itself to be a copy of another ob:ect, orit can return a copy of itself. *he latter process is called cloning.

    *2. !escrie the main characteristics of static functions.Ans'er;

    *he main characteristics of static functions include, #t is without the a this pointer, #t cant directly access the non6static members of its class #t cant be declared const, volatile or virtual. #t doesnt need to be invoked through an ob:ect of its class, although for convenience, it

    may.

    *3. Will the inline function e compiled as the inline function always? Yustify.Ans'er;

    An inline function is a reuest and not a command. )ence it wont be compiled as an inlinefunction always.-

  • 8/13/2019 Most Useful for Freshers (1)

    67/134

    *his function returns a pointer to a Eidget ob:ect thats constructed within the buffer passed tothe function. Such a function might be useful for applications using shared memory or memory6mapped#KO, because ob:ects in such applications must be placed at specific addresses or in memory allocated byspecial routines.

    -bet -riente# .n$l%sis $n# /esin(--./)

    1. What do you mean y analysis and design?6nalysis:

    %asically, it is the process of determining what needs to be done before how it should bedone. #n order to accomplish this, the developer refers the e2isting systems and documents. So, simply itis an art of discovery.

    !esign:#t is the process of adoptingKchoosing the one among the many, which best

    accomplishes the users needs. So, simply, it is compromising mechanism.

    2. What are the steps involved in designing?%efore getting into the design the designer should go through the S$S prepared by the System

    Analyst.*he main tasks of design are Architectural Design and Detailed Design.#n Architectural Design we find what are the main modules in the problem domain.#n Detailed Design we find what should be done within each module.

    3. What are the main underlying concepts of oject orientation? Ob:ects, messages, class, inheritance and polymorphism are the main concepts of ob:ectorientation.

    *. What do u meant y K$"+K of an oject?S%# stands for State, %ehavior and #dentity. Since every ob:ect has the above three.

    $tate:#t is :ust a value to the attribute of an ob:ect at a particular time.

    "ehaviour4#t describes the actions and their reactions of that ob:ect.

    +dentity4An ob:ect has an identity that characterizes its own e2istence. *he identity makes it

    possible to distinguish any ob:ect in an unambiguous way, and independently from its state.

    -. !ifferentiate persistent ( nonpersistent ojects?3ersistent refers to an ob:ects ability to transcend time or space. A persistent ob:ect storesKsaves

    its state in a permanent storage system with out losing the information represented by the ob:ect.A non6persistent ob:ect is said to be transient or ephemeral. %y default ob:ects are considered as

    non6persistent.

    0. What do you meant y active and passive ojects?Active ob:ects are one which instigate an interaction which owns a thread and they are

    responsible for handling control to other ob:ects. #n simple words it can be referred as client.3assive ob:ects are one, which passively waits for the message to be processed. #t waits for

    another ob:ect that reuires its services. #n simple words it can be referred as server.

    Diagram4client server

    'Active( '3assive(

    5. What is meant y software development method_Software development method describes how to model and build software systems in a reliable

    and reproducible way. *o put it simple, methods that are used to represent ones thinking using graphicalnotations.

  • 8/13/2019 Most Useful for Freshers (1)

    68/134

    class A

    class B class C

    7. What are models and meta models?#odel:

    +t is a complete description of something 'i.e. system(.#eta model:

    #t describes the model elements, synta2 and semantics of the notation that allows theirmanipulation.

    . What do you meant y static and dynamic modeling?

    Static modeling is used to specify structure of the ob:ects that e2ist in the problem domain.*hese are e2pressed using class, oject and Q$,6$ diagrams. %ut Dynamic modeling refers representing the ob:ect interactions during runtime. #t isrepresented by se/uence, activity, collaoration and statechart diagrams.

    1@. )ow to represent the interaction etween the modeling elements? #odel element is :ust a notation to represent '"raphically( the entities that e2ist in the problem

    domain. e.g. for modeling element is class notation, ob:ect notation etc. $elationships are used to represent the interaction between the modeling elements. *he following are the $elationships.

    6ssociation: #ts :ust a semantic connection two classes.e.g.4

    6ggregation: #ts the relationship between two classes which are related in the fashion that masterand slave. *he master takes full rights than the slave. Since the slave works under the master. #t isrepresented as line with diamond in the master area.

    e24 car contains wheels, etc.

    car

    ,ontainment: *his relationship is applied when the part contained with in the whole part, dies whenthe whole part dies.

    #t is represented as darked diamond at the whole part. e2ample4

    class A\ KKsome code

    ]W

    class % \ A aaW KK an ob:ect of class AW KK some code for class %W ]W

    #n the above e2ample we see that an ob:ect of class A is instantiated with in the class %. so theob:ect class A dies when the ob:ect class % dies.we can represnt it in diagram like this.

    =eneraliCation: *his relationship used when we wantrepresents a class, which captures the common states of

    ob:ects of different classes. #t is represented as arrow linepointed at the class, which has captured the commonstates.

    !ependency: #t is the relationship between dependent and independent classes. Any change in theindependent class will affect the states of the dependent class.

    car 8heels

    class A class B

    uses

    class A class B

  • 8/13/2019 Most Useful for Freshers (1)

    69/134

    D#A"$A4class A class %

    11. Why generaliCation is very strong? 1ven though "eneralization satisfies Structural, #nterface, %ehaviour properties. #t is

    mathematically very strong, as it is Antisymmetric and *ransitive. 6ntisymmetric: employee is a person, but not all persons are employees. athematically all As0are %, but all %s0 not A.

    Dransitive: A>P%, %>Pc then A>Pc. A. Salesman.

    %. 1mployee.C. 3erson.

    'ote: All the other relationships satisfy all the properties like Structural properties, #nterfaceproperties, %ehaviour properties.

    12. !ifferentiate 6ggregation and containment?Aggregation is the relationship between the whole and a part. Ee can addKsubtract someproperties in the part 'slave( side. #t wont affect the whole part.%est e2ample is Car, which contains the wheels and some e2tra parts. 1ven though the parts are

    not there we can call it as car.%ut, in the case of containment the whole part is affected when the part within that got affected.

    *he human body is an apt e2ample for this relationship. Ehen the whole body dies the parts 'heart etc(are died.

    13. ,an lin' and 6ssociation applied interchangealy?!o, Hou cannot apply the link and Association interchangeably. Since link is used represent the

    relationship between the two ob:ects.%ut Association is used represent the relationship between the two classes.link 44 student4Abhilash course4CAAssociation44 student course

    1*. what is meant y KmethodwarsK? %efore

  • 8/13/2019 Most Useful for Freshers (1)

    70/134

    17. What is an Q$,6$? Why it is needed?A 9se Case is a description of a set of seuence of actions that a system performs that yields an

    observable result of value to a particular action.#n SSAD process Q>P #n OOAD 9S1CAS1. #t is represented elliptically.

    Represent$tion:

    1. Who is an 6ctor?An Actor is someone or something that must interact with the system.#n addition to thatan Actor initiates the process'that is 9S1CAS1(.#t is represented as a stickman like this./i$r$m:

    2@. What is guard condition?"uard condition is one, which acts as a firewall. *he access from a particular ob:ect can be made

    only when the particular condition is met.or 12ample,

    customer check customer number A*.)ere the ob:ect on the customer accesses the A* facility only when the guard condition is met.

    21. !ifferentiate the following notations? +: :oj1 :oj2

    ++: :oj1 :oj2

    #n the above representation #, ob:< sends message to ob:;. %ut in the case of ## the data istransferred from ob:< to ob:;.

    22. Q$,6$ is an implementation independent notation. )ow will the designer give the implementationdetails of a particular Q$,6$ to the programmer?

    *his can be accomplished by specifying the relationship called Lrefinement[ which talksabout the two different abstraction of the same thing.

    Or e2ample,

    calculate pay calculate

    class< class; classB

    23. $uppose a class acts an 6ctor in the prolem domain% how to represent it in the static model?#n this scenario you can use Zstereotype[. Since stereotype is :ust a string that gives e2tra

    semantic to the particular entityKmodel element. #t is given with in the QQ PP.

    class A

    QQ ActorPPattributes

    methods.

    2*. Why does the function arguments are called as KsignaturesK?*he arguments distinguish functions with the same name 'functional polymorphism(. *he name

    alone does not necessarily identify a uniue function. )owever, the name and its arguments 'signatures(will uniuely identify a function.

    #n real life we see suppose, in class there are two guys with same name, but they can beeasily identified by their signatures. *he same concept is applied here.

  • 8/13/2019 Most Useful for Freshers (1)

    71/134

    e24class person\ public4

    char getse2'(Wvoid setse2'char(Wvoid setse2'int(W

    ]W

    #n the above e2ample we see that there is a function setse2'( with same name but with differentsignature.

  • 8/13/2019 Most Useful for Freshers (1)

    72/134

    uantitative Aptitude-

  • 8/13/2019 Most Useful for Freshers (1)

    73/134

  • 8/13/2019 Most Useful for Freshers (1)

    74/134

    ?. Coshocton is south of redericktown and west of Dover.

    ;B. Ehich of the towns mentioned is furthest of the north & west'a( Ashland 'b( %owling green 'c( Coshocton'd( 1ast -iverpool'e( redericktown

    ;. Ehich of the following must be both north and east of redericktown_'a( Ashland 'b( Coshocton 'c( 1ast -iverpool

    # a only ## b only ### c only #+ a T b + a T c

    ;=. Ehich of the following towns must be situated both south and west of at least one other town_A. Ashland only%. Ashland and redericktownC. Dover and redericktownD. Dover, Coshocton and redericktown1. Coshocton, Dover and 1ast -iverpool.

    ;?. Ehich of the following statements, if true, would make the information in the numberedstatements more specific_

    'a( Coshocton is north of Dover.'b( 1ast -iverpool is north of Dover'c( Ashland is east of %owling green.'d( Coshocton is east of redericktown

    'e( %owling green is north of redericktown

    ;F. Ehich of the numbered statements gives information that can be deduced from one or more ofthe other statements_'A( < '%( ; 'C( B 'D( '1( ?

    ;. 1ight friends )arsha, akis, %ala:i, 1swar, Dhinesh, Chandra, "eetha, and Ahmed are sitting in acircle facing the center. %ala:i is sitting between "eetha and Dhinesh. )arsha is third to the left of%ala:i and second to the right of Ahmed. Chandra is sitting between Ahmed and "eetha and%ala:i and 1shwar are not sitting opposite to each other. Eho is third to the left of Dhinesh_

    ;. #f every alternative letter starting from % of the 1nglish alphabet is written in small letter, rest allare written in capital letters, how the month Z September[ be written.'

  • 8/13/2019 Most Useful for Freshers (1)

    75/134

    "efore:One day work > < K ;@One man0s one day work > < K ' ;@ 7 F=(

    &ow:!o. Of workers > =@One day work > =@ 7 < K ' ;@ 7 F=(

    *he total no. of days reuired to complete the work > 'F= 7 ;@( K =@ > B@

    ;. Ans'er;@ V

    - 2 K '; K B(

    B. Ans'er;=.B V- ;

  • 8/13/2019 Most Useful for Freshers (1)

    76/134

    *herefore '= K '= K er Blue@a,cience ?icti9n H9%%er ,%arr98

    Explanation:

    Given

    N9vel Nae Auth9r u;lisher,%< thriller /ath=9 Her9n

    "ur>er Blue@a

    ,cience ?icti9n H9%%er ,%arr98

    Since %lue:a doesn0t publish the novel by %urchfield and )eron publishes the novel spythriller, 3iegon publishes the novel by %urchfield.

  • 8/13/2019 Most Useful for Freshers (1)

    77/134

    Since )opper writes "othic romance and )eron publishes the novel spy thriller, %lue:apublishes the novel by )opper.

    Since )eron publishes the novel spy thriller and )eron publishes the novel by "orky,"orky writes Spy thriller and $athko writes urder mystery.

    = minutes.#n of an hour there are '?@ 7 =( seconds > ;F@@ seconds.-ight flashed for every ? seconds.#n ;F@@ seconds ;F@@K? > =@ times.*he count start after the first flash, the light will flashes =< times in of an hour.

    ;@. Ans'er;'(

    - - '2 8 ;( > 2 8 Since the side of the euilateral triangle is ;2, its perimeter > B 7 ;2 > ?2Also, the perimeters of both are eual.

    'i.e.( 2 8 > ?2'i.e.( ;2 > 2 > .

    B

  • 8/13/2019 Most Useful for Freshers (1)

    78/134

    ';(

    BB. Ans'er;,? What are the various schemes availale?*he term #3C '#nter63rocess Communication( describes various ways by which different process

    running on some operating system communicate between each other. +arious schemes available are as

    follows4 >ipes:One6way communication scheme through which different process can communicate. *he

    problem is that the two processes should have a common ancestor 'parent6child relationship(.)owever this problem was fi2ed with the introduction of named6pipes '#O(.

    #essage Aueues :essage ueues can be used between related and unrelated processes running on a

    machine.

    $hared #emory:*his is the fastest of all #3C schemes. *he memory to be shared is mapped into the

    address space of the processes 'that are sharing(. *he speed achieved is attributed to the factthat there is no kernel involvement. %ut this scheme needs synchronization.

    +arious forms of synchronisation are mute2es, condition6variables, read6write locks, record6

    locks, and semaphores.

    S1C*#O! 6 ###1O$H A!A"11!*

    1. What is the difference etween $wapping and >aging?$wapping:

    Ehole process is moved from the swap device to the main memory for e2ecution.3rocess size must be less than or eual to the available main memory. #t is easier to implementation andoverhead to the system. Swapping systems does not handle the memory more fle2ibly as compared to thepaging systems.

    >aging:Only the reuired memory pages are moved to main memory from the swap device for

    e2ecution. 3rocess size does not matter. "ives the concept of the virtual memory.#t provides greater fle2ibility in mapping the virtual address space into the physical memory of

    the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the

    greater process size than the available physical memory. Demand paging systems handle the memorymore fle2ibly.

    2. What is major difference etween the )istoric Qnix and the new "$! release of Qnix $ystem B interms of #emory #anagement?

    )istoric 9ni2 uses Swapping & entire process is transferred to the main memory from the swapdevice, whereas the 9ni2 System + uses Demand 3aging & only the part of the process is moved to themain memory. )istoric 9ni2 uses one Swap Device and 9ni2 System + allow multiple Swap Devices.

    3. What is the main goal of the #emory #anagement?

    #t decides which process should reside in the main memory,

  • 8/13/2019 Most Useful for Freshers (1)

    89/134

    anages the parts of the virtual address space of a process which is non6core resident, onitors the available main memory and periodically write the processes into the swap device to

    provide more processes fit in the main memory simultaneously.

    *. What is a #ap?A ap is an Array, which contains the addresses of the free space in the swap device that are

    allocatable resources, and the number of the resource units available there.

    *his allows irst6it allocation of contiguous blocks of a resource. #nitially the ap contains oneentry & address 'block offset from the starting of the swap area( and the total number of resources.

    ^ernel treats each unit of ap as a group of disk blocks. On the allocation and freeing of theresources ^ernel updates the ap for accurate information.

    -. What scheme does the [ernel in Qnix $ystem B follow while choosing a swap device among themultiple swap devices?

    ^ernel follows $ound $obin scheme choosing a swap device among the multiple swap devices in9ni2 System +.

    0. What is a egion?

    A $egion is a continuous area of a process0s address space 'such as te2t, data and stack(. *hekernel in a /$egion *able0 that is local to the process maintains region. $egions are sharable among theprocess.

    5. What are the events done y the [ernel after a process is eing swapped out from the main memory?Ehen ^ernel swaps the process out of the primary memory, it performs the following4 ^ernel decrements the $eference Count of each region of the process. #f the reference count

    becomes zero, swaps the region out of the main memory, ^ernel allocates the space for the swapping process in the swap device, ^ernel locks the other swapping process while the current swapping operation is going on, *he ^ernel saves the swap address of the region in the region table.

    7. +s the >rocess efore and after the swap are the same? =ive reason.3rocess before swapping is residing in the primary memory in its original form. *he regions 'te2t,

    data and stack( may not be occupied fully by the process, there may be few empty slots in any of theregions and while swapping ^ernel do not bother about the empty slots while swapping the process out.

    After swapping the process resides in the swap 'secondary memory( device. *he regionsswapped out will be present but only the occupied region slots but not the empty slots that were presentbefore assigning.

    Ehile swapping the process once again into the main memory, the ^ernel referring to the 3rocessemory ap, it assigns the main memory accordingly taking care of the empty slots in the regions.

    . What do you mean y uarea user area4 or uloc'?*his contains the private data that is manipulated only by the ^ernel. *his is local to the 3rocess,

    i.e. each process is allocated a u6area.

    1@. What are the entities that are swapped out of the main memory while swapping the process out ofthe main memory?

    All memory space occupied by the process, process0s u6area, and ^ernel stack are swapped out,theoretically.

    3ractically, if the process0s u6area contains the Address *ranslation *ables for the process then^ernel implementations do not swap the u6area.

    11. What is

  • 8/13/2019 Most Useful for Freshers (1)

    90/134

    allocated. At last ^ernel swaps the process into the assigned space in the swap device. -ater when the^ernel swaps the process into the main memory this assigns memory according to the new addresstranslation mapping.

    13. )ow the $wapper wor's?*he swapper is the only process that swaps the processes. *he Swapper operates only in the

    ^ernel mode and it does not uses System calls instead it uses internal ^ernel functions for swapping. #t isthe archetype of all kernel process.

    1*. What are the processes that are not othered y the swapper? =ive eason.

    ombie process4 *hey do not take any up physical memory. 3rocesses locked in memories that are updating the region of the process. ^ernel swaps only the sleeping processes rather than the /ready6to6run0 processes, as they

    have the higher probability of being scheduled than the Sleeping processes.

    1-. What are the re/uirements for a swapper to wor'?*he swapper works on the highest scheduling priority. irstly it will look for any sleeping process,

    if not found then it will look for the ready6to6run process for swapping. %ut the ma:or reuirement for theswapper to work the ready6to6run process must be core6resident for at least ; seconds before swappingout. And for swapping in the process must have been resided in the swap device for at least ; seconds. #fthe reuirement is not satisfied then the swapper will go into the wait state on that event and it is awakenonce in a second by the ^ernel.

    10. What are the criteria for choosing a process for swapping into memory from the swap device?*he resident time of the processes in the swap device, the priority of the processes and theamount of time the processes had been swapped out.

    15. What are the criteria for choosing a process for swapping out of the memory to the swap device?

    *he process0s memory resident time, 3riority of the process and *he nice value.

    17. What do you mean y nice value?!ice value is the value that controls \increments or decrements] the priority of the process. *his

    value that is returned by the nice '( system call. *he euation for using nice value is4>riority I \recent ,>Q usage]Gconstant4 8 ase priority4 8 nice value4

    Only the administrator can supply the nice value. *he nice '( system call works for the runningprocess only. !ice value of one process cannot affect the nice value of the other process.

    1. What are conditions on which deadloc' can occur while swapping the processes? All processes in the main memory are asleep. All /ready6to6run0 processes are swapped out. *here is no space in the swap device for the new incoming process that are swapped out of

    the main memory. *here is no space in the main memory for the new incoming process.

    2@. What are conditions for a machine to support !emand >aging? emory architecture must based on 3ages, *he machine must support the /restartable0 instructions.

    21. What is Xthe principle of localityF?#t0s the nature of the processes that they refer only to the small subset of the total data space of

    the process. i.e. the process freuently calls the same subroutines or e2ecutes the loop instructions.

    22. What is the wor'ing set of a process?*he set of pages that are referred by the process in the last /n0, references, where /n0 is called the

    windowof the working set of the process.

    23. What is the window of the wor'ing set of a process?*he window of the working set of a process is the total number in which the process had referred

    the set of pages in the working set of the process.

    2*. What is called a page fault?3age fault is referred to the situation when the process addresses a page in the working set of

    the process but the process fails to locate the page in the working set. And on a page fault the kernelupdates the working set by reading the page from the secondary device.

  • 8/13/2019 Most Useful for Freshers (1)

    91/134

    2-. What are data structures that are used for !emand >aging?^ernel contains data structures for Demand paging. *hey are, 3age table entries, Disk block descriptors, 3age frame data table 'pfdata(, Swap6use table.

    20. What are the its that support the demand paging?

    +alid, $eference, odify, Copy on write, Age. *hese bits are the part of the page table entry,which includes physical address of the page and protection bits.

    3age address Age Copy onwrite

    odify $eference +alid 3rotection

    25. )ow the [ernel handles the for'4 system call in traditional Qnix and in the $ystem B Qnix% whileswapping?

    ^ernel in traditional 9ni2, makes the duplicate copy of the parent0s address space and attaches itto the child0s process, while swapping. ^ernel in System + 9ni2, manipulates the region tables, page table,and pfdata table entries, by incrementing the reference count of the region table of shared regions.

    27. !ifference etween the for'4 and vfor'4 system call?

    During the fork'( system call the ^ernel makes a copy of the parent process0s address space andattaches it to the child process.%ut the vfork'( system call do not makes any copy of the parent0s address space, so it is faster

    than the fork'( system call. *he child process as a result of the vfork'( system call e2ecutes e2ec'( systemcall. *he child process from vfork'( system call e2ecutes in the parent0s address space 'this can overwritethe parent0s data and stack ( which suspends the parent process until the child process e2its.

    2. What is "$$"loc' $tarted y $ymol4?A data representation at the machine level, that has initial values when a program starts and tells

    about how much space the kernel allocates for the un6initialized data. ^ernel initializes it to zero at run6time.

    3@. What is >age$tealer process?*his is the ^ernel process that makes rooms for the incoming pages, by swapping the memory

    pages that are not the part of the working set of a process. 3age6Stealer is created by the ^ernel at thesystem initialization and invokes it throughout the lifetime of the system. ^ernel locks a region when a

    process faults on a page in the region, so that page stealer cannot steal the page, which is being faultedin.

    31. &ame two paging states for a page in memory?*he two paging states are4

    *he page is aging and is not yet eligible for swapping, *he page is eligible for swapping but not yet eligible for reassignment to other virtual address space.

    32. What are the phases of swapping a page from the memory?

    3age stealer finds the page eligible for swapping and places the page number in the list ofpages to be swapped.

    ^ernel copies the page to a swap device when necessary and clears the validbit in the pagetable entry, decrements the pfdata reference count, and places the pfdata table entry at theend of the free list if its reference count is @.

    33. What is page fault? +ts types?

    3age fault refers to the situation of not having a page in the main memory when any processreferences it.

    *here are two types of page fault 4 +alidity fault, 3rotection fault.

    3*. +n what way the

  • 8/13/2019 Most Useful for Freshers (1)

    92/134

    3-. What is validity fault?#f a process referring a page in the main memory whose valid bit is not set, it results in validity

    fault.*he valid bit is not set for those pages4

    that are outside the virtual address space of a process, that are the part of the virtual address space of the process but no physical address is assigned to it.

    30. What does the swapping system do if it identifies the illegal page for swapping?

    #f the disk block descriptor does not contain any record of the faulted page, then this causes theattempted memory reference is invalid and the kernel sends a \$egmentation violation] signal to theoffending process. *his happens when the swapping system identifies any invalid memory reference.

    35. What are states that the page can e in% after causing a page fault? On a swap device and not in memory, On the free page list in the main memory, #n an e2ecutable file, arked Zdemand zero[, arked Zdemand fill[.

    37. +n what way the validity fault handler concludes?

    #t sets the valid bit of the page by clearing the modify bit. #t recalculates the process priority.

    3. 6t what mode the fault handler executes?At the ^ernel ode.

    *@. What do you mean y the protection fault?3rotection fault refers to the process accessing the pages, which do not have the access

    permission. A process also incur the protection fault when it attempts to write a page whose copy on writebit was set during the fork'( system call.

    *1. )ow the [ernel handles the copy on write it of a page% when the it is set?#n situations like, where the copy on write bit of a page is set and that page is shared by more

    than one process, the ^ernel allocates new page and copies the content to the new page and the otherprocesses retain their references to the old page. After copying the ^ernel updates the page table entrywith the new page number. *hen ^ernel decrements the reference count of the old pfdata table entry.

    #n cases like, where the copy on write bit is set and no processes are sharing the page, the^ernel allows the physical page to be reused by the processes. %y doing so, it clears the copy on write bitand disassociates the page from its disk copy 'if one e2ists(, because other process may share the disk

    copy. *hen it removes the pfdata table entry from the page6ueue as the new copy of the virtual page isnot on the swap device. #t decrements the swap6use count for the page and if count drops to @, frees theswap space.

    *2.

  • 8/13/2019 Most Useful for Freshers (1)

    93/134

    Concepts1. What is dataase?

    A database is a logically coherent collection of data with some inherent meaning, representingsome aspect of real world and which is designed, built and populated with data for a specific purpose.

    2. What is !"#$?#t is a collection of programs that enables user to create and maintain a database. #n other words

    it is general6purpose software that provides the users with the processes of defining, constructingandmanipulatingthe database for various applications.

    3. What is a !ataase system?*he database and D%S software together is called as Database system.

    *. 6dvantages of !"#$? $edundancy is controlled. 9nauthorised access is restricted. 3roviding multiple user interfaces. 1nforcing integrity constraints. 3roviding backup and recovery.

    -. !isadvantage in rocessing $ystem?

    Data redundancy T inconsistency. Difficult in accessing data. Data isolation. Data integrity. Concurrent access is not possible. Security 3roblems.

    0. !escrie the three levels of data astraction?*he are three levels of abstraction4

    >hysicallevel: *he lowest level of abstraction describes how data are stored. Logical level:*he ne2t higher level of abstraction, describes what data are stored in database and

    what relationship among those data. Biew level: *he highest level of abstraction describes only part of entire database.5. !efine the Kintegrity rulesK

    *here are two #ntegrity rules. ntity +ntegrity:States that Z3rimary key cannot have !9-- value[ eferential +ntegrity:States that Zoreign ^ey can be either a !9-- value or should be

    3rimary ^ey value of other relation.

    7. What is extension and intension?

    xtension6#t is the number of tuples present in a table at any instance. *his is time dependent.

    +ntension6#t is a constant value that gives the name, structure of table and the constraints laid onit.

    . What is $ystem ? What are its two major susystems?System $ was designed and developed over a period of

  • 8/13/2019 Most Useful for Freshers (1)

    94/134

    1@. )ow is the data structure of $ystem different from the relational structure?9nlike $elational systems in System $

    Domains are not supported 1nforcement of candidate key uniueness is optional 1nforcement of entity integrity is optional $eferential integrity is not enforced

    11. What is !ata +ndependence?Data independence means that Zthe application is independent of the storage structure and

    access strategy of data[. #n other words, *he ability to modify the schema definition in one level should notaffect the schema definition in the ne2t higher level.

    *wo types of Data #ndependence4 3hysical Data #ndependence4 odification in physical level should not affect the logical

    level. -ogical Data #ndependence4 odification in logical level should affect the view level.

    &ED: Logical !ata +ndependence is more difficult to achieve

    12. What is a view? )ow it is related to data independence?A view may be thought of as a virtual table, that is, a table that does not really e2ist in its own

    right but is instead derived from one or more underlying base table. #n other words, there is no stored filethat direct represents the view instead a definition of view is stored in data dictionary.

    "rowth and restructuring of base tables is not reflected in views. *hus the view can insulate

    users from the effects of restructuring and growth in the database. )ence accounts for logical dataindependence.

    13. What is !ata #odel? A collection of conceptual tools for describing data, data relationships data semantics and

    constraints.

    1*. What is model?*his data model is based on real world that consists of basic ob:ects called entities and of

    relationship among these ob:ects. 1ntities are described in a database by a set of attributes.

    1-. What is Eject Eriented model?*his model is based on collection of ob:ects. An ob:ect contains values stored in instance

    variables with in the ob:ect. An ob:ect also contains bodies of code that operate on the ob:ect. *hesebodies of code are called methods. Ob:ects that contain same types of values and the same methods aregrouped together into classes.

    10. What is an ntity?#t is a thing in the real world with an independent e2istence.

    15. What is an ntity type?#t is a collection 'set( of entities that have same attributes.

    17. What is an ntity set?#t is a collection of all entities of particular entity type in the database.

    1. What is an xtension of entity type?*he collections of entities of a particular entity type are grouped together into an entity set.

    2@. What is Wea' ntity set?An entity set may not have sufficient attributes to form a primary key, and its primary key

    compromises of its partial key and primary key of its parent entity, then it is said to be Eeak 1ntity set.

    21. What is an attriute?#t is a particular property, which describes the entity.

    22. What is a elation $chema and a elation?A relation Schema denoted by $'A

  • 8/13/2019 Most Useful for Freshers (1)

    95/134

    2*. What is elationship?#t is an association among two or more entities.

    2-. What is elationship set?*he collection 'or set( of similar relationships.

    20. What is elationship type?

    $elationship type defines a set of associations or a relationship set among a given set of entitytypes.

    25. What is degree of elationship type?#t is the number of entity type participating.

    2-. What is !!L !ata !efinition Language4?A data base schema is specifies by a set of definitions e2pressed by a special language called

    DD-.

    20. What is B!L Biew !efinition Language4?#t specifies user views and their mappings to the conceptual schema.

    25. What is $!L $torage !efinition Language4?*his language is to specify the internal schema. *his language may specify the mapping between

    two schemas.

    27. What is !ata $torage !efinition Language?*he storage structures and access methods used by database system are specified by a set of

    definition in a special type of DD- called data storage6definition language.

    2. What is !#L !ata #anipulation Language4?*his language that enable user to access or manipulate data as organised by appropriate data

    model. >rocedural !#L or Low level: D- reuires a user to specify what data are needed and how to get

    those data. &on>rocedural !#L or )igh level: D- reuires a user to specify what data are needed without

    specifying how to get those data.

    31. What is !#L ,ompiler?#t translates D- statements in a uery language into low6level instruction that the uery

    evaluation engine can understand.

    32. What is Auery evaluation engine?#t e2ecutes low6level instruction generated by compiler.

    33. What is !!L +nterpreter?#t interprets DD- statements and record them in tables containing metadata.

    3*. What is ecordatatime?*he -ow level or 3rocedural D- can specify and retrieve each record from a set of records. *his

    retrieve of a record is said to be $ecord6at6a6time.

    3-. What is $etatatime or $etoriented?*he )igh level or !on6procedural D- can specify and retrieve many records in a single D-

    statement. *his retrieve of a record is said to be Set6at6a6time or Set6oriented.

    30. What is elational 6lgera?#t is procedural uery language. #t consists of a set of operations that take one or two relations

    as input and produce a new relation.

    35. What is elational ,alculus?

    #t is an applied predicate calculus specifically tailored for relational databases proposed by 1..Codd. 1.g. of languages based on it are DS- A-3)A, 91-.

    37. )ow does Dupleoriented relational calculus differ from domainorientedrelational calculus*he tuple6oriented calculus uses a tuple variables i.e., variable whose only permitted values are

    tuples of that relation. 1.g. 91-

  • 8/13/2019 Most Useful for Freshers (1)

    96/134

    *he domain6oriented calculus has domain variables i.e., variables that range over the underlying domainsinstead of over relation. 1.g. #--, D1D9C1.

    3. What is normaliCation?#t is a process of analysing the given relation schemas based on their unctional Dependencies

    'Ds( and primary key to achieve the properties inimizing redundancy inimizing insertion, deletion and update anomalies.

    *@. What is tMGN > t t;MGN tBMHN > t t;MHN tBMN > t;MN and tMN > t '$6'G 9 H(( N*3. What is Lossless join property?

    #t guarantees that the spurious tuple generation does not occur with respect to relation schemasafter decomposition.

    **. What is 1 &< &ormal

  • 8/13/2019 Most Useful for Freshers (1)

    97/134

    *he :oin dependency is implied by the set of D, over $ in which the left side is key of $.-1. What is !omain[ey &ormal

  • 8/13/2019 Most Useful for Freshers (1)

    98/134

    #n distributed deadlock detection, the delay in propagating local information might cause thedeadlock detection algorithms to identify deadlocks that do not really e2ist. Such situations are calledphantom deadlocks and they lead to unnecessary aborts.

    0@. What is a chec'point and When does it occur?A Checkpoint is like a snapshot of the D%S state. %y taking checkpoints, the D%S can reduce

    the amount of work to be done during restart in the event of subseuent crashes.

    01. What are the different phases of transaction?Different phases are

    Analysis phase $edo 3hase 9ndo phase

    02. What do you mean y flat file dataase?#t is a database in which there are no programs or user access languages. #t has no cross6file

    capabilities but is user6friendly and provides user6interface management.

    03. What is Ktransparent !"#$K?#t is one, which keeps its 3hysical Structure hidden from user.

    0*. "rief theory of &etwor'% )ierarchical schemas and their properties!etwork schema uses a graph data structure to organize records e2ample for such a database

    management system is C*C" while a hierarchical schema uses a tree data structure e2ample for such asystem is #S.

    0-. What is a /uery?A uery with respect to D%S relates to user commands that are used to interact with a data

    base. *he uery language can be classified into data definition language and data manipulation language.

    00. What do you mean y ,orrelated su/uery?Subueries, or nested ueries, are used to bring back a set of rows to be used by the parent

    uery. Depending on how the subuery is written, it can be e2ecuted once for the parent uery or it canbe e2ecuted once for each row returned by the parent uery. #f the subuery is e2ecuted for each row ofthe parent, this is called a correlated su/uery.

    A correlated subuery can be easily identified if it contains any references to the parent subuerycolumns in its E)1$1 clause. Columns from the subuery cannot be referenced anywhere else in theparent uery. *he following e2ample demonstrates a non6correlated subuery.

    1.g. Select 7 rom C9S* Ehere

  • 8/13/2019 Most Useful for Freshers (1)

    99/134

    #KO, Security, -anguage 3rocessing, 3rocess Control, Storage anagement, -ogging and$ecovery, Distribution Control, *ransaction Control, emory anagement, -ock anagement

    53. Which part of the !"#$ ta'es care of the data dictionary? )owData dictionary is a set of tables and database ob:ects that is stored in a special area of the

    database and maintained e2clusively by the kernel.

    5*. What is the jo of the information stored in datadictionary?

    *he information in the data dictionary validates the e2istence of the ob:ects, provides access tothem, and maps the actual physical storage location.

    5-. &ot only !"#$ ta'es care of locating data it alsodetermines an optimal access path to store or retrieve the data

    50. )ow do you communicate with an !"#$?Hou communicate with an $D%S using Structured uery -anguage 'S-(

    55. !efine $AL and state the differences etween $AL and other conventional programming LanguagesS- is a nonprocedural language that is designed specifically for data access operations on

    normalized relational database structures. *he primary difference between S- and other conventionalprogramming languages is that S- statements specify what data operations should be performed ratherthan how to perform them.

    57. &ame the three major set of files on dis' that compose a dataase in Eracle*here are three ma:or sets of files on disk that compose a database. All the files are binary.*hese are

    Database files Control files $edo logs

    *he most important of these are the database files where the actual data resides. *he controlfiles and the redo logs support the functioning of the architecture itself.

    All three sets of files must be present, open, and available to Oracle for any data on the databaseto be useable. Eithout these files, you cannot access the database, and the database administrator mighthave to recover some or all of the database using a backup, if there is one.

    5. What is an Eracle +nstance?*he Oracle system processes, also known as Oracle background processes, provide functions for

    the user processesfunctions that would otherwise be done by the user processes themselvesOracle database6wide system memory is known as the S"A, the system gloal area or shared

    gloal area. *he data and control structures in the S"A are shareable, and all the Oracle backgroundprocesses and user processes can use them.

    *he combination of the S"A and the Oracle background processes is known as an Eracleinstance

    7@. What are the four Eracle system processes that must always e up and running for the dataase to

    e useale*he four Oracle system processes that must always be up and running for the database to be

    useable include !"W 'Database Eriter(, L=W '-og Eriter(, $#E& 'System onitor(, and >#E&'3rocess onitor(.

    71. What are dataase files% control files and log files. )ow many of these files should a dataase have at

    least? Why?!ataase

  • 8/13/2019 Most Useful for Freshers (1)

    100/134

    redo logs, and the synchronization information to ensure that all three sets of files are always in step.1very time you add a new database or redo log file to the database, the information is recorded in thecontrol files.

    edo LogsAny database must have at least two redo logs. *hese are the :ournals for the databaseW

    the redo logs record all changes to the user ob:ects or system ob:ects. #f any type of failure occurs, thechanges recorded in the redo logs can be used to bring the database to a consistent state without losingany committed transactions. #n the case of non6data loss failure, Oracle can apply the information in the

    redo logs automatically without intervention from the D%A.*he redo log files are fi2ed in size and never grow dynamically from the size at which

    they were created.

    72. What is EW+!?*he $OE#D is a uniue database6wide physical address for every row on every table. Once

    assigned 'when the row is first inserted into the database(, it never changes until the row is deleted or thetable is dropped.

    *he $OE#D consists of the following three components, the combination of which uniuelyidentifies the physical storage location of the row.

    Oracle database file number, which contains the block with the rows Oracle block address, which contains the row *he row within the block 'because each block can hold many rows(*he $OE#D is used internally in inde2es as a uick means of retrieving rows with a particular key

    value. Application developers also use it in S- statements as a uick way to access a row once they

    know the $OE#D

    73. What is Eracle "loc'? ,an two Eracle "loc's have the same address?Oracle LformatsL the database files into a number of Oracle blocks when they are first created

    making it easier for the $D%S software to manage the files and easier to read data into the memoryareas.

    *he block size should be a multiple of the operating system block size. $egardless of the blocksize, the entire block is not available for holding dataW Oracle takes up some space to manage thecontents of the block. *his block header has a minimum size, but it can grow.

    *hese Oracle blocks are the smallest unit of storage. #ncreasing the Oracle block size can improveperformance, but it should be done only when the database is first created.

    1ach Oracle block is numbered seuentially for each database file starting at

  • 8/13/2019 Most Useful for Freshers (1)

    101/134

    e2ception handler e2ecutes, control returns to the block in which the handler was defined. #f there are nomore e2ecutable statements in the block, control returns to the caller.

    Qser!efined xceptions3-KS- enables the user to define e2ception handlers in the declarations area of

    subprogram specifications. 9ser accomplishes this by naming an e2ception as in the following e2ample4otJfailure 1GC13*#O!W

    #n this case, the e2ception name is otJfailure. Code associated with this handler is written in the1GC13*#O! specification area as follows4

    1GC13*#O! when O*JA#-9$1 then outJstatusJcode 4> gJoutJstatusJcodeW outJmsg 4> gJoutJmsgW

    *he following is an e2ample of a subprogram e2ception41GC13*#O! when !OJDA*AJO9!D then gJoutJstatusJcode 4> A#-W $A#S1 otJfailureW

    Eithin this e2ception is the $A#S1 statement that transfers control back to the otJfailure e2ceptionhandler. *his techniue of raising the e2ception is used to invoke all user6defined e2ceptions.

    $ystem!efined xceptions

    12ceptions internal to 3-KS- are raised automatically upon error. !OJDA*AJO9!D is asystem6defined e2ception. *able below gives a complete list of internal e2ceptions.

    >LG$AL internal exceptions.

    -

    ii. Dheta joins iii. Qpdating tales from join

    a( i T ii b( ii T iii

  • 8/13/2019 Most Useful for Freshers (1)

    102/134

    c( i T iii d( ii T iii

    'a( i T iii because theta :oins are :oins made on keys that are not primary keys.

    1. 6 " , is a set of attriutes. Dhe functional dependency is as follows 6" V " 6, V , , V "

    a( is in

    'a( is in

    3. 6 dominant entity is the entitya( on the ! side in a < 4 ! relationshipb( on the < side in a < 4 ! relationshipc( on either side in a < 4 < relationshipd( nothing to do with < 4 < or < 4 ! relationship

    'b( on the < side in a < 4 ! relationship

    *. $elect &ED)% ,Q$DE#

  • 8/13/2019 Most Useful for Freshers (1)

    103/134

    3rocedures that are not part of a package are known as stand6alone because they independentlydefined. A good e2ample of a stand6alone procedure is one written in a S-7orms application. *hesetypes of procedures are not available for reference from other Oracle tools. Another limitation of stand6alone procedures is that they are compiled at run time, which slows e2ecution.

    1@1. What are cursors give different types of cursors.3-KS- uses cursors for all database information accesses statements. *he language

    supports the use two types of cursors +mplicit xplicit

    1@2. What is cold ac'up and hot ac'up in case of Eracle4?

    ,old "ac'up:#tis copying the three sets of files 'database files, redo logs, and control file( when

    the instance is shut down. *his is a straight file copy, usually from the disk directly to tape. Hou must shutdown the instance to guarantee a consistent copy.

    #f a cold backup is performed, the only option available in the event of data file lossis restoring all the files from the latest backup. All work performed on the database since the last backupis lost. )ot "ac'up:

    Some sites 'such as worldwide airline reservations systems( cannot shut down thedatabase while making a backup copy of the files. *he cold backup is not an available option.

    So different means of backing up database must be used the hot backup. #ssue a

    S- command to indicate to Oracle, on a tablespace6by6tablespace basis, that the files of the tablespaceare to backed up. *he users can continue to make full use of the files, including making changes to thedata. Once the user has indicated that heKshe wants to back up the tablespace files, heKshe can use theoperating system to copy those files to the desired backup destination.

    *he database must be running in A$C)#+1-O" mode for the hot backup option.#f a data loss failure does occur, the lost database files can be restored using the

    hot backup and the online and offline redo logs created since the backup was done. *he database isrestored to the most consistent state without any loss of committed transactions.

    1@3. What are 6rmstrong rules? )ow do we say that they are complete andGor sound*he well6known inference rules for Ds

    $efle2ive rule 4#f H is subset or eual to G then GH.

    Augmentation rule4#f GH then GH.

    *ransitive rule4

    #f \G H, H ] then G. Decomposition rule 4 #f GH then GH. 9nion or Additive rule4 #f \GH, G] then GH. 3seudo *ransitive rule 4 #f \G H, EH] then EG.

    Of these the first three are known as Amstrong $ules. *hey are sound because it is enough if aset of Ds satisfy these three. *hey are called complete because using these three rules we can generatethe rest all inference rules.

    1@*. )ow can you find the minimal 'ey of relational schema?inimal key is one which can identify each tuple of the given relation schema uniuely. or

    finding the minimal key it is reuired to find the closure that is the set of all attributes that are dependenton any given set of attributes under the given set of functional dependency.

    .lo ? Determining G8, closure for G, given set of Ds

    G;. Set Old G8 > G8

    3. or each D H in and if H belongs to G8then add t9 X

    . $epeat steps ; and B until Old G8 > G8

    .lo?? Determining minimal ^ for relation schema $, given set of Ds

  • 8/13/2019 Most Useful for Freshers (1)

    104/134

    b. #f '^ & A(8> $ then set ^ > '^ & A(8

    1@-. What do you understand y dependency preservation?"iven a relation $ and a set of Ds , dependency preservation states that the closure of

    the union of the pro:ection of on each decomposed relation $i is eual to the closure of . i.e.,

    ''$

  • 8/13/2019 Most Useful for Freshers (1)

    105/134

    11. What command is used to get ac' the privileges offered y the =6&D command?$1+O^1

    12. Which system tales contain information on privileges granted and privileges otained?9S1$J*A%J3$#+SJAD1, 9S1$J*A%J3$#+SJ$1CD

    13. Which system tale contains information on constraints on all the tales created?9S1$JCO!S*$A#!*S

    1*. DQ&,6D D6"L #>J!LD J

    Will the outputs of the aove two commands differ?%oth will result in deleting all the rows in the table 13.

    1-. What is the difference etween DQ&,6D and !LD commands?*$9!CA*1 is a DD- command whereas D1-1*1 is a D- command. )ence D1-1*1 operation can

    be rolled back, but *$9!CA*1 operation cannot be rolled back. E)1$1 clause can be used with D1-1*1and not with *$9!CA*1.

    10. What command is used to create a tale y copying the structure of another tale?

    Ans'er ;C$1A*1 *A%-1 .. AS S1-1C* command

    -

  • 8/13/2019 Most Useful for Freshers (1)

    106/134

    Ans'er ;D1SC has two purposes. #t is used to describe a schema as well as to retrieve rows from table in

    descending order.-entafour.11. !isplay the details of pac'ages whose sales crossed the -@@@ mar'.12.

  • 8/13/2019 Most Useful for Freshers (1)

    107/134

    2@. )ow many programmers 'now either , or >ascal?21. )ow many programmers donFt 'now , and ,88?22. )ow old is the oldest male programmer?23. What is the average age of female programmers?2*. ,alculate the experience in years for each programmer and display along with their names in

    descending order.2-. Who are the programmers who celerate their irthdays during the current month?20. )ow many female programmers are there?

    25. What are the languages 'nown y the male programmers?27. What is the average salary?2. )ow many people draw -@@@ to 5-@@?3@. !isplay the details of those who donFt 'now ,% ,88 or >ascal.31. !isplay the costliest pac'age developed y each programmer.32. >roduce the following output for all the male programmers

    >rogrammer #r. 6rvind has 1- years of experience

    C>D:

    CW

    . S1-1C* 7 $O SO*EA$1 E)1$1 3!A1 > $A^1S)W

    31!*AO9$W

    +%W

  • 8/13/2019 Most Useful for Freshers (1)

    108/134

    ;. S1-1C* CO9!*'7( $O 3$O"$A1$ E)1$1 SA- %1*E11! =@@@ A!D F=@@W

    B@. S1-1C* 7 $O 3$O"$A1$ E)1$1 3$O< !O* #! 'C,C88,3ASCA-( A!D 3$O; !O* #!

    'C,C88,3ASCA-(W

    B 9!#O! S1-1C* s. UU 3!A1UU 6 has UU *$9!C 'O!*)SJ%1*E11! 'SHSDA*1,DO(K %."$W or S1-1C* 1!A1$O 13 E)1$1 13!O #! 'S1-1C* "$ $O 13(W

    ;. S1-1C* 7 $O 13 E)1$1 D13*!O #! 'S1-1C* D13*!O $O 13 "$O93 %H D13*!O )A+#!"CO9!*'13!O(P;@(W?. S1-1C* 7 $O 13 E)1$1 SA- P ' S1-1C* AG'SA-( $O 13 "$O93 %H O% )A+#!" O% >A!A"1$ (WF. S1-1C* O%, AG'SA-( $O 13 "$O93 %H O%W

  • 8/13/2019 Most Useful for Freshers (1)

    109/134

    . S1-1C* 7 $O 13 E)1$1 'D13*!O, )#$1DA*1( #! 'S1-1C* D13*!O, AG')#$1DA*1( $O 13"$O93 %H D13*!O(W. S1-1C* *OJC)A$')#$1DA*1,HHHH( LH1A$L, CO9!*'13!O( L!O. O 13-OH11SL $O 13"$O93 %H *OJC)A$')#$1DA*1,HHHH( )A+#!" CO9!*'13!O( > 'S1-1C* AG'CO9!*'13!O(( $O13 "$O93 %H *OJC)A$')#$1DA*1,HHHH((W%.SA-(W

  • 8/13/2019 Most Useful for Freshers (1)

    110/134

    Computer !etworks1. What are the two types of transmission technology availale?

    'i( %roadcast and 'ii( point6to6point

    2. What is sunet?

    A generic term for section of a large networks usually separated by a bridge or router.

    3. !ifference etween the communication and transmission.

    *ransmission is a physical movement of information and concern issues like bit polarity,synchronisation, clock etc.Communication means the meaning full e2change of information between two communication

    media.

    *. What are the possile ways of data exchange?'i( Simple2 'ii( )alf6duple2 'iii( ull6duple2.

    -. What is $6>?Series of interface points that allow other computers to communicate with the other layers of

    network protocol stack.

    0. What do you meant y Ktriple ZK in &etwor's?*he function of 3AD '3acket Assembler Disassembler( is described in a document known as G.B.

    *he standard protocol has been defined between the terminal and the 3AD, called G.;W another standardprotocol e2ists between hte 3AD and the network, called G.;. *ogether, these three recommendations

    are often called Ltriple GL

    5. What is frame relay% in which layer it comes?rame relay is a packet switching technology. #t will operate in the data link layer.

    7. What is terminal emulation% in which layer it comes?*elnet is also called as terminal emulation. #t belongs to application layer.

    . What is "eaconing?*he process that allows a network to self6repair networks problems. *he stations on the network

    notify the other stations on the ring when they are not receiving the transmissions. %eaconing is used in*oken ring and DD# networks.

    1@. What is redirector?$edirector is software that intercepts file or prints #KO reuests and translates them into network

    reuests. *his comes under presentation layer.

    11. What is &D"+E$ and &D"Q+?!1*%#OS is a programming interface that allows #KO reuests to be sent to and received from a

    remote computer and it hides the networking hardware from applications.!1*%19# is !et%#OS e2tended user interface. A transport protocol designed by microsoft and #%

    for the use on small subnets.

    12. What is 6+!?A method for providing fault tolerance by using multiple hard disk drives.

    13. What is passive topology?

    ComputerNetor!s

  • 8/13/2019 Most Useful for Freshers (1)

    111/134

    Ehen the computers on the network simply listen and receive the signal, they are referred to aspassive because they don0t amplify the signal in any way. 12ample for passive topology 6 linear bus.

    1*. What is "router?)ybrid devices that combine the features of both bridges and routers.

    1-. What is cladding?A layer of a glass surrounding the center fiber of glass inside a fiber6optic cable.

    10. What is pointtopoint protocolA communications protocol used to connect computers to remote networking services including

    #nternet service providers.

    15. )ow =ateway is different from outers?A gateway operates at the upper levels of the OS# model and translates information between two

    completely different network architectures or data formats

    17. What is attenuation?*he degeneration of a signal over distance on a network cable is called attenuation.

    1. What is #6, address?*he address for a device as it is identified at the edia Access Control 'AC( layer in the network

    architecture. AC address is usually stored in $O on the network adapter card and is uniue.

    2@. !ifference etween it rate and aud rate. %it rate is the number of bits transmitted during one second whereas baud rate refers to thenumber of signal units per second that are reuired to represent those bits.

    aud rate I it rate G &where ! is no6of6bits represented by each signal shift.

    21. What is "andwidth? 1very line has an upper limit and a lower limit on the freuency of signals it can carry. *hislimited range is called the bandwidth.

    22. What are the types of Dransmission media?Signals are usually transmitted over some transmission media that are broadly classified in to

    two categories.a4 =uided #edia:

    *hese are those that provide a conduit from one device to another that include twisted6

    pair, coa2ial cable and fiber6optic cable. A signal traveling along any of these media is directed and iscontained by the physical limits of the medium. *wisted6pair and coa2ial cable use metallic that acceptand transport signals in the form of electrical current. Optical fiber is a glass or plastic cable that acceptsand transports signals in the form of light. 4 Qnguided #edia:

    *his is the wireless media that transport electromagnetic waves without using a physicalconductor. Signals are broadcast either through air. *his is done through radio communication, satellitecommunication and cellular telephony.

    23. What is >roject 7@2?#t is a pro:ect started by #111 to set standards to enable intercommunication between euipment

    from a variety of manufacturers. #t is a way for specifying functions of the physical layer, the data linklayer and to some e2tent the network layer to allow for interconnectivity of ma:or -A!protocols.

    #t consists of the following4 @;.< is an internetworking standard for compatibility of different -A!s and A!s across protocols. @;.; -ogical link control '--C( is the upper sublayer of the data link layer which is non6architecture6

    specific, that is remains the same for all #1116defined -A!s. edia access control 'AC( is the lower sublayer of the data link layer that contains some distinct

    modules each carrying proprietary information specific to the -A! product being used. *he modulesare 1thernet -A! '@;.B(, *oken ring -A! '@;.(, *oken bus -A! '@;.=(.

    @;.? is distributed ueue dual bus 'DD%( designed to be used in A!s.

    2*. What is >rotocol !ata Qnit?*he data unit in the --C level is called the protocol data unit '3D9(. *he 3D9 contains of four

    fields a destination service access point 'DSA3(, a source service access point 'SSA3(, a control field andan information field. DSA3, SSA3 are addresses used by the --C to identify the protocol stacks on the

  • 8/13/2019 Most Useful for Freshers (1)

    112/134

    receiving and sending machines that are generating and using the data. *he control field specifies whetherthe 3D9 frame is a information frame '# 6 frame( or a supervisory frame 'S 6 frame( or a unnumberedframe '9 6 frame(.

    2-. What are the different type of networ'ing G internetwor'ing devices?epeater:

    Also called a regenerator, it is an electronic device that operates only at physical layer.#t receives the signal in the network before it becomes weak, regenerates the original bit pattern and puts

    the refreshed copy back in to the link."ridges:

    *hese operate both in the physical and data link layers of -A!s of same type. *heydivide a larger network in to smaller segments. *hey contain logic that allow them to keep the traffic foreach segment separate and thus are repeaters that relay a frame only the side of the segment containingthe intended recipent and control congestion.

    outers:*hey relay packets among multiple interconnected networks 'i.e. -A!s of different type(.

    *hey operate in the physical, data link and network layers. *hey contain software that enable them todetermine which of the several possible paths is the best for a particular transmission.

    =ateways:*hey relay packets among networks that have different protocols 'e.g. between a -A! and a

    EA!(. *hey accept a packet formatted for one protocol and convert it to a packet formatted for anotherprotocol before forwarding it. *hey operate in all seven layers of the OS# model.

    20. What is +,#>?#C3 is #nternet Control essage 3rotocol, a network layer protocol of the *C3K#3 suite used byhosts and gateways to send notification of datagram problems back to the sender. #t uses the echo test Kreply to test whether a destination is reachable and responding. #t also handles both control and errormessages.

    25. What are the data units at different layers of the D,> G +> protocol suite?*he data unit created at the application layer is called a message, at the transport layer the data

    unit created is called either a segment or an user datagram, at the network layer the data unit created iscalled the datagram, at the data link layer the datagram is encapsulated in to a frame and finallytransmitted as signals along the transmission media.

    27. What is difference etween 6> and 6>?*he address resolution protocol 'A$3( is used to associate the B; bit #3 address with the bit

    physical address, used by a host or a router to find the physical address of another host on its network bysending a A$3 uery packet that includes the #3 address of the receiver.

    *he reverse address resolution protocol '$A$3( allows a host to discover its #nternet addresswhen it knows only its physical address.

    2. What is the minimum and maximum length of the header in the D,> segment and +> datagram? *he header should have a minimum length of ;@ bytes and can have a ma2imum length of ?@bytes.

    3@. What is the range of addresses in the classes of internet addresses?Class A @.@.@.@ 6

  • 8/13/2019 Most Useful for Freshers (1)

    113/134

    Server6based networks provide centralized control of network resources and rely on servercomputers to provide security and network administration

    33. What are the important topologies for networ's?

    "Q$ topology:#n this each computer is directly connected to primary network cable in a single line.

    6dvantages: #ne2pensive, easy to install, simple to understand, easy to e2tend.

    $D6 topology: #n this all computers are connected using a central hub.

    6dvantages: Can be ine2pensive,