Saturday, 27 April 2019

Viva questions and answers for data structure

Recently Asked Data Structures Viva Questions and Answers:





1. What is data structure?
The logical and mathematical model of a particular organization of data is called data structure. There are two types of data structure
1.Linear
2.Nonlinear

2. What are the goals of Data Structure?
It must rich enough in structure to reflect the actual relationship of data in real world.
The structure should be simple enough for efficient processing of data.

3. What does abstract Data Type Mean?
Data type is a collection of values and a set of operations on these values. Abstract data type refer to the mathematical concept that define the data type.It is a useful tool for specifying the logical properties of a data type.ADT consists of two parts
1.Values definition
2.Operation definition

4. What is the difference between a Stack and an Array?
Stack is a ordered collection of items
Stack is a dynamic object whose size is constantly changing as items are pushed and popped .
Stack may contain different data types
Stack is declared as a structure containing an array to hold the element of the stack, and an integer to indicate the current stack top within the array.

ARRAY
Array is an ordered collection of items
Array is a static object i.e. no of item is fixed and is assigned by the declaration of the array
It contains same data types.
Array can be home of a stack i.e. array can be declared large enough for maximum size of the stack.

5. What do you mean by recursive definition?
The definition which defines an object in terms of simpler cases of itself is called recursive definition.

6. What is sequential search?
In sequential search each item in the array is compared with the item being searched until a match occurs. It is applicable to a table organized either as an array or as a linked list.

7. What actions are performed when a function is called?
When a function is called
i) arguments are passed
ii) local variables are allocated and initialized
ii) transferring control to the function

8. What actions are performed when a function returns?
i) Return address is retrieved
ii) Function’s data area is freed
iii) Branch is taken to the return address

9. What is a linked list?
A linked list is a linear collection of data elements, called nodes, where the linear order is given by pointers. Each node has two parts first part contain the information of the element second part contains the address of the next node in the list.

10. What are the advantages of linked list over array (static data structure)?
The disadvantages of array are
unlike linked list it is expensive to insert and delete elements in the array
One can’t double or triple the size of array as it occupies block of memory space.

In linked list
each element in list contains a field, called a link or pointer which contains the address of the next element
Successive element’s need not occupy adjacent space in memory.

11. Can we apply binary search algorithm to a sorted linked list, why?
No we cannot apply binary search algorithm to a sorted linked list, since there is no way of indexing the middle element in the list. This is the drawback in using linked list as a data structure.

12. What do you mean by free pool?
Pool is a list consisting of unused memory cells which has its own pointer.

13. What do you mean by garbage collection?
It is a technique in which the operating system periodically collects all the deleted space onto the free storage list.It takes place when there is minimum amount of space left in storage list or when "CPU" is ideal.The alternate method to this is to immediately reinsert the space into free storage list which is time consuming.

14. What do you mean by overflow and underflow?1
When new data is to be inserted into the data structure but there is no available space i.e. free storage list is empty this situation is called overflow.
When we want to delete data from a data structure that is empty this situation is called underflow.

15. What are the disadvantages array implementations of linked list?
1.The no of nodes needed can’t be predicted when the program is written.
2.The no of nodes declared must remain allocated throughout its execution

16. What is a queue?1
A queue is an ordered collection of items from which items may be deleted at one end (front end) and items inserted at the other end (rear end).It obeys FIFO rule there is no limit to the number of elements a queue contains.

17. What is a priority queue?
The priority queue is a data structure in which the intrinsic ordering of the elements (numeric or alphabetic)
Determines the result of its basic operation. It is of two types
i) Ascending priority queue- Here smallest item can be removed (insertion is arbitrary)
ii) Descending priority queue- Here largest item can be removed (insertion is arbitrary)

18. What are the disadvantages of sequential storage?
1.Fixed amount of storage remains allocated to the data structure even if it contains less element.
2.No more than fixed amount of storage is allocated causing overflow

19. What are the disadvantages of representing a stack or queue by a linked list?
i) A node in a linked list (info and next field) occupies more storage than a corresponding element in an array.
ii) Additional time spent in managing the available list.

20. What is dangling pointer and how to avoid it?
After a call to free(p) makes a subsequent reference to *p illegal, i.e. though the storage to p is freed but the value of p(address) remain unchanged .so the object at that address may be used as the value of *p (i.e. there is no way to detect the illegality).Here p is called dangling pointer.
To avoid this it is better to set p to NULL after executing free(p).The null pointer value doesn’t reference a storage location it is a pointer that doesn’t point to anything.

21. What are the disadvantages of linear list?
i) We cannot reach any of the nodes that precede node (p)
ii) If a list is traversed, the external pointer to the list must be persevered in order to reference the list again

22. Define circular list?
In linear list the next field of the last node contain a null pointer, when a next field in the last node contain a pointer back to the first node it is called circular list.
Advantages – From any point in the list it is possible to reach at any other point

23. What are the disadvantages of circular list?
i) We can’t traverse the list backward
ii) If a pointer to a node is given we cannot delete the node

24. Define double linked list?
It is a collection of data elements called nodes, where each node is divided into three parts
i) An info field that contains the information stored in the node
ii) Left field that contain pointer to node on left side
iii) Right field that contain pointer to node on right side

25. Is it necessary to sort a file before searching a particular item ?
If less work is involved in searching a element than to sort and then extract, then we don’t go for sort
If frequent use of the file is required for the purpose of retrieving specific element, it is more efficient to sort the file.Thus it depends on situation.

26. What are the issues that hamper the efficiency in sorting a file?
The issues are
i) Length of time required by the programmer in coding a particular sorting program
ii) Amount of machine time necessary for running the particular program
iii)The amount of space necessary for the particular program .

27. Calculate the efficiency of sequential search?
The number of comparisons depends on where the record with the argument key appears in the table
If it appears at first position then one comparison
If it appears at last position then n comparisons
Average=(n+1)/2 comparisons
Unsuccessful search n comparisons
Number of comparisons in any case is O (n).

28. Is any implicit arguments are passed to a function when it is called?
Yes there is a set of implicit arguments that contain information necessary for the function to execute and return correctly. One of them is return address which is stored within the function’s data area, at the time of returning to calling program the address is retrieved and the function branches to that location.

29. Parenthesis is never required in Postfix or Prefix expressions, why?
Parenthesis is not required because the order of the operators in the postfix /prefix expressions determines the actual order of operations in evaluating the expression

30. List out the areas in which data structures are applied extensively?
Compiler Design,
Operating System,
Database Management System,
Statistical analysis package,
Numerical Analysis,
Graphics,
Artificial Intelligence,
Simulation

31. What are the major data structures used in the following areas : network data model & Hierarchical data model?
RDBMS – Array (i.e. Array of structures)
Network data model – Graph
Hierarchical data model – Trees

32. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.

33. Minimum number of queues needed to implement the priority queue?
Two. One queue is used for actual storing of data and another for storing priorities.

34. What is the data structures used to perform recursion?
Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls.
Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.

35. What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?
Polish and Reverse Polish notations.

36. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations?
1.Prefix Notation:
^ – * +ABC – DE + FG
2.Postfix Notation:
AB + C * DE – – FG + ^

37. Sorting is not possible by using which of the following methods?
(a) Insertion
(b) Selection
(c) Exchange
(d) Deletion
(d) Deletion.
Using insertion we can perform insertion sort, using selection we can perform selection sort, using exchange we can perform the bubble sort (and other similar sorting methods). But no sorting method can be done just using deletion.

38. List out few of the Application of tree data-structure?
The manipulation of Arithmetic expression,
Symbol Table construction,
Syntax analysis.

39. List out few of the applications that make use of Multilinked Structures?
Sparse matrix, Index generation.

40. in tree construction which is the suitable efficient data structure?
(A) Array (b) Linked list (c) Stack (d) Queue (e) none
(b) Linked list

41. What is the type of the algorithm used in solving the 8 Queens problem?
Backtracking

42. In an AVL tree, at what condition the balancing is to be done?
If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.

43. In RDBMS, what is the efficient data structure used in the internal storage representation?
B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall be stored in leaf nodes.

45. One of the following tree structures, which is, efficient considering space and time complexities?
a) Incomplete Binary Tree.
b) Complete Binary Tree.
c) Full Binary Tree.
b) Complete Binary Tree.
By the method of elimination:
Full binary tree loses its nature when operations of insertions and deletions are done. For incomplete binary trees,
extra property of complete binary tree is maintained even after operations like additions and deletions are done on it.

46. What is a spanning Tree?
A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized.

47. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
No.Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesn’t mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.

48. Whether Linked List is linear or Non-linear data structure?
According to Storage Linked List is a Non-linear one.

Friday, 26 April 2019

Commonly Asked OOPS VIVA Questions and Answers

Hired Oops VIVA Questions and Answers:



1. What is OOPS?
OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.

2. Write basic concepts of OOPS?
Following are the concepts of OOPS and are as follows:.

Abstraction.
Encapsulation.
Inheritance.
Polymorphism.

3. What is a class?
A class is simply a representation of a type of object. It is the blueprint/ plan/ template that describe the details of an object.

4. What is an object?
Object is termed as an instance of a class, and it has its own state, behavior and identity.

5. What is Encapsulation?
Encapsulation is an attribute of an object, and it contains all data which is hidden. That hidden data can be restricted to the members of that class.

6. What is Polymorphism?
Polymorphism is nothing butassigning behavior or value in a subclass to something that was already declared in the main class. Simply, polymorphism takes more than one form.

7. What is Inheritance?
Inheritance is a concept where one class shares the structure and behavior defined in another class. Ifinheritance applied on one class is called Single Inheritance, and if it depends on multiple classes, then it is called multiple Inheritance.

8. What are manipulators?
Manipulators are the functions which can be used in conjunction with the insertion (<<) and extraction (>>) operators on an object. Examples are endl and setw.

9. Define a constructor?
Constructor is a method used to initialize the state of an object, and it gets invoked at the time of object creation.

10. Define Destructor?
Destructor is a method which is automatically called when the object ismade ofscope or destroyed. Destructor name is also same asclass name but with the tilde symbol before the name.

11. What is Inline function?
Inline function is a technique used by the compilers and instructs to insert complete body of the function wherever that function is used in the program source code.

12. What is avirtual function?
Virtual function is a member function ofclass and its functionality can be overridden in its derived class. This function can be implemented by using a keyword called virtual, and it can be given during function declaration.Virtual function can be achieved in C++, and it can be achieved in C Language by using function pointers or pointers to function.

13. What isfriend function?
Friend function is a friend of a class that is allowed to access to Public, private or protected data in that same class. If the function is defined outside the class cannot access such information.
Friend can be declared anywhere in the class declaration, and it cannot be affected by access control keywords like private, public or protected.

14. What is function overloading?
Function overloading is defined as a normal function, but it has the ability to perform different tasks. It allows creation of several methods with the same name which differ from each other by type of input and output of the function.
Example:
void add(int& a, int& b);
void add(double& a, double& b);
void add(struct bob& a, struct bob& b);

15. What is operator overloading?
Operator overloading is a function where different operators are applied and depends on the arguments. Operator,-,* can be used to pass through the function , and it has their own precedence to execute.

Example:
class complex {
double real, imag;

public:
complex(double r, double i) :
real(r), imag(i) {}
complex operator+(complex a, complex b);
complex operator*(complex a, complex b);
complex& operator=(complex a, complex b);
}

a=1.2, b=6

16. What is an abstract class?
An abstract class is a class which cannot be instantiated. Creation of an object is not possible withabstract class , but it can be inherited. An abstract class can be contain members, methods and also Abstract method.

A method that is declared as abstract and does not have implementation is known as abstract method.

Syntax:
               abstract void show();    //no body and abstract keyword

17. What is a ternary operator?
Ternary operator is said to be an operator which takes three arguments. Arguments and results are of different data types , and it is depends on the function. Ternary operator is also called asconditional operator.

18. What is the use of finalize method?
Finalize method helps to perform cleanup operations on the resources which are not currently used. Finalize method is protected , and it is accessible only through this class or by a derived class.

19. What are different types of arguments?
A parameter is a variable used during the declaration of the function or subroutine and arguments are passed to the function , and it should match with the parameter defined. There are two types of Arguments.
Call by Value – Value passed will get modified only inside the function , and it returns the same value whatever it is passed it into the function.
Call by Reference – Value passed will get modified in both inside and outside the functions and it returns the same or different value.

20. What is super keyword?
Super keyword is used to invoke overridden method which overrides one of its superclass methods. This keyword allows to access overridden methods and also to access hidden members of the super class.It also forwards a call from a constructor to a constructor in the super class.

21. What is method overriding?
Method overriding is a feature that allows sub class to provide implementation of a method that is already defined in the main class. This will overrides the implementation in the superclass by providing the same method name, same parameter and same return type.

22. What is an interface?
An interface is a collection of abstract method. If the class implements an inheritance, and then thereby inherits all the abstract methods of an interface.

23. What is exception handling?
Exception is an event that occurs during the execution of a program. Exceptions can be of any type – Run time exception, Error exceptions. Those exceptions are handled properly through exception handling mechanism like try, catch and throw keywords.

24. What are tokens?
Token is recognized by a compiler and it cannot be broken down into component elements. Keywords, identifiers, constants, string literals and operators are examples of tokens.
Even punctuation characters are also considered as tokens – Brackets, Commas, Braces and Parentheses.

25. Difference between overloading and overriding?

Overloading is static binding whereas Overriding is dynamic binding. Overloading is nothing but the same method with different arguments , and it may or may not return the same value in the same class itself.
Overriding is the same method names with same arguments and return types associates with the class and its child class.

26. Difference between class and an object?
An object is an instance of a class. Objects hold any information , but classes don’t have any information. Definition of properties and functions can be done at class and can be used by the object.
Class can have sub-classes, and an object doesn’t have sub-objects.

27. What is an abstraction?
Abstraction is a good feature of OOPS , and it shows only the necessary details to the client of an object. Means, it shows only necessary details for an object, not the inner details of an object. Example – When you want to switch On television, it not necessary to show all the functions of TV. Whatever is required to switch on TV will be showed by using abstract class.

28. What are access modifiers?
Access modifiers determine the scope of the method or variables that can be accessed from other various objects or classes. There are 5 types of access modifiers , and they are as follows:.

Private.
Protected.
Public.
Friend.
Protected Friend.

29. What is sealed modifiers?
Sealed modifiers are the access modifiers where it cannot be inherited by the methods. Sealed modifiers can also be applied to properties, events and methods. This modifier cannot be applied to static members.

30. How can we call the base method without creating an instance?
Yes, it is possible to call the base method without creating an instance. And that method should be,.Static method.Doing inheritance from that class.-Use Base Keyword from derived class.

31. What is the difference between new and override?
The new modifier instructs the compiler to use the new implementation instead of the base class function. Whereas, Override modifier helps to override the base class function.

32. What are the various types of constructors?
There are three various types of constructors , and they are as follows:.

- Default Constructor – With no parameters.
- Parametric Constructor – With Parameters. Create a new instance of a class and also passing arguments simultaneously.
- Copy Constructor – Which creates a new object as a copy of an existing object.

33. What is early and late binding?
Early binding refers to assignment of values to variables during design time whereas late binding refers to assignment of values to variables during run time.

34. What is ‘this’ pointer?
THIS pointer refers to the current object of a class. THIS keyword is used as a pointer which differentiates between the current object with the global object. Basically, it refers to the current object.

35. What is the difference between structure and a class?
Structure default access type is public , but class access type is private. A structure is used for grouping data whereas class can be used for grouping data and methods.
Structures are exclusively used for dataand it doesn’t require strict validation , but classes are used to encapsulates and inherit data which requires strict validation.

36. What is the default access modifier in a class?
The default access modifier of a class is Private by default.

37. What is pure virtual function?
A pure virtual function is a function which can be overridden in the derived classbut cannot be defined. A virtual function can be declared as Pure by using the operator =0.

Example -.
Virtual void function1() // Virtual, Not pure
Virtual void function2() = 0 //Pure virtual

38. What are all the operators that cannot be overloaded?
Following are the operators that cannot be overloaded -.

Scope Resolution (:: )
Member Selection (.)
Member selection through a pointer to function (.*)

39. What is dynamic or run time polymorphism?
Dynamic or Run time polymorphism is also known as method overriding in which call to an overridden function is resolved during run time, not at the compile time. It means having two or more methods with the same name,same signature but with different implementation.

40. Do we require parameter for constructors?
No, we do not require parameter for constructors.

41. What is a copy constructor?
This is a special constructor for creating a new object as a copy of an existing object. There will be always only on copy constructor that can be either defined by the user or the system.

42. What does the keyword virtual represented in the method definition?
It means, we can override the method.

43. Whether static method can use non static members?
False.

44. What arebase class, sub class and super class?
Base class is the most generalized class , and it is said to be a root class.
Sub class is a class that inherits from one or more base classes.
Super class is the parent class from which another class inherits.

45. What is static and dynamic binding?
Binding is nothing but the association of a name with the class. Static binding is a binding in which name can be associated with the class during compilation time , and it is also called as early Binding.
Dynamic binding is a binding in which name can be associated with the class during execution time , and it is also called as Late Binding.

46. How many instances can be created for an abstract class?
Zero instances will be created for an abstract class.

47. Which keyword can be used for overloading?
Operator keyword is used for overloading.

48. What is the default access specifier in a class definition?
Private access specifier is used in a class definition.

49. Which OOPS concept is used as reuse mechanism?
Inheritance is the OOPS concept that can be used as reuse mechanism.

50. Which OOPS concept exposes only necessary information to the calling functions?
Data Hiding / Abstraction

15 TOP Real Time UML Lab Viva Questions Answers

Recently Asked UML VIVA Questions and Answers:




1.What is UML?
UML stands for the Unified Modeling Language.
It is a graphical language for 1) visualizing, 2) constructing, and 3) documenting the artifacts of a system.
It allows you to create a blue print of all the aspects of the system, before actually physically implementing the system.

2.What are the advantages of creating a model?
Modeling is a proven and well-accepted engineering technique which helps build a model.
Model is a simplification of reality; it is a blueprint of the actual system that needs to be built.
Model helps to visualize the system.
Model helps to specify the structural and behavior of the system.
Model helps make templates for constructing the system.
Model helps document the system.

3.What are the different views that are considered when building an object-oriented software system? 
Normally there are 5 views.
Use Case view - This view exposes the requirements of a system.
Design View - Capturing the vocabulary.
Process View - modeling the distribution of the systems processes and threads.
Implementation view - addressing the physical implementation of the system.
Deployment view - focus on the modeling the components required for deploying the system.

4.What are the major three types of modeling used?
The 3 Major types of modeling are
architectural,
behavioral, and
structural.
5.Name 9 modeling diagrams that are frequently used?
9 Modeling diagrams that are commonly used are
Use case diagram
Class Diagram
Object Diagram
Sequence Diagram
statechart Diagram
Collaboration Diagram
Activity Diagram
Component diagram
Deployment Diagram.

6.How would you define Architecture?
Architecture is not only taking care of the structural and behavioral aspect of a software system but also taking into account the software usage, functionality, performance, reuse, economic and technology constraints.

7.What is SDLC (Software Development Life Cycle)?
SDLC is a system including processes that are
Use case driven,
Architecture centric,
Iterative, and
Incremental.

8.What is the Life Cycle divided into?
This Life cycle is divided into phases.
Each Phase is a time span between two milestones.
The milestones are
Inception,
Elaboration,
Construction, and
Transition.

9.What are the Process Workflows that evolve through these phases?
The Process Workflows that evolve through these phases are
Business Modeling,
Requirement gathering,
Analysis and Design,
Implementation,
Testing,
Deployment.
Supporting Workflows are Configuration, change management, and Project management.

10.What are Relationships?
There are different kinds of relationships:
Dependencies,
Generalization, and
Association.
Dependencies are relationships between two entities.
A change in specification of one thing may affect another thing.
Most commonly it is used to show that one class uses another class as an argument in the signature of the operation.

Generalization is relationships specified in the class subclass scenario, it is shown when one entity inherits from other.
Associations are structural relationships that are:
a room has walls,
Person works for a company.

Aggregation is a type of association where there is a has a relationship.
As in the following examples: A room has walls, or if there are two classes room and walls then the relation ship is called a association and further defined as an aggregation.

11.How are the diagrams divided? 
The nine diagrams are divided into static diagrams and dynamic diagrams.

 12.Static Diagrams (Also called Structural Diagram): 
The following diagrams are static diagrams.
Class diagram,
Object diagram,
Component Diagram,
Deployment diagram.

13.Dynamic Diagrams (Also called Behavioral Diagrams):
The following diagrams are dynamic diagrams.
Use Case Diagram,
Sequence Diagram,
Collaboration Diagram,
Activity diagram,
Statechart diagram.

14.What are Messages?
A message is the specification of a communication, when a message is passed that results in action that is in turn an executable statement.

15.What is an Use Case?
A use case specifies the behavior of a system or a part of a system.
Use cases are used to capture the behavior that need to be developed.
It involves the interaction of actors and the system.

Monday, 22 April 2019

Top 40 Network Analysis Lab Viva Questions and Answers

Model Viva Questions ForName Of The Lab: Network Analysis:



1.What is resistance?
the resistance is the property of a material to oppose the flow of current in a material.its unit is ohm.

2.What are the material used for resistor?
the material used are maganin (alloy of copper magnese and nickel),constantan(alloy of nickel and
copper).

3.what is inductance?
It is the property of a material by virtue of which it opposes any change of magnitude and direction of
current passing through the conductor.

4.what happens to voltage when current through the inductor is constant?
The voltage across inductor is zero.

5.how will you define capacitance?
It is the ability to store electric charge within it.Capacitance is a measure of charge per unit voltage
that can be stored in an element.

6.What happens to voltage when current is zero?
the voltage is constant.

7.When we use 3 terminal resistor?
It is used when resistance is less than 1 ohm.

8.what is the unit of charge and current?
the units are coulomb and ampere.

9.What are the properties of a resistor?
the properties are high resistivity ,resistance to oxidation, corrosion and moisture.

10.what is Q factor?
the Q factor is ratio of inductive reactance to resistance of a coil.

11.What are the material used for inductance coil?
the materials used are marble because it is unaffected by atmospheric conditions.

12.Which capacitor is preferred for high voltage and frequency?
The vaccum and gas filled capacitor are used for high voltage and frequency applications.

13.State Kirchoff current law?
The algebraic sum of currents at any node of a circuit is zero. The sum of incoming current is equal
to sum of outgoing current.

14.What are dependent sources?
When strength of voltage or current changes in the source for any change in the connected network
they are called dependent sources.

15.List examples of voltage source?
The examples of voltage source are battery and generator.

16.List examples of current sources?
semiconductor devices like transistor and diode are treated as current sources.

17.state Kirchoff voltage law?
Kirchoff voltage law states that the algebraic sum of all branch voltages around any closed loop of a
network is zero at all instant of time.

18.State TheveninTheorem?
This theorem states that any linear network with output terminal AB can be replaced by a single
voltage source V in series with a single impedance.

19.How equivalent impedance is calculated in TheveninTheorem?
All independent voltage sources are short circuited and all independent current sources are open
circuited.

20.What is the limitation of Kirchoffs law?
It fails in distributed parameter network.

21.State Nortons theorem?
This theorem states that any linear bilateral network with active network with output terminals AB
Can be replaced by a single current source in parallel with a single impedance Z..

22.Is the theorem applicable to ac sources?
No it is applicable to dc circuits with and without controlled sources.

23.Define Norton equivalent circuit?
The Norton equivalent circuit is a current generator which is placed in parallel to internal resistance.

24.State Superposition theorem?
If a number of voltages or current sources are acting simultaneously in a linear network the resultant
current in any branch is the algebraic sum of current that would be produced in it when each source acts alone replacing all other independent sources by their internal resistances.

25.Sate Maximum power transfer theorem?
A resistance load being connected to a dc network receives maximum power when load resistance is
equal to internal resistance.

26.What is the efficiency during maximum power transfer?
50%.

27.Define branch?
It is a part of a network which lies between two junction points.

28.Define active and passive network?
The network which has no current or voltage source is called passive network.
The network which either has current or voltage source is called active network.

29.State Ohm’s Law?
The current through any conductor is directly proportional to the applied potential difference across it
keeping physical condition unchanged.

30.Define unilateral circuit?
A10 The circuit whose properties are not same in either direction is known as unilateral circuit.

31.Define filter?
A filter is an electrical network that can transmit signals within a specified frequency range.

32.List the characteristics of filter?
An ideal filter would transmit signals under the passband frequencies without attenuation and
completely suppress the signal with attenuation band of frequencies with a sharp cutt off profile.

33.Define characteristics impedance?
The characteristics impedance of a filter matches with circuit to which it is connected throughout the
pass band.

34.What is the unit of attenuation?
The unit is decibel and neper.

35.What are the application of filter?
the Filter is used in voice frequency telegraphy,multi channel communication, TV broadcasting and telephony.

36.Define active filter?
The active filter contains components like operational amplifier that introduce some gain in the signal.

37.List advantges of active filter over passive filter?
Active filter eliminate bulky components.It offer gain.It can drive low impedance loads.It is easy to
tune.

38.List the disadvantages of constant K filters?
The attenuation does not increase rapidly beyond cutt off frequency.
characteristics impedance varies widely in the pass band from desired value.

39.Define cuttoff frequency?
The frequency that seperates the pass and attenuation band is known as cutt off frequency.

40. How a band pass filter is constructed?
This filter is a combination of two parallel tuned circuit.This is a special type of LC filter alongwith a
particular BW frequency to be allowed through it. 

Hired Operating System Viva Questions And Answers

common Operating Systems VIVA Questions and Answers:




1.What is an operating system?
An operating system is a program that acts as an intermediary between the user and the computer hardware. The purpose of an OS is to provide a convenient environment in which user can execute programs in a convenient and efficient manner.It is a resource allocator responsible for allocating system resources and a control program which controls the operation of the computer h/w.

2.What are the various components of a computer system?
1. The hardware
2. The operating system
3. The application programs
4. The users.

3.What is purpose of different operating systems?
The machine Purpose Workstation individual usability &Resources utilization Mainframe Optimize utilization of hardware PC Support complex games, business application Hand held PCs Easy interface & min. power consumption

4.What are the different operating systems?
1. Batched operating systems
2. Multi-programmed operating systems
3. timesharing operating systems
4. Distributed operating systems
5. Real-time operating systems

6.What is a boot-strap program?
Bootstrapping is a technique by which a simple computer program activates a more complicated system of programs. It comes from an old expression "to pull oneself up by one's bootstraps."

7.What is BIOS?
A BIOS is software that is put on computers. This allows the user to configure the input and output of a computer. A BIOS is also known as firmware.

8.Explain the concept of the batched operating systems?
In batched operating system the users gives their jobs to the operator who sorts the programs according to their requirements and executes them. This is time consuming but makes the CPU busy all the time.

9.Explain the concept of the multi-programmed operating systems?
A multi-programmed operating systems can execute a number of programs concurrently. The operating system fetches a group of programs from the job-pool in the secondary storage which contains all the programs to be executed, and places them in the main memory. This process is called job scheduling. Then it chooses a program from the ready queue and gives them to CPU to execute. When a executing program needs some I/O operation then the operating system fetches another program and hands it to the CPU for execution, thus keeping the CPU busy all the time.

10.Explain the concept of the time sharing operating systems?
It is a logical extension of the multi-programmed OS where user can interact with the program. The CPU executes multiple jobs by switching among them, but the switches occur so frequently that the user feels as if the operating system is running only his program.

11.Explain the concept of the multi-processor systems or parallel systems?
They contain a no. of processors to increase the speed of execution, and reliability, and economy. They are of two types:
1. Symmetric multiprocessing
2. Asymmetric multiprocessing
In Symmetric multi processing each processor run an identical copy of the OS, and these copies communicate with each other as and when needed.But in Asymmetric multiprocessing each processor is assigned a specific task.

12.Explain the concept of the Distributed systems?
Distributed systems work in a network. They can share the network resources,communicate with each other

13.Explain the concept of Real-time operating systems?
A real time operating system is used when rigid time requirement have been placed on the operation of a processor or the flow of the data; thus, it is often used as a control device in a dedicated application. Here the sensors bring data to the computer. The computer must analyze the data and possibly adjust controls to
modify the sensor input.
They are of two types:
1. Hard real time OS
2. Soft real time OS
Hard-real-time OS has well-defined fixed time constraints. But soft real time operating systems have less stringent timing constraints.

14.Define MULTICS?
MULTICS (Multiplexed information and computing services) operating system was developed from 1965-1970 at Massachusetts institute of technology as a computing utility. Many of the ideas used in MULTICS were subsequently used in UNIX.

15.What is SCSI?
Small computer systems interface.

16.What is a sector?
Smallest addressable portion of a disk.

17.What is cache-coherency?
In a multiprocessor system there exist several caches each may containing a copy of same variable A. Then a change in one cache should immediately be reflected in all other caches this process of maintaining the same value of a data in all the caches s called cache-coherency.

18.What are residence monitors?
Early operating systems were called residence monitors.

19.What is dual-mode operation?
In order to protect the operating systems and the system programs from the malfunctioning programs the two mode operations were evolved:
1. System mode.
2. User mode.
Here the user programs cannot directly interact with the system resources, instead they request the operating system which checks the request and does the required task for the user programs-DOS was written for / intel 8088 and has no dual-mode. Pentium provides dual-mode operation.

20.What are the operating system components?
1. Process management
2. Main memory management
3. File management
4. I/O system management
5. Secondary storage management
6. Networking
7. Protection system
8. Command interpreter system

21.What are operating system services?
1. Program execution
2. I/O operations
3. File system manipulation
4. Communication
5. Error detection
6. Resource allocation
7. Accounting
8. Protection

22.What are system calls?
System calls provide the interface between a process and the operating system. System calls for modern Microsoft windows platforms are part of the win32 API, which is available for all the compilers written for Microsoft windows.

23.What is a layered approach and what is its advantage?
Layered approach is a step towards modularizing of the system, in which the operating system is broken up into a number of layers (or levels), each built on top of lower layer. The bottom layer is the hard ware and the top most is the user interface.The main advantage of the layered approach is modularity. The layers are
selected such that each uses the functions (operations) and services of only lower layer. This approach simplifies the debugging and system verification.

24.What is micro kernel approach and site its advantages?
Micro kernel approach is a step towards modularizing the operating system where all nonessential components from the kernel are removed and implemented as system and user level program, making the kernel smaller.The benefits of the micro kernel approach include the ease of extending the operating system. All new services are added to the user space and consequently do not require modification of the kernel. And as kernel is smaller it is easier to upgrade it. Also this approach provides more security and reliability since most services are running as user processes rather than kernel’s keeping the kernel intact.

25.What are a virtual machines and site their advantages?

It is the concept by which an operating system can create an illusion that a process has its own processor with its own (virtual) memory.
The operating system implements virtual machine concept by using CPU scheduling and virtual memory.

1. The basic advantage is it provides robust level of security as each virtual machine is isolated from all other VM. Hence the system resources are completely protected.
2. Another advantage is that system development can be done without disrupting normal operation. System programmers are given their own virtual machine, and as system development is done on the virtual machine instead of on the actual
physical machine.
3. Another advantage of the virtual machine is it solves the compatibility problem.
EX: Java supplied by Sun micro system provides a specification for java virtual machine.

26.What is a process?
A program in execution is called a process. Or it may also be called a unit of work. A process needs some system resources as CPU time, memory, files, and i/o devices to accomplish the task. Each process is represented in the operating system by a process control block or task control block (PCB).Processes are of two types:
1. Operating system processes
2. User processes

27.What are the states of a process?
1. New
2. Running
3. Waiting
4. Ready
5. Terminated

28.What are various scheduling queues?
1. Job queue
2. Ready queue
3. Device queue

29.What is a job queue?
When a process enters the system it is placed in the job queue.

30.What is a ready queue?
The processes that are residing in the main memory and are ready and waiting to execute are kept on a list called the ready queue.

31.What is a device queue?
A list of processes waiting for a particular I/O device is called device queue.

32.What is a long term scheduler & short term schedulers?
Long term schedulers are the job schedulers that select processes from the job queue and load them into memory for execution. The short term schedulers are the CPU schedulers that select a process form the ready queue and allocate the CPU to one of them.

33.What is context switching?
Transferring the control from one process to other process requires saving the state of the old process and loading the saved state for new process. This task is known as context switching.

34.What are the disadvantages of context switching?
Time taken for switching from one process to other is pure over head. Because the system does no useful work while switching. So one of the solutions is to go for threading when ever possible.

35.What are co-operating processes?
The processes which share system resources as data among each other. Also the processes can communicate with each other via interprocess communication facility generally used in distributed systems. The best example is chat program used on the www.

36.What is a thread?
A thread is a program line under execution. Thread sometimes called a light-weight process, is a basic unit of CPU utilization; it comprises a thread id, a program counter, a register set, and a stack.

37.What are the benefits of multithreaded programming?
1. Responsiveness (needn’t to wait for a lengthy process)
2. Resources sharing
3. Economy (Context switching between threads is easy)
4. Utilization of multiprocessor architectures (perfect utilization of the multiple processors).

38.What are types of threads?
1. User thread
2. Kernel thread
User threads are easy to create and use but the disadvantage is that if they perform a blocking system calls the kernel is engaged completely to the single user thread blocking other processes. They are created in user space.Kernel threads are supported directly by the operating system. They are slower to create and manage. Most of the OS like Windows NT, Windows 2000, Solaris2, BeOS, and Tru64 Unix support kernel threading.

39.Which category the java thread do fall in?
Java threads are created and managed by the java virtual machine, they do not easily fall under the category of either user or kernel thread……

40.What are multithreading models?
Many OS provide both kernel threading and user threading. They are called multithreading models. They are of three types:
1. Many-to-one model (many user level thread and one kernel thread).
2. One-to-one model
3. Many-to –many
In the first model only one user can access the kernel thread by not allowing multi-processing. Example: Green threads of Solaris.The second model allows multiple threads to run on parallel processing systems. Creating user thread needs to create corresponding kernel thread (disadvantage).Example: Windows NT, Windows 2000, OS/2.The third model allows the user to create as many threads as necessary and the corresponding kernel threads can run in parallel on a multiprocessor.
Example: Solaris2, IRIX, HP-UX, and Tru64 Unix.

41.What is a P-thread?
P-thread refers to the POSIX standard (IEEE 1003.1c) defining an API for thread creation and synchronization. This is a specification for thread behavior, not an implementation. The windows OS have generally not supported the P-threads.

42.What are java threads?
Java is one of the small number of languages that support at the language level for the creation and management of threads. However, because threads are managed by the java virtual machine (JVM), not by a user-level library or kernel, it is difficult to classify Java threads as either user- or kernel-level.

43.What is process synchronization?
A situation, where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called race condition. To guard against the race condition we need to ensure that only one process at a time can be manipulating
the same data. The technique we use for this is called process synchronization.

44.What is critical section problem?
Critical section is the code segment of a process in which the process may be changing common variables, updating tables, writing a file and so on. Only one process is allowed to go into critical section at any given time (mutually exclusive).The critical section problem is to design a protocol that the processes can use to
co-operate. The three basic requirements of critical section are:
1. Mutual exclusion
2. Progress
3. bounded waiting
Bakery algorithm is one of the solutions to CS problem.

45.What is a semaphore?
It is a synchronization tool used to solve complex critical section problems. A semaphore is an integer variable that, apart from initialization, is accessed only through two standard atomic operations: Wait and Signal.

46.What is bounded-buffer problem?
Here we assume that a pool consists of n buffers, each capable of holding one item. The semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 1.The empty and full semaphores count the number of empty and full buffers, respectively. Empty is initialized to n, and full is initialized to 0.

47.What is readers-writers problem?
Here we divide the processes into two types:
1. Readers (Who want to retrieve the data only)
2. Writers (Who want to retrieve as well as manipulate)
We can provide permission to a number of readers to read same data at same time.But a writer must be exclusively allowed to access. There are two solutions to this problem:
1. No reader will be kept waiting unless a writer has already obtained permission to use the shared object. In other words, no reader should wait for other readers to complete simply because a writer is waiting.
2. Once a writer is ready, that writer performs its write as soon as possible. In other words, if a writer is waiting to access the object, no new may start reading.

48.What is dining philosophers’ problem?
Consider 5 philosophers who spend their lives thinking and eating. The philosophers share a common circular table surrounded by 5 chairs, each belonging to one philosopher. In the center of the table is a bowl of rice, and the table is laid with five single chop sticks. When a philosopher thinks, she doesn’t interact with her colleagues.
From time to time, a philosopher gets hungry and tries to pick up two chop sticks that are closest to her .A philosopher may pick up only one chop stick at a time. Obviously she can’t pick the stick in some others hand. When a hungry philosopher has both her chopsticks at the same time, she eats without releasing her chopsticks. When she is finished eating, she puts down both of her chopsticks and start thinking again.

49.What is a deadlock?
Suppose a process request resources; if the resources are not available at that time the process enters into a wait state. A waiting process may never again change state, because the resources they have requested are held by some other waiting processes. This situation is called deadlock.

50.What are necessary conditions for dead lock?
1. Mutual exclusion (where at least one resource is non-sharable)
2. Hold and wait (where a process hold one resource and waits for other resource)
3. No preemption (where the resources can’t be preempted)
4. circular wait (where p[i] is waiting for p[j] to release a resource. i= 1,2,…n
j=if (i!=n) then i+1
else 1 )

11 Top Control Systems Lab Viva Questions And Answers

Common Control Systems Comprehensive Viva Questions with Answers:




1.What is Order of the system?
Order of the system is defined as the order of the differential equation governing the system. Order of the system can be determined from the transfer function of the system. Also the order of the system helps in understanding the number of poles of the transfer function. For nth order system for a particular transfer function contains 'n' number of poles.

2.What is Time response of the control system?
Time response of the control system is defined as the output of the closed loop system as a function of time. Time response of the system can be obtained by solving the differential equations governing the system or time response of the system can also be obtained by transfer function of the system.

3.How Time response of the system is divided?
Answer:Time response of the system consists of two parts: 1.Transient state response 2. Steady state response. Transient response of the system explains about the response of the system when the input changes from one state to the other. Steady state response of the system shows the response as the time t, approaches infinity

4.What are Test signals and their significance?
The knowledge of the input signal is required to predict the response of the system. In most of the systems input signals are not known ahead of the time and it is also difficult to express the input signals mathematically by simple equations. In such cases determining the performance of the system is not possible.Test signals helps in predicting the performance of the system as the input signals which we give are known hence we can see the output response of the system for a given input and can understand the behavior of the control system. The commonly used test signals are impulse, ramp, step signals and sinusoidal signals.

5.What is Pole of the system?
Pole of a function F(s) is the value at which the function F(s) becomes infinite, where F(s) is a function of the complex variable s.

6.What is Zero of the system?
Zero of a function F(s) is a value at which the function F(s) becomes zero, where F(s) is a function of complex variable s.

7.Electrical Question: What is Signal Flow Graph? 
A Signal Flow Graph is a diagram that represents a set of simultaneous linear algebraic equations. By taking Laplace transform the time domain differential equations governing a control system can be transferred to a set of algebraic equations in s-domain. The signal Flow graph of the system can be constructed using these equations.

8.Electrical Question: What is S-domain and its significance?
By taking Laplace transform for  differential equation in the time domain equations in S-domain can be obtained.    L{F(t)}=F(s)
S domain is used for solving the time domain differential equations easily by applying the Laplace for the differential equations.

9.Electrical Question: What are the basic properties of Signal Flow Graph?
The basic properties of the signal flow graph are:
Signal Flow Graphs are applicable to linear systems
It consists of nodes and branches. A node is a point representing a variable or signal. A branch indicates the functional dependence of one signal on another
A node adds the signals of all incoming branches and transmits this sum to all outgoing branches
Signals travel along branches only in a marked direction and is multiplied by the gain of the branch
The algebraic equations must be in the form of cause and effect relationship


10.Electrical Question: What is mathematical model of a control system?
Control system is a collection of physical elements connected together to serve an objective. The output and input relations of various physical system are governed by differential equations. Mathematical model of a control system constitutes set of differential equations. The response of the output of the system can be studied by solving the differential equations for various input conditions.

11.Electrical Question: Explain Mechanical Translational System?
Model of mechanical translational system can be obtained by using three basic elements Mass, Spring and Dash-pot.
Weight the mechanical system is represented by mass and is assumed to be concentrated at the center of body
The elastic deformation of the body can be represented by the spring
Friction existing in a mechanical system can be represented by dash-pot.

Saturday, 20 April 2019

Top Most 75 CAO LAB VIVA Questions And Answers pdf

Frequently Asked Computer Architecture and Organization VIVA Questions And Answers:



1. What are the types of computer?
Personal computer, notebook computer, workstations, enterprise or mainframes.

2. What are the functional units of a computer?
Input unit, memory unit, arithmetic and logic unit, output unit and control unit.

3. What is a program?
A list of instructions that performs a task is called a program. Usually the program is stored in memory.

4. What is object program?
Compiling a high-level language source program in to a list of machine instructions constituting a machine language program is called an object program. It is the assembled machine language program.

5. What do you mean by bits?
Each number, character, or instruction is encoded as a string of binary digits called as bits, each having one of two possible values, 0 or 1.

6. Define RAM.
Memory in which any location can be reached in a short fixed time after specifying its address is called random-access memory (RAM).

7. Define word length.
The number of bits in each word is often referred to as the word length of the computer. Typical word lengths range from 16 to 64 bits.

8. Define memory access time?
The time required to access one word is called as memory access time. This time is fixed and independent of the location of the word being accessed. It typically ranges from a few nanoseconds (ns) to about 100 ns for modern RAM units.

9. What is memory hierarchy?
The memory of a computer is normally implemented as a memory hierarchy of three or four levels of semiconductor RAM units with different speeds and sizes. The small, fast RAM units are called caches. The large and slowest unit is referred to as main memory.

10. What is primary storage and secondary storage?
Primary memory is a fast memory that operates at electronic speeds. It is expensive. Secondary memory is used when large amounts of data and many programs have to be stored, particularly for information that is accessed infrequently.

11. What are registers?
Registers are high speed storage elements. Each register can store one word of data. Access time to registers is faster than access time to the fastest cache memory.

12. What are timing signals?
Timing signals are generated by the control circuits. These are signals that determine when a given action should take place. Data transfers between the processor and memory are also controlled by the control unit through the timing signals.

13. Explain briefly the operation of Add LOCA, R0.
This instruction adds the operand at memory location LOCA to the operand in a register in the processor, R0, and places the sum in to register R0. The original contents of location LOCA are preserved, whereas those of R0 are overwritten.

14. What is instruction register?
The instruction register (IR) holds the instruction that is currently being executed. Its output is available to the control circuits which generate the timing signals that control the various processing elements involved in executing the instruction.

15. What is program counter?
The program counter (PC) keeps track of the execution of a program. It contains the memory address of the next instruction to be fetched and executed.

16. What is MAR and MDR?
The memory address register (MAR) holds the address of the location to be accessed. The memory data register (MDR) contains the data to be written into or read out of the addressed location.

17. What is an interrupt?
An interrupt is a request from an I/O device for service by the processor. The processor provides the requested service by executing an appropriate interrupt-service routine.

18. Define bus.
A group of lines that serves as a connecting path for several devices is called a bus. In addition to the lines that carry data, the bus must have lines for address and control purposes.

19. What is a compiler?
It is a system software program that translates the high-level language program into a suitable machine language program.

20. What is a text editor?
It is a system program used for entering and editing application programs.

21. What is a file?
A file is simply a sequence of alphanumeric characters or binary data that is stored in memory or in secondary storage. A file can be referred by a name chosen by the user.

22. Define OS.
Operating system (OS) is a large program, or a collection of routines, that is used to control the sharing of and interaction among various computer units as they execute application programs.

23. What is multiprogramming or multitasking?
The operating system manages the concurrent execution of several application programs to make the best possible use of computer resources. This pattern of concurrent execution is called multiprogramming or multitasking.

24. What is elapsed time?
It is a measure of performance of the entire computer system. It is affected by the speed of the processor, the disk and the printer.

25. What is processor time?
The sum of the periods during which the processor is active is called the processor time.

26. What are clock and clock cycles?
The timing signals that control the processor circuits are called as clocks. The clock defines regular time intervals called clock cycles.

27. Give the basic performance equation.
T = (N * S)/R
Where, T – performance parameter
N – actual number of instruction executions
S – average number of basic steps needed to execute one machine instruction
R – clock rate in cycles per second.

28. What is pipelining?
The technique of overlapping the execution of successive instruction for substantial improvement in performance is called pipelining.

29. What is superscalar execution?
In this type of execution, multiple functional units are used to create parallel paths through which different instructions can be executed in parallel. so it is possible to start the execution of several instructions in every clock cycle. This mode of operation is called superscalar execution.

30. What is RISC and CISC?
The processors with simple instructions are called as Reduced Instruction Set Computers(RISC). The processors with more complex instructions are called as Complex Instruction Set Computers (CISC).

31. Define SPEC rating.
Running time on the reference computer
SPEC rating = Running time on the computer under test

32. Define byte addressable memory.
Byte locations have addresses 0,1,2….Thus if the word length of the machine is 32 bits, successive words are located at addresses 0,4,8….with each word consisting of 4 bytes. This is called byte addressable memory.

33. What is big-endian and little-endian?
The name big-endian is used when lower byte addresses are used for the more significant bytes (the leftmost bytes) of the word. The name little-endian is used when lower byte addresses are used for the less significant bytes (the rightmost bytes) of the word.

34. What is aligned address?
Words are said to be aligned in memory if they begin at a byte address that is a multiple of the number of bytes in a word.

35. Explain briefly the operation of ‘load’.
The load operation transfers a copy of the contents of a specific memory location to the processor. The memory contents remain unchanged. To start a load operation, the processor sends the address of the
desired location to the memory and requests that its contents be read. The memory reads the data stored at that address and sends them to the processor.

36. Explain briefly the operation of ‘store’.
The store operation transfers an item of information from the processor to a specific memory location, destroying the former contents of that location. The processor sends the address of the desired location to the memory, together with the data to be written into that memory location.

37. What is register transfer notation?
R3 <- [R1] + [R2]
This type of notation is known as register transfer instruction (RTN). The right-hand side of an RTN expression always denotes a value, and the left-hand side is the name of a location where the value is to be placed, overwriting the old contents of that location.

38. What is a one address instruction?
The instruction that contains the memory address of only one operand is called one address instruction.
Eg. Load A, Store A.

39. What is a two address instruction?
The instruction that contains the memory address of two operands is called two byte address instruction.
Eg. Add A,B , Move B,C.

40. What is a three address instruction?
The instruction that contains the memory address of three operands is called three byte address instruction.
Eg. Add A,B,C.

41. What is a zero address instruction?
Instructions in which the locations of all operands are defined implicitly is called zero address instruction. Such instructions are found in machines that store operands in a structure called push down stack.

42. What is straight line sequencing?
To begin executing a program, the address of its first instruction must be placed into PC. Then the processor control circuits use the information in the PC to fetch and execute instructions, one at a time, in the order of increasing addresses. This is called straight line sequencing.

43. Define conditional branch.
A conditional branch instruction causes a branch only if a specified condition is satisfied. If the condition is not satisfied, the PC is incremented in the normal way and next instruction in the sequential address is
fetched and executed.

44. Define conditional code flags.
The processor keeps track of information about the results of various operations for use by subsequent conditional branch instructions. This is done by recording the required information in individual bits called as conditional code flags.

45. Define conditional code register (OR) status register.
The conditional code flags are usually grouped together in a special processor register called conditional code registers or status registers.

46. What are the four commonly used flags?
N (negative) – set to 1 if the result is negative; otherwise, cleared to 0
Z (zero)- set to 1 if the result is 0; otherwise, cleared to 0
V (overflow) – set to 1 if arithmetic overflow occurs; otherwise, cleared to 0
C (carry)- set to 1 if the carry-out results from the operation; otherwise, cleared to 0

47. What is addressing modes?
The different ways in which the location of a operand is specified in an instruction is referred to as addressing modes.

48. What are the various addressing modes?
Register mode, absolute mode, immediate mode, indirect mode, index mode, relative mode, auto increment mode, auto decrement mode.

49. Define register mode addressing.
In register mode addressing the operand is the contents of a process register. The name of the register is given in the instruction.

50. Define absolute mode addressing.
In absolute mode addressing the operand is in a memory location. The address of this location is given explicitly in the instruction. This is also called direct mode addressing.

51. Define immediate mode addressing.
In immediate mode addressing, the operand is given explicitly in the instruction.
Eg. Move #200,R0.

52. Define indirect mode addressing.
In indirect mode addressing the effective address of the operands is the content of a register or memory location whose address appears in the instruction.
Eg: Add (R2),R0.

53. What is a pointer?
The register or memory location that contains the address of an operand is called a pointer.
Eg: A= *B. Here B is a pointer variable.

54. Define index mode addressing.
In index mode addressing, the effective address of the operand is generated by adding a constant value to the register.
EA= X + [Ri].

55. Define relative mode addressing.
In relative mode addressing the effective address is determined by the index mode using the program counter in the place of the general purpose register Ri.

56. Define Auto increment mode.
In this mode the effective address of the operand is the contents of a register specified in the instruction. After accessing the operand, the contents of this register are automatically incremented to point to the next item in a list. It can be written as (Ri)+.

57. Define Auto decrement mode.
In this mode the contents of a register specified in the instruction are first automatically decremented and then used as the effective address of the operand. . It can be written as -(Ri).

58. What are mnemonics?
When writing programs for a specific computer, words such as Move, Add, Increment and Branch are replaced by acronyms such as MOV, ADD, INC and BR. This is called mnemonics.

59. What is an assembler?
Programs written in assembly language can be automatically translated in to a sequence of machine instructions by a program called an assembler.

60. What is a source program?
The user program in its original alphanumeric text format is called a source program.

61. What are assembler directives?
Consider the example SUM EQU 200. This statement does not denote an instruction that will be executed when the object program is run. This will not even appear in the object program. It simply informs the assembler that the name SUM should be replaced by the value 200 wherever it appears in
the program. Such statements are called assembler directives.

62. What is symbol table?
As the assembler scans through a source program, it keeps track of all names and the numeric values that correspond to them in a table called symbol table. Thus, when a name appears a second time, it is replaced with its value from the table.

63. What is a two pass assembler?
During the first pass of the assembler it creates a complete symbol table. At the end of this pass, all the names will be assigned numeric values. The assembler then goes through the source program second time and substitutes values for all names from the symbol table. Such an assembler is called a two-pass assembler.

64. What is a loader?
The assembler stores the object program on a magnetic disk. The object program must be loaded into the memory of the computer before it is executed. For this to happen, another utility program must already be loaded in the memory. This program is called a loader.

65. What is the use of debugger program?
The debugger program enables the user to stop execution of the object program at some points of interest and to examine the contents of various processor registers and memory locations.

66. What are device interface?
The buffer registers DATAIN and DATAOUT and the status flags SIN and SOUT are part of circuitry and they are commonly known as device interface.

67. Define memory mapped I/O.
Many computers use an arrangement called memory mapped I/O in which some memory address values are used to refer to peripheral device buffer registers, such as DATAIN and DATAOUT. This no special instructions are needed to access the contents of these registers.

68. What is a stack?
A stack is a list of data elements, usually words or bytes , with the accessing restriction that elements can be added or removed at one end of the list only. This end is called the top of the stack, and the other end is called the bottom of the stack.

69. Why is stack called as last-in-first-out?
Stack is called as last-in-first-out (LIFO), because the last data item placed on the stack is the first one removed when retrieval begins. The term push is used to describe placing a new item on the stack and pop is used to describe removing the top item from the stack.

70. What is a stack pointer?
Stack pointer (SP) is a processor register that is used to keep track of the address of the element of the stack that is at the top at any given time. It could be one of the general purpose registers or a register dedicated to this function.

71. What is a queue?
Queue is a data structure similar to the stack. Here new data are added at the back (high address end) and retrieved from the front (low address end) of the queue. Queue is also called as first-in-first-out (FIFO).