You are on page 1of 161

C&DS

UNIT 1

Define Algorithm and Flowchart ?


Ans. Describing the process step by step is called as Algorithm Representing the various steps of a process in the form of a diagram is called a

Flowchart What are auto variables and where are they stored ?
Ans. Main memory and CPU registers are the two memory locations where auto variables are stored. Auto variables are defined under auto storage class. They stored in main memory. Memory is allocated to an automatic variable when the block which contains it is called and it is deallocated at the completion of its block execution.

what is the difference between declaring a variable and defining a variable ?


Ans. Declaration of a variable in C hints the compiler about the type and size of the variable in compile time. No space is reserved in memory for any variable in case of declaration.

Example: int a;
Here variable 'a' is declared of data type 'int'

Defining a variable means declaring it and also allocating space to hold it.
We can say "Definition = Declaration + Space reservation

Example: int a = 10;


Here variable "a" is described as an int to the compiler and memory is allocated to

hold value 10

Explain about syntax Ternary operator ?


Ans. condition ? expression 1 : expression 2 If the condition is evaluated to true (1), only the second operand (expresion 1) is evaluated. Then the operator return the value of the expression 1 If the condtion is evaluated to false (0), only the third operand (expression 2) is evaluated. The value of the expression 2 is returned.

What is an Enumeration constant ?


Ans. Enumeration is a data type. We can create our own data type and define values that the variable can take. This can help in making program more readable. enum definition is similar to that of a structure

UNIT 2

What will be output when you will execute the following C code
#include<stdio.h> void main() { if(sizeof(void)) printf("M. Muralilidaran"); else printf("Harbhajan Singh"); } Ans. Compilation error. It illegal to find size of void data type using sizeof operator. Because size of void data type is meaning less.

What is an lvalue?

Ans. An lvalue is an expression to which a value can be assigned. The lvalue expression is located on the left side of an assignment statement, where as an rvalue is located on right side of an assignment statement.Each assignment statement must have an lvalue and an rvalue. The lvalue expression must reference a storable variable in memory. It cannot be a constant.

What are the differences between formal arguments and actual arguments of function?
Ans. Argument: An argument is an expression which is passed to a function by its caller (or macro by its invoker) in order for the function(or macro) to perform its task

Actual argument: The arguments that are passed in a function call are called
actual arguments. These arguments are defined in the calling function.

Formal arguments: The formal arguments are the parameters/arguments in a


function declaration. The scope of formal arguments is local to the functionlocal definition in which they are used. Formal arguments belong to the called function.

What are most commonly used string handling functions ?


Ans. following are most commonly used string handling functions strcat () -concatenates two strings compares two strings copies one string over another finds the length of a string

strcmp () -strcpy () strlen () ---

What information does function prototype carry ? give an example?


Ans. Function prototype tells compiler about the number and type of arguments required by the function, the type of the return value (void if there is no

return value) and the name of the function. e.g int myfunction (int a, char c);

What is recursion?
Ans. when a called function in turn calls another function a process of chaining occurs.Recursion is a special case of this process, where a function calls itself.

UNIT 3

What is a pointer?
Ans. A pointer is a special variable in C language meant just to store address of any other variable or function. Pointer variables unlike ordinary variables cannot be operated with all the arithmetic operations such as '*','%' operators. It follows a special arithmetic called as pointer arithmetic. A pointer is declared as: int *ap; int a = 5; In the above two statements an integer a was declared and initialized to 5. A pointer to an integer with name ap was declared.

Differentiate between a linker and linkage ?


Ans. A linker converts an object code into an executable code by linking together the necessary build in functions. The form and place of declaration where the variable is declared in a program determine the linkage of variable.

What is difference between null pointer and void pointer ?


Ans. NULL pointer means- it points to nothing whereas,void pointer refers to the fact that the pointer has no data type declared with it and it can be used to

point variable of any data-type-int,float,etc

What are differences between malloc() and calloc() ?


Ans. Allocation of memory at the time of execution is called dynamic memory allocation. It is done using the standard library functions malloc() and calloc() . It is defined in "stdlib.h".

Malloc(): used to allocate required number of bytes in memory at runtime. It


takes one argument, viz. size in bytes to be allocated. Syntax: void * malloc(size_t size);

Calloc(): used to allocate required number of bytes in memory at runtime. It


needs two arguments viz., 1. total number of data and 2. size of each data. Syntax: void * calloc(size_t nmemb, size_t size)

What is difference between far pointer and near pointer?


Ans. Compilers for PC compatibles use two types of pointers. near pointers are 16 bits long and can address a 64KB range. far pointers are 32 bits long and can address a 1MB range.

How to use realloc() to dynamically increase size of an already allocated array?


Ans. Realloc: This function is used to increase or decrease the size of any dynamic memory which is allocated using malloc() or calloc() functions. Syntax: void *realloc(void *ptr, size_t newsize);

UNIT 4

Define structure and union ?

Ans. Structure : Structure is user defined data type which is used to store
heterogeneous data under unique name. Keyword 'struct' is used to declare structure.The variables which are declared inside the structure are called as 'members of structure'.

Union : Union is user defined data type used to stored data under unique
variable name at single memory location. In structures, each member has its own storage location, whereas all the members of union use the same location. Union contains many members of different types, it can handle only one member at a time.

what are the advantages of unions?


Ans: Union is a collection of data items of different data types. It can hold data of only one member at a time though it has members of different data types. If a union has two members of different data types, they are allocated the same memory. The memory allocated is equal to maximum size of the members. The data is interpreted in bytes depending on which member is being accessed.

What are bit fields? What is the use of bit fields in structure declaration?
Ans. C allow integer members to be stored in to memory spaces smaller than compiler would ordinarily allow.These space saving structure members are called bit fields, and their width in bits can be explicitly declared.

What is preprocessor ?
Ans. Preprocessor directives (such as #define) give the preprocessor specific instructions on how to modify your source code. The preprocessor reads in all of your include files and the source code you are compiling and creates a preprocessed version of your source code.

What is dangling pointer ?


Ans. If any pointer is pointing the memory address of any variable but after some variable has deleted from that memory location while pointer is still pointing such memory location.

UNIT-5
What is Stream? Ans.Stream is a Sequence of data bytes, which is used to read and write data to a file. The streams that represent the input data of a program are known as Input Streams, where as the streams that represent the output data of a program are known as Output Streams. What is meant by Error Handling?

Ans.While operating on files, there may be a chance of having certain errors which will cause abnormal behavior in our programs.

Types of Files ? 1. Text file : It can be thought of as a stream of characters that can be processed sequentially and in forward direction only.

2. Binary file : It is collection of bytes like images. 3. Sequential File: Data stored sequentially, to read the last record of the file, we need to traverse all the previous records before it. Ex: files on magnetic tapes. 4. Random Access File: Data can be accessed and modified randomly. We can read any record directly. Ex : files on disks.

Mention some of the File Input / Output Functions? Ans. fopen(fp, mode) : Open existing file / Create new file fprintf( ): Writes all types of data values to the file. fwrite():Writes block of structured data to the file. fflush():Clears buffer of input stream and writes buffer of output stream.

Mention File Management Functions? Ans.rename(old-filename",new-filename"); -- It renames the file with the new name remove(filename") -- It removes the file specified (macro) unlink(filename"); -- It also removes the file name fcloseall(); -- Closes all the opened streams in the program except standard streams

UNIT-6
What is binary search? Ans: Search a sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise narrow it to the upper half. Repeatedly check until the value is found or the interval is empty. What is sorting? Ans: Sorting means rearranging a given list of elements in an orderly manner.

Briefly explain Bubble sort. Ans: This method takes two elements at a time. It compares these two elements. If the first element is less than the second element, then they are left undisturbed. If the first element is greater than the second element, they are swapped. This procedure continues with the next two elements, goes on and ends when all the elements are sorted. order of bubble sort is O (n2)

Briefly explain Selection sort. Ans: In this, the first element in the list is selected. It is compared repeatedly with all the elements. If any element is found to be lesser than the selected element, these two are swapped. This procedure is repeated till the entire array is sorted.

Best case performance of selection sort is O(n2)

What is merge sort? Ans: The merge sort technique sorts a given set if values by combining two sorted arrays into one larger sorted array.

UNIT-7
What is a Data structure? Ans: Data structure is a collection of organized data that are related to each other. Data structures can be classified into two types: 1. Linear data structure. 2. Non linear data structure.

What is a priority queue? Ans: 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)

What are the disadvantages of representing a stack or queue by a linked list? Ans: 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.

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

What is singly linked list and doubly linked list? Ans: The singly-linked list is the most basic of all the linked data structures. A singly-linked list is simply a sequence of dynamically allocated objects, each of which refers to its successor in the list.

A doubly linked list, also known as two-way linked list, consists of data as well as links to the next item, as well as the previous item.

UNIT-8
What is complete Binary tree? Ans: 1. A complete Binary tree is a binary tree in which all the leaf nodes be on level n or n-1 2. Every node on level 1 to n-1 should have exactly two children. 3. A right child should not be added before adding left child.

Traversals of Tree

Traversals of Tree In Order Traversal ( Left Origin Right ): 2 3 4 6 7 9 13 15 17 18 20 Pre Order Traversal ( Origin Left Right ) : 15 6 3 2 4 7 13 9 18 17 20 Post Order Traversal ( Left Right Origin ) : 2 4 3 9 13 7 6 17 20 18 15

Representation of binary tree.

Sequential Representation : -- Tree Nodes are stored in a linear data structure like array. -- Root node is stored at index 0 -- If a node is at a location i, then its left child is located at 2 * i + 1 and right child is located at 2 * i + 2 -- This storage is efficient when it is a complete binary tree, because a lot of memory is wasted What is a spanning Tree? Ans: 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 i) V is set of elements called nodes or vertices. ii) E is set of edges, identified with a unique pair ( v1, v2 ) of nodes. Here ( v1, v2 ) pair denotes that there is an edge from node v1 to node v2

Graphs?

Ans:A Tree is in fact a special type of graph. Graph is a data structure having a group of nodes connecting with cyclic paths. A Graph contains two finite sets, one is set of nodes is called vertices and other is set of edges. A Graph is defined as G = ( V, E ).

Java viva bits


Unit 1: Object oriented thinking 1) What is the main difference between java and C language? A) Java is purely object oriented language where as C is a structure oriented language 2) What is the other name for main? A) main is also called as Control flow, order of flow of execution 3) Java's 1st version does not have support for? A) Database programming 4) Name the technology which is implemented before java by sun micro systems A) oak 5) Runtime errors are also called as? A) Logical errors 6) What are the three OOP principles? A) They are encapsulation, inheritance and polymorphism.

Unit 2: Java Basics 7) What are the buzz words in java? A) Simple, robust, object oriented, multiheaded, Architectural neutral, interpreted and high performance, distributed and dynamic 8) Explain about finalize()?

A) It is a method always executed by the garbage collector, just before destroying any object to perform cleanup activities 9) Can we implement data structures in java? If so how? A) Yes, we can implement data structure in java with the help of the interface, collections. 10) What is the syntax for creating an object in java? A) Classname object=new Classname() 11) Explain about the key words: public static void main(String args[]) A) Public: to call the main method from anywhere by JVM Static: without creating an object JVM has to call the main method void: main method returns nothing main: this is the only method configure in JVM Stringargs []: values of any type are accepted 12) What is meant by type casting? A) Assigning primitive data types to each other is known as type casting. There are two types of type casting they are: implicit type casting, explicit type casting Implicit type casting: assigning lesser memory data types to higher memory data types Explicit type casting: assigning data types of higher memory to data types of lower memory

Unit 3: Inheritance 13) Explain about inheritance?

A) Getting the members of the class from another class. This leads to code reusability and extensibility 14) Explain about polymorphism? A) Expressing different behaviours at different situations by a single object is called polymorphism 15) Explain about final()? A) It is a modifier applicable for various classes, methods and also to the variables. If a variable is declared a final we cannot reassign that variable as it becomes constant, we cannot inherit the class which is declared as final. We cannot override a method if it is declared a final 16) In java multi dimensional arrays are implemented as? A) Array of arrays

17) What is the main advantage of array of arrays? A) Effective memory utilization 18) Once we created an array all its elements will initialised with zeros are default values? A) Default values 19) How can we pass command line arguments by using java program? a) With the help of string args[]

Unit 4: Packages and Interfaces 20) What is an interface?

A) A completely incomplete class can be called as an interface. A pure abstract class can also be called as an interface. In an interface by default all the methods are public and abstract. 21) Explain about abstract methods? A) A method only with prototype. An incomplete method. A method without a functionality 22) What is an abstract class? A) A class which contains abstract methods is known as abstract class. An abstract class contains both abstract methods and normal methods 23) Explain about static members? A) These members do not belong to any object memory, but objects can share these members. These members can be accessed by using class name, static member name. 24) What is a package? A) Packages are the containers for classes. A package is both a naming and a visibility control mechanism. 25) What is the general form of a package? A) package packagename;

Unit 5: Exception handling and multithreading 26) What are the 3 steps of exception handling in java? A) The three main steps are: 1. Try: it is used for checking the condition 2. Catch: if any exception arises it will handle the exception

3. Finally: it will be executed irrespective of the try catch block 27) What is the name of exception if we try to insert more elements than the actual size? A) Arrayindexoutofrange exception 28) What is an exception? A) Exception: these are mostly caused by our program and are recoverable 29) What is an error? A) These are not caused by our program and these are due to lack of system resources these are non recoverable 30) List the 3 types of cursors available in java? A) enumeration itterato listitterator 31) What is a thread in java? A) When a java program starts up one thread begins running immediately, this is usually called as the main thread of your program 32) What is a method used for suspending a thread in java for a period of time A) sleep() 33) Explain about synchronization? A) When one or more threads try to access the same resources ,they need some way to ensure that the resource will be used by one thread at a time this will be achieved by semaphores concept

Unit 6: Event Handling 34) What is an event? A) An event is an object that describes a state change in a source. 35) List and explain any 3 event classes A) MouseEvent: generated when the mouse is dragged, moved, clicked, pressed, released also generated when the mouse enters or exits a component KeyEvent: generates when the input is received from the keyboard WindowEvent: generated when a window is closed, activated, deactivated, opened or quit 36) What do you mean by adapter class? A) An adapter class provides an empty implementation of all methods in an event listener interface. 37) What is the method which is used to read data in string tokenize class and data input stream reader? A) nexttoken() for string tokenizer and read Line() for data input stream reader 38) How to display a file in java program? A) We can display it by using the class file input stream reader, and with the help of method read() 39) What is a component and container class? A) Component is an abstract class that encapsulates all of the attributes of a visual component. A container class is a subclass of Component.

Unit 7: Applets 40) What is an applet? A) Applets are small applications that are accessed on an internet server, transported over the internet, automatically installed and run as a part of web document. 41) What is the main package used for applet programming? A) import java.awt.* 42) What is the use of instanceof operator? A) It is used to know whether the object is a an exact instance of a particular class or not 43) What are the two different types of packages explain? A) They are user defined package and predefined package Userdefined packages are defined by the users and can be used exactly as built in packages. We can import them into other classes as well Predefined packages are defined they are not defined by the user they have built in methods 44) List the applet initialization steps? A) init(), start(), paint() 45) When an applet is terminated what are the sequence of steps followed? A) stop(),destroy()

46) What is the method used to set the background color in applets? A) setBackground(color.yellow) 47) If we want to print the current system's date and time ,what is the package we have to import? A) java.util.date

Unit 8: Networking 48) What do you mean internet address? A) Every computer on the internet has an address. It is a number that uniquely identifies each computer on the net. It is a 32 bit address organized as 4 bit values. 49) What is the use of InetAddress? A) The InetAddress class is used to encapsulate both the numerical IP address and the domain name for that address. 50) What is URL? A) The Uniform Resource Locator provides a reasonably intelligible form to uniquely identify or address information on the internet. 51) What is datagram? A) Datagrams are bundles of information passed between machines.

52) What is the difference between URI and URL? A) A URI class encapsulates a URL.URLs constitute a subset of URIs. A URI represents a standard way to identify a resource where as a URL describes how to access the resource. 53) Explain ServerSocket. A) The ServerSocket class is used to create servers that listen for either local or remote client programs to connect to them on published ports.

PRINCIPLES OF PROGRAMMING LANGUAGE VIVA QUESTIONS Unit- I


1. List various programming domains? A: scientific applications, business applications, artificial intelligence, systems programming, scripting languages. 2. What is abstraction?

A: Abstraction is ability to define and then use complicated structures or operations in ways that allow many of the details to be ignored. (or) Abstraction is a key concept in contemporary programming language design. 3. What is pure interpretation? A: programs are interpreted by the another program called as pure interpretation. 4. What is programming environment? A: It is the collection of tools used in the development of software. Eg: text editor,compileretc 5. What are macro and micro instructions? A: The processor is a collection of circuits those for arithmetic and logical operations .some of the instructions which are some times called as macro instructions and which are lower level of instructions called micro instructions. 6. List various compilation process phases? A: source program,lexical generator,computer . analyser,syntax analyser,optimization,code

Unit-II
1. what is grammar and derivation? A: A grammar is a generative device for defining languages . A sentence generation is called derivation. 2. what is a parse tree? A: The hierarchical structures of the sentences of the language are called as parse trees. 3. what is ambiguity?

A: A grammar that generates a sentential form for which there are two or more parse trees is said to be ambiguous. 4. what is lexeme and token? A: A token of a language is a category of its lexemes. The syntax of the programming languages do not include description of the lowest level syntactic units.this small units called as lexemes. 5. what is operator precedence? A: A property of an operator that is used to specify its order of evaluation relative to the other operators. 6. what is assertion? A: An assertion immediately preceding a program statement describes the constraints on the program variables at that point in the program. 7. Which programming language is widely to build Artificial Intelligence Applications? A: LISP

Unit-III
1. Define static scoping? A: The method of binding names to non local variables is called static scoping. 2. what is named constant? A: A named constant is a variable that is bound to a value only at the time it is bound to storage. 3. what is dangling pointer? A: Dangling pointer is a pointer that contains the address of a heap-dynamic variable that has been deallocated. 4. Define associative array? A: It is an unordered collection of data elements that are indexed by an equal number of values. 5. various operations on records in ADA? A: ADA allows record comparisons for equality and inequality. 6. what are different types of compatability? A: Name type compatability,structure type compatability

7. What does Operational Semantics describe?


A: Operational Semantics is to describe the meaning of a program by executing its statements on a machine ,either real or simulated.

UNIT-IV
1. What is short-circuit evaluation? A: A short-circuit evaluation of an expression is one in which result is determined without evaluating all the operands and/or operators. 2. What is operator overloading? A: Multiple use of an operator is called operator overloading and is generally thought to be acceptable, as long as readability and/or reliability do not suffer. 3. Define narrowing and widening conversions? A: A narrowing conversion converts a value to a type that cannot store even approximations of all of the values of the original type. A widening conversion converts a value to a type that can include at least approximations of all values of the original type. 4. What is a selection statement? A: A selection statement provides the means of choosing between two or more execution paths in a program. 5. What is a iteration construct? A: The iteration statement and the associated loop body together from an iteration construct. 6. What is a iterative statement? A: An Iterative statement is one that causes a statement or collection of statements to be executed zero,one or more times.

UNIT-V
1. What is a overloaded subprogram? A: An overloaded subprogram is a subprogram that has the same name as another subprogram in the same referencing environment. 2. What is a coroutine? A: A coroutine is a special subprogram that has multiple enteries and they can be used to provide interleaved execution of subprogram. 3. What are the three fundamental semantic models of parameter passing? A: i) in mode ii) out mode iii) inout mode 4. Default parameter passing method for C#? A: pass-by value 5. What is generic subprogram? A: A generic subprogram is one whose computation can be done on data of different types with different calls. 6. What is the purpose of polymorphic subprogram? A: A polymorphic subprogram takes parameters of different types on different activations.

UNIT VI
1. What is abstraction? A: An abstraction is a view or representation of an entity that includes only the attributes of significance in a particular context. 2. What are the two fundamental kinds of abstraction in contemporary programming? A: The two fundamental kinds of abstraction are process abstraction and data abstraction. 3. What is an object? A: An instance of an abstract data type is called an onject.

4. what are the possible abstract operations of the stack abstract data type? A: Create(stack)- creates and possibly initiates a stack object. Destroy(stack)- deallocates the storage for the stack. Empty(stack) - a predicate or Boolean function that rerturns true if the specified stack is empty and false if otherwise. Push(stack,element)- pushes the specified element on the specified stack. Pop(stack)- removes the top element from the specified stack. Top(stack)- returns a copy of the top element from the specified stack. 5. What is an assembly? A: An assembly is a collection of files that appears to application programs to be a single dynamic link library or an executable(EXE). 6. What is a dynamic link library? A: A dynamic link library(dll) is a collection of classes and methods that are individually linked to an executing program when needed.

UNIT VII

1. What are SIMD architechture computers? A: Computers that have multiple processors that execute the same instruction simultaneously each on different data are called SIMD(single instruction multiple data) architechture computers. 2. What is a task? A: A task is a unit of a program similar to a sub program that can be in concurrent execution with the other units of the same program.each task in a program can provide one thread of control.task are some times called processes. 3. what is a semaphore? A: A semaphore is a data structure consisting of an integer and a queue that stores task descriptors. 4. what is a task descriptor? A: A task descriptor is a data structure that stores all of the relevant information about the execution state of a task. 5. how are heavy weight tasks and light weight tasks executed? A: Heavy weight tasks execute in their own address space and light weight tasks all run in the same address space. 6. How is concurrency divided? A: Concurrency is naturally divided into two or more machine instructions

1. instructtion level(executing simultaneously).

2. statement level(executing two or more statements simultaneously). 3. unit level(executing two or more sub program units simultaneously). 4. program level(executing two or more programs simultaneously).

UNIT-VIII
1. Design of the functional languages is based on? A. Mathmatical functions 2. The basic functionality of an imperative language ? A. Operations are done and the results are stored in variables for later use. 3. The basic functionality of functional programming language? A. Variables are not necessary (no assignment) 4. Which is the first functional language? A. LISP 5. Lists are stored internally as? A. Single linked lists 6. Give any 2 features of Imperative languages? A. Efficient execution, complex syntax, concurrency is programme designed.

ADS UNIT-1

1)What is data structure? A data structure is a way of organizing data that considers not only the items stored,but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.

2)In which areas data structures are used extensively? Compiler Design, Operating System, Database Management System, Numerical Analysis, Graphics, Artificial Intelligence.

3)Access specifiers in C++:

Public, protected and private are three access specifiers in C++.

Public data members and member functions are accessible outside the class.

Protected data members and member functions are only available to derived classes.

Private data members and member functions cant be accessed outside the class.

4)Constructors: Constructors in C++ are special member functions of a class. They have the same name as the Class Name. There can be any number of overloaded constructors inside a class, provided they have a different set of parameters. Constructors are invoked first when a class is initialized. Used to initialize a member variable at the time of declaration 5)Destructors: Destructors in C++ also have the same name, except for the fact that they are preceded by a '~' operator. The destructors are called when the object of a class goes out of scope. It is not necessary to declare a constructor or a destructor inside a class. If not declared, the compiler will automatically create a default one for each.

6)What is meant by a Scope resolution operator? It is used to define member functions outside the class definition therefore making the class definition more readable. It is denoted by using the symbol ::.

7)What is a Friend function? A Friend function is a function which is given permission to access a class private and protected data. It is a non member function.

UNIT-2

1)What is Function overloading? In function overloading, the function is said to be overloaded when same name is given to different functions. However, the functions will differ at least in any one of the these. The number of parameters, the data type of parameters, the order of appearance these three together are referred to as the function signature. While overloading a function, the return types of the function need not differ. 1. Functions differ in function signature. 2. Return types of functions need not differ.

2)What are Function templates? C++ Function templates are those functions which can handle different data types without separate code for each of them. For a similar operation on several kinds of data types, a programmer need not write different versions by overloading a function. It is enough if he writes a C++ template based function. This will take care of all the data types.

3) What do you mean by inheritance? Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add refinements of its own.

4)What are the advantages of inheritance? It permits code reusability. Reusability saves time in program development.

5) What is a Derived class?

Class that inherits data members and member functions from a base class.

6) Extend is a keyword used to extend properties of Super class to Sub class.

UNIT-3

1)What is the data structure used to perform recursion? Stack.

2)What is the difference between Stack and Queue? Stack is a Last In First Out (LIFO) data structure. A stack is an abstract data type that permits insertion and deletion at only one end called the top. Queue is a First In First Out (FIFO) data structure. A queue is an abstract data type in which insertion occurs at one end (the rear) and deletion occurs at the other end (the front).

3)What is a Doubly linked list?

A linked list in which each node has 2 pointers: a forward pointer (a pointer to the next node in the list) and a backward pointer (a pointer to the node preceding the current node in the list) is called a doubly linked list.

4)What is a Circular linked list? A Circular linked list is a linked list where the last node in the list points to the first node in the list. A circular list does not contain NULL pointers.

5)What are the operations performed on Stack? The standard operations for a stack are: (a) insert an element on top of the stack (push), (b) remove the top element from the stack (pop), (c) determine if the stack is empty(is empty).

6)What are the Special names for Insertion and deletion operations in queues? Insertion is called "enqueue" and deletion is called "dequeue".

UNIT-4 1)What is a Dictionary? A dictionary is a collection of elements.Each element has a field called key (key, value) .Every key is usually distinct. 2)What are the Operations Performed on a Dictionary? Determine whether or not the dictionary is empty Determine the dictionary size (i.e., number of pairs) Insert a pair into the dictionary Search the pair with a specified key Delete the pair with a specified key.

3)Fastest Searching technique used to search a record is Hashing, and the function used in this is called as Hash function. 4)What are Collision Resolution Methods? These are used to avoid collisions in hashing.They are 1.Linear probing 2.Quadratic probing 3.Double hashing 5)Hashing provides expected performance of (1),and worst case performance of (n).

6)Hashing is used to Search,Insert and Delete elements.

UNIT-5 PRIORITY QUEUES

1. What is a Priority Queue and what operations can be performed on priority queues? Ans: A priority queue is a collection of zero or more elements. Each element has a priority or value. The operations performed on priority queues are i. ii. iii. Insert a new element Remove an element Find an element.

2. Minimum no.of queues needed to implement the priority queue?


Ans: Two. One queue is used for actual storing of data and another for storing priorities.

3. What is a Heap Data structure?


Ans: Heap is a binary tree with a property that parent node is largest or smallest of its subtree. It is balanced and almost complete binary tree.

4. What is the main application of Heap data Structure? Ans: Heap sort.

5. Time complexity of Heap sort to sort n elements? Ans: O(nlogn).

6. What is External sorting? Ans: external sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is needed when the data being sorted does not fit into the main memory of a computing device (usually RAM).

UNIT-6 SEARCH TREES (PART-1)

1. What is a balanced tree? Ans: A binary tree is balanced if the depth of two subtrees of every node never differs by more than one. 2. List out few of the Applications of tree data structure? Ans: i. The manipulation of the arithmetic expression ii. Symbol table construction iii. Syntax analysis 3. In tree construction which is the suitable data structure? Ans: Linked List 4. Which tree structure is efficient considering space and time complexities? Ans: Complete binary tree. 5. In an AVL tree, at what condition the balancing is to be done? Ans: if the pivotal value (or the Height factor) is greater than 1 or less than -1.

6. There are 8,15,13,14 nodes were there in 4 different trees. Which of them could have formed a full binary tree? Ans: 15 In general there are 2n-1 nodes in a full binary tree. 7. Difference between a complete binary tree and full binary tree? Ans: A full binary tree, or proper binary tree, is a tree in which every node has zero or two children. A complete binary tree is a full binary tree in which all leaves are at the same depth.

UNIT-7 SEARCH TREES (PART-2)

1. In RDBMS, what is the efficient data structure used in internal storage representation? Ans: 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.

2. What are red-black trees? Ans: A red black tree is a type of self-balancing binary search tree. Each node has a color attribute, the value of which is either red or black.

3. What are splay trees?

Ans: A splay tree is a self-balancing binary search tree. In this, recently accessed elements are quick to access again. It is used for implementing caches and garbage collection algs.

4. What is the time complexity of searching, insertion and deletion of an element in an AVL search tree with n elements? Ans: O (log n).

5. List the types of rotations used to balance an AVL tree? Ans: LL,LR,RL,RR.

6. What is a minimum spanning tree? Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes? Ans: A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized. No. Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesnt mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.

UNIT-8 Pattern matching and Tries

1. Define brute force algorithm and give two examples?

Ans: is a trivial but very general problem-solving technique that consists of systematically enumerating all possible candidates for the solution and checking whether each candidate satisfies the problem's statement. a. Ex: - i. selection sort ii. Deciding whether a number is prime or not.

2. Define boyer-moore algorithm and what are the best and worst time complexities of this algorithm? Ans: The goal of boyer-moore string-searching algorithm is to determine whether or not a match of a particular string exists within another (typically much longer) string. Best-case: m Worst-case: O (nm). Average case: O (n/m) N=text string length (input string) M=check string length. (Pattern or matching string).

3. What is a trie and what are the types of tries? Ans: A trie (from retrieval), is a multi-way tree structure useful for storing strings over an alphabet. Types: i. standard tries ii. iii. Compressed tries Suffix tries

4. What are the space and time complexities of a standard trie? Ans: space complexity: O (n) Time complexity: Search=insert=remove=O (dm). n=total size of the strings in S m=size of the string parameter of the operation d=alphabet size.

S=set of strings.

5. List the applications of pattern matching algorithms? Ans: i. ii. iii. iv. Parsers Spam filters Word processors Web search engines etc.

6. Which is the best algorithm among brute force algorithm and knuth-morris-pratt algorithm and why? Ans: knuth-morris-pratt, since it handles the mismatch of a patter better than brute force algorithm.

WT UNIT-I HTML COMMON TAGS 1) Define the term List. Give the different types of lists?
Ans: List refers to a record of short pieces of information arranged in specific format. Types are ordered lists and unordered lists. 2) What are the different types of image maps? Ans: i) Server side image maps ii) Client side image maps 3) What are forms? Ans: Usually forms are created by inserting <FORM></FORM> tags in HTML code. It carries two attributes ACTION and METHOD respectively which remains optional. 4) Give syntax for print an image at bottom of the page? Ans: <img src=sourceaddress.jpg ALIGN=bottom> 5) What are frames in HTML? Ans: The output screen of every html application is nothing but a frame. The region of the browser can be divided into multiple regions. 6) Define CSS and its types? What is the main purpose of the CSS? Ans: There are three types of CSS styles: Inline styles-Inline styles are styles that are written directly in the tag on the document. Embedded styles-Embedded styles are styles that are embedded in the head of the document. External styles-External styles are styles that are written in a separate document and then attached to various Web documents.

The purpose of CSS is to provide Web developers with a standard way to define, apply, and manage sets of style characteristics. CSS provides these capabilities through a technical model based on a hierarchical scope of effect, the separation of style from content, and a well-defined set of published standards

UNIT-II JAVA SCRIPT


1) What is Java Script and why we use Js? Ans: Java Script is a scripting and object based language. It is used for manipulating the content of Html web page dynamically which means add interaction with the web page. 2) How can we use Javascript? Ans: We can embedded js into html page by using <script> tag in two ways. One , by using dynamically call at the required instance either in <head> or <body> tag for any number of times. Syntax : <script type=text/javascript></script> Second by including the java script file which could be saved with .js extension. we can use that js file for several different web pages. Syntax: <head> <script type="text/javascript" src="xxx.js"> </script> </head> 3) How can we declare the variables and what are the types of variables? Ans: We can declare the variables by using the keyword var in js. Local Variables A variable declared within a JavaScript function becomes LOCAL It be accessed within that function. (the variable has local scope). Local variables are destroyed when you exit the function Global JavaScript Variables Variables declared outside a function become GLOBAL, and all scripts and functions on the web page can access it. Global variables are destroyed when we close the page

4) What are different types of objects available in js? Ans: Array Object: The Array object is used to store multiple values in a single variable. Boolean Object: The Boolean object is used to convert a non-Boolean value to a Boolean value (true or false). Date Object: The Date object is used to work with dates and times. Window object, navigator object, history object, screen object, math object etc.. 5) What is document object and some of their methods? Ans: Each HTML document loaded into a browser window becomes a Document object. It provides access to all HTML elements in a page, from within a script. getElementById() :Accesses the first element with the specified id getElementsByName() : Accesses all elements with a specified name. 6) What is Regular Expression? Ans: A regular expression is a JavaScript object. It is a easy way of describing a pattern in a piece of text.We could write a simple regular expression and use it to check, quickly, whether or not any given string is a properly formatted user Functions: test(string)- Tests a string for pattern matches and returns a Boolean value and is used method for validation. exec(string)- Executes a search for a pattern within a string. If the pattern is not found, it returns a null value. Else, it returns an array of the match results. These methods updates some of the properties of the parent RegExp object following a successful search.

UNIT-III XML
1) In XML Document Object Model, How many different Node types are present and what does node type1 represent? Ans: There are 12 different node types, which may have children of various node types and node type 1 represents an element. 2) Explain why XML Schemas are Extensible? Ans: I have given you some reasons that say XML Schemas are extensible. We can reuse our XML Schemas with in other XML Schemas. Also we can make our own data types which are derived from standard types. We can refer multiple schemas in a same XML document. 3) How you define optional and required attributes? Ans: In XML Schema there is no need to set attribute as optional. Because it is by default optional. You can define attribute required by using "use" attribute. Example: <xs: attribute name="lang" type="xs: string" use="required"/>

4) What is XML Namespace? Ans: An XSL sheet or a document may have duplicate elements and attributes. Therefore, the XML namespaces define a way to distinguish between duplicate element types and attribute names. An XML namespace is a collection of element type and attribute names. It is a URI due to which any element type or attribute name in an XML namespace can be uniquely identified. It consists of two parts: the name of the XML namespace and the local name. e.g.: xmlns: h=http://www.abc.com After this, you can write <h: table> .. </h: table> to associate the table with the declared namespace. 5) What is DTD? Ans: The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document.

6) What is the difference between DOM parser and SAX parser? Ans: Both SAX and DOM are used to parse the XML document. Both has advantages and disadvantages and can be used in our programming depending on the situation SAX Parser: 1. 2. 3. 4. 5. 6. 7. Event based model. Serial access (flow of events). Low memory usage (only events are generated). To process parts of the document (catching relevant events). To process the document only once. Backward navigation is not possible as it sequentially processes the document. Objects are to be created.

DOM Parser: 1. 2. 3. 4. 5. 6. 7. (Object based)Tree data structure. Random access (in-memory data structure). High memory usage (the document is loaded into memory). To edit the document (processing the in-memory data structure). To process multiple times (document loaded in memory). Ease of navigation. Stored as objects.

If we need to find a node and doesnt need to insert or delete we can go with SAX itself otherwise DOM provided we have more memory.

UNIT IV JAVA BEANS 1)What is BDK? Ans: BDK, Bean Development Kit is a tool that enables to create, configure and connect a set of beans and it can be used to test beans without writing a code. 2) What is Bean persistence property? Ans: Persistence is the ability to have the current state of a bean, including the values of a beans properties and instance variables, to nonvolatile storage and to retrieve them at a later time. 3) What is a Customizer? Ans: A bean developer can provide a customizer that helps another developer configure the bean .A customizer can provide a step-by-step guide through the process that must be followed to use the component. 4) What are the interfaces used to serialize a bean? Ans: Java.io.Serializable, java.io.Externalizable. 5) Define Introspection in java Beans? Ans: Introspection is the process of analyzing a Bean to determine its capabilities. 6) How Automatic Serialization is obtained and Where Transient keyword is used? Ans: Implementing Java.io.Serializable makes Serialization automatic. Your bean need to take no other action .Automatic serialization can also be inherited. There is one important restriction: any class that implements Java.io.Serializable must supply a parameter less constructor .When using automatic serialization you can selectively prevent a field from being saved through the use of the transient keyword. Thus data members of a bean specified as transient will not be serialized.

UNIT-V WEB SERVERS AND SERVLETS


1) What is the abbreviation of JSDK? Ans: Java Servlet Development Kit 2) What is a Servlet? Ans: A servlet is a Java programming language class that is used to extend the capabilities of servers that host applications accessed by means of a request- response programming model. 3) What is Servlet interface? Ans: The central abstraction in the Servlet API is the Servlet interface. All servlets implement this interface, either directly or , more commonly by extending a class that implements it. 4) Discuss about cookies? Ans: Cookies are state objects stored by web browser (or other Http client) and can be used by server side applications to store and retrieve information. Cookies can be created by servlets and sent to the browser. 5) What is the difference between servlet & CGI? Ans: For each HTTP request, CGI will start a new process. Whereas in servlet, init () method Will be called, only when first HTTP request came. for subsequent request an thread is created. 6) What are the phases of the servlet life cycle? Ans: The life cycle of a servlet consists of the following phases: Loading and Instantiation: During this step, web container loads the servlet class and creates a new instance of the servlet. Initialization: the web container initializes the servlet instance by calling the init () method. Service (): After a servlet is properly initialized, the servlet container may use it to handle client requests. Requests are represented by request objects of type ServletRequest. The

servlet fills out response to requests by calling methods of a provided object of type ServletResponse. These objects are passed as parameters to the service method of the Servlet interface. Destroy (): When servlet container determines that the servlet should be removed from the service, it calls the destroy () method of the servlet to allow servlet to release any resources it is using 7) List the classes that are provided in the javax.servlet package? Ans: 1) GenericServlet 2) ServletContextAttributeEvent 3) ServletContextEvent 4) ServletInputStream 5) ServletOutputStream 6) ServletRequestWrapper 7) ServletResponseWrapper 8) ServletException 9) UnavailableException

UNIT-VI INTRODUCTION TO JSP


1) What is the problem with servlets? Ans: The problem with servlets is processing the request and generating the response are both handled by a single servlet class. 2) What is JSP? Ans: JSP (Java Server Pages) is a technology for developing web pages that include dynamic content. 3) What is Template Text? Ans: Everything in the page that is not a JSP element is called Template Text. Template Text can really be any text: HTML, WML, XML, or even plain text. 4) What is MVC? Ans: MVC (Model View Controller) is a design pattern introduced by Xerox PARC (Palo Alto Research Centre) in the late 1980s. Model: This is the business logic of applications, responsible for performing the actual work conducted by the application. View: This is the presentation logic of the applications, responsible for rendering the data of the application. Controller: This is the Request processing logic of the applications, responsible for coupling both the model and the view together, so as to perform some action. 5) Is JSP technology extensible? Ans: YES. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries. 6) What types of comments are available in JSP? Ans: There are two types of Comments are allowed in JSP. These are JSP and HTML comments. JSP comments(Hidden comments) are not visible at the client. HTML comments(Output comments) are visible at the client. JSP Comment: <%-- comment --%> HTML comment: <!--comment -->

UNIT-VII JSP APPLICATION DEVELOPMENT


1) What are the implicit objects of JSP? Ans: Implicit objects are objects that are created by the JSP container and contain information related to a particular request, page, or application. Implicit objects are request, response, pageContext, session, application, out, config, page, exception. 2) What is JSP Scriptlet? Ans: JSP Scriptlet is jsp tag which is used to enclose java code in the JSP pages. Scriptlets begins with <% tag and ends with %> tag. Java code written inside scriptlet executes every time the JSP is invoked. Example: <% //java code String username=null; username=request.getParameter("userName"); %> 3) What are the life-cycle methods of JSP? Ans: Life-cycle Methods of JSP are: jspInit(): The container calls the jspInit() to initialize the servlet instance. It is called before any other method, and is called only once for a servlet instance. _jspService(): The container calls the _jspService() for each request, passing it the request and the response objects. It cannt be overridden. jspDestroy(): The container calls this when its instance is about to destroyed. 4) Why is _jspService() method starting with an _ while other life-cycle methos do not?

Ans: _jspService() method will be written by the container hence any methos which are not to be overridden by the end user are typically written starting with an _. This is the reason why we dont override _jspService() method in any JSP page. 5) What is the default scope of jsp tags? Ans: The availability of a JSP object for use from a particular place of the application is defined as the scope of that JSP object. Every object created in a JSP page will have a scope. Object scope in JSP is segregated into four parts and they are page, request, session and application. And page is considered as the default scope. 6) How many JSP scripting elements are there and what are they? Ans: There are three scripting language elements: declarations, scriptlets, and expressions. 7) Hoe does JSP handle runtime exceptions? Ans: Using errorPage attribute of page directive and also we need to specify isErrorPage=true if the current page is intended to URL redirecting of a JSP.

UNIT-VIII DATABASE ACCESS


1) What are the basic steps in using JDBC? Ans: a) Load the JDBC driver; b) Define the connection URL; c) Establish a connection; d) Create a statement object; e) Execute a query or update; f) Process the results; g) Close the connection. 2) How many types of JDBC Drivers are present and what are they?
Ans: There are 4 types of JDBC Drivers

Type 1: JDBC-ODBC bridge plus ODBC driver Type 2: Native-API partly-Java driver(Thick driver) Type 3: JDBC-Net pure Java driver Type 4: Native-protocol pure Java driver(Thin Driver) Type 3 & 4 are pure java drivers.

3) What is Connection pooling? Ans: Connection pooling is a technique used for sharing server resources among requesting clients. Connection pooling increases the performance of Web applications by reusing active database connections instead of creating a new connection with every request. Connection pool manager maintains a pool of open database connections.

4) What Class.forName will do while loading drivers of JDBC? Ans: It is used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.

5) How can you retrieve data from the ResultSet using JDBC? Ans: First JDBC returns results in a ResultSet object, so we need to declare an instance of the class ResultSet to hold our results. The following code demonstrates declaring the ResultSet objects rs. ResultSet rs=stmt.executeQuery(SELECT EMP_NAME, SAL FROM EMPTAB); Second: String s=rs.getString(EMP_NAME); The method getString is invoked on the ResultSet object rs, so getString will retrieve(get) the value stored in the column EMP_NAME in the current row of rs. 6) What is stored procedure? How to call stored procedure using JDBC API? Ans: Stored procedure is a group of SQL statements that forms a logical unit and performs a particular task. Stored Procedures are used to encapsulate a set of operations or queries to execute on database. Stored procedures can be compiled and executed with different parameters and results and may have any combination of input/output parameters. Stored procedures can be called using CallableStatement class in JDBC API. Below code snippet shows how this can be achieved. CallableStatement cs = con.prepareCall("{call MY_STORED_PROC_NAME}"); ResultSet rs = cs.executeQuery();

COMPILER DESIGN
UNIT-1:
1. What is a compiler? What are the various phases of compiler? A. Compiler is a software program that translates source program in one language into an equivalent program in another language. The various phases are: i. Lexical Analysis. ii. Syntax Analysis. iii. Semantic Anaysis. iv. Intermediate code generation v. Code Optimisation. vi. Code Generation. 2. What is the role of lexical analysis? A. In Lexical Analysis, the source program is scanned and divided into group of strings called tokens. A token is a group of characters having collective meaning. 3. What is a symbol table? A. A symbol table is a data structure that stores identifiers and also the attributes for each identifier. The attributes of identifiers are usually its type, its scope,information about storage allocated for it.It also contains information about the sub-routines used in the program. 4. What is meant by a pass? A. One complete scan of the source language is called pass. It includes reading an input file and writing to an output file. Many phases may be grouped together into a pass. 5. What are the types of compilers? A. i. Incremental Compiler. ii. Cross Compiler. 6. What is a regular expression? A. Regular expressions are used to describe patterns of a token. A token is a unique identifier to define a lexeme, where a lexeme is a set of characters that are delimited by a space or a tab. A pattern is a format of a token.

UNIT-2: Top Down Parsing:


1. What is the role of a Parser? A. A Parser or Syntax Analysis is a process which takes an input string w and produces either a parse tree or generates syntactic errors. 2. What is meant by Top-down Parsing A. In Top-Down Parsing we construct a parse tree for a given input string, starting with the grammars start symbol. 3. What are the various top-down parsers? A. The various top-down parsers are: i. Recursive descent Parsers. ii. Predictive Parsers. 4. What is meant by Ambiguity? A. The grammar which produces two or more left derivations (or) two more parse trees for the same input sentence is called Ambiguity. 5. What is meant by left-recursion? A. If the production is of the form A production.

Aa1|Aa2 then it is said to be left-recursive

6. Define Context Free Grammar? A. The Context Free Grammar is a collection of following things. i. V is a set of non-terminals. ii. T is a set of terminals. iii. P is a set of production rules. iv. S is a start symbol.

UNIT 3:Bottom-up Parsing: 1. What is meant by Bottom-up Parsing? A. A bottom up parser starts with the string of terminals itself and builds from the leafs upwards,working backwards to the start of the symbol by applying the productions in the reverse. 2. What are the various types of LR parsers? i. SLR Parser. ii. Canonical LR. iii. LALR(Look Ahead LR). 3. What are handles? A. Handle is a substring that will generate the bottom-up parsing without bottlenecks or without stoppings. 4. What are the various methods of Error Recovery methods in LR Parsing? A. i. Panic mode recovery. ii.Phrase level recovery. iii.Error Productions. iv.Global Corrections. 5. What is YACC? A. YACC means Yet Another Compiler Compiler. It is an automatic parser generator tool. 6. Give the structure of the lex program:A. Declaration section %% Translational Rules section- pattern and action separated by white space %% Auxillary Procedures

UNIT-4: Semantic Analysis:


1. What are the intermediate forms of source programs? A. The various forms are: i. Abstract Syntax Tree ii. Postfix(Polish Notation). iii. Three Address code.. 2. What is meant by Syntax Directed Definition? A. A syntax-directed definition is a context-free grammar with attributes and rules. Attributes are assosciated with grammar symbols and rules with productions. 3. What are Inherited Attributes? A.Evaluation of each and every node will depend on either root node or siblings,then the type of attributes are called as inherited attributes 4. What are the various type conversions? i. Implicit Type conversion ii. Explicit Type conversion. 5. What are the various type checking? i. Static. ii. Dynamic. iii. Mixed mode iv. Untyped. 6. What are S-Attributed Definitions and L-Attribute Definitions? A. In an S-Attributed SDD(syntax directed definition) all attributes are synthesized. In an L-Attributed SDD attributes may be inherited or synthesized.

UNIT-5: Symbol tables:


1. What is the difference between scope and lifetime? A. Scope is a static concept and scope of a variable is independent of procedure whereas lifetime is a dynamic concept and lifetime of a variable depends on the procedure. 2. What is a control stack? A.Procedure calls and returns are usually managed by a runtime stack called the control stack. 3. What is an activation tree? A. Activation tree is a pictorial representation of any program with respect to the activation of procedures. 4. Give the differences between static and dynamic storage allocation A. Static allocation allocates at compile time and dynamic allocation allocates at runtime 5. What are the various storage allocation strategies? i. Static. ii. Stack. iii. Heap. 6. What are the two strategies for dynamic storage allocation? i. Stack Storage. ii. Heap Storage. 7. What is an activation record? A..Each live activation of a procedure has an activation record onthe control stack with the root of the activation tree at the bottom of the stack. The contents of activation record are: i. Actual parameters. ii. Returned values. iii. Control link iv. Access link. v. Saved machine status. vi. Local data. vii. Temporaries

UNIT 6: Code Optimisation:


1.What is meant by code optimization? A.Elimination of unnecessary instructions in object code,or the replacement of one sequence of instructions by a faster sequence of instructions that does the same thing is called code optimization.Code optimization is done in two ways. i. Local optimization. ii. Global optimization. 2.How is local optimization done? A.Local Optimisation is done by: i. Function preserving transformation. ii. Loop Optimization. 3.How is loop optimization done? A. Loop Optimisation is done using: i. Code motion. ii. Strength reduction. iii. Induction variable elimination.

4.What is Dead code elimination? A.Any variable that is used in subsequent section is called a live variable otherwise it is called dead variable.This is eliminated and is called dead code elimination.

5.What is neant by constant folding? A.The value of an expression is a constant and using that constant instead of the expression reduces the compile time.This is called constant folding.

6.How is Function preserving transformation done? A.It is done using: i. Common subexpression elimination. ii. Copy propagation. iii. Dead code elimination iv. Constant folding.

UNIT-7: Data flow Analysis:


1. What is meant by a flow graph? A. A flow graph is a graphical representation of a program in which the nodes of the graph are basic blocks and the edges of the graph show how control can flow among the blocks.

2.What is meant by basic block? A. A basic block is a maximal sequence of consecutive three-address statements in which flow of control can only enter at the first statement of the block and leave at the last statement without halting.

3.What is meant by copy propagation? A. A copy statement,u=v,assigns one variable v to another, v. In some circumstances, we can replace all uses of u by v,thus eliminating both assignment and u. This is called copy propagation.

4.What are induction variables? A.Variables which are used in loop are called induction variables.

5. What is code motion? A.It is an optimization where the computation is moved outside the loop in which it appears.

6.What is meant by common subexpression elimination? A.An occurrence of an expression E is called common subexpression if E was previously computed and the values of the variables have not changed since the previous computation.We avoid recomputing E if we can use its previously computed value.This is called common subexpression elimination.

UNIT-8: Object code generation


1.What is code generation? A. Code generation is the final phase of a complier. The code generator maps the intermediate representation produced by the front end into the target program.

2.What are the issues of code generation? A. i. Input to the code generator. ii. The Target Program. iii. Instruction Selection. iv. Register allocation. v. Evaluation order.

3.What is meant by register allocation and assignment? A. As use of register operands instead of memory operands is always faster and shorter. The efficient utilization of registers is vitally important in generating good code. Register allocation and assignment is how to use these registers and what values to be stored in the registers.

4.What are the various strategies used in register allocation and assignment? A. i. Global Register Allocation. ii. Usage counts. iii. Register assignment for outer loops. iv. Register Allocation for graph coloring.

5. What is meant by Peephole Optimization? A. Peephole optimizations are local code-improving transformations that can be applied to a program,usually through a sliding window. 6.What is meant by register descriotor and address descriptor? A. Register descriptor: It is a data structure which keeps track the number of registers used for storing names. Address Descriptors:It keeps track the location of names whether it may be register,stack or memory location.

UNIX & SHELL PROGRAMMING UNIT 1 : INTRODUCTION TO UNIX. 1. What are the features of UNIX? Ans: Portable, Multiuser, Multitasking, Device independence, utilities and services,networking, organized file structure. 2. What are the 4 major components of UNIX structure? Ans: Kernel, shell standard set of utilities and application programs. 3. What are the default system prompts? Ans: $ - bourne, bash and korn shells. % - c and tcsh shells 4. List some of the arguments used by date command? Ans: B full month name, ex: January. D Date in the format of mm/dd/yyyy. P - Displays am or pm. R Time in the format hour: minute. 5. Explain echo command? Ans: It copies its arguments back to the terminal ex: $ echo Hello World

Hello World 6. Explain stty command with options? Ans: The set terminal (sty) command set or unsets selected terminal input or output command. a: display current setting. g: display current settings in argument format. 7. Explain script command? Ans: It can be used to record an interactive session. a append is the option used in script command. 8. Explain uname command? Ans: It displays the system name. options : a- all data is displayed, n only name , s operating system, r software release. UNIT 2 : UNIX UTILITIES 1. What are the structural sections of a file system? Ans: It contains 4 structural sections known as blocks. The boot block, Super block, inode block & data block. 2. What are the links? Ans: A link is a logical relationship between an inode and a file that relates name of file to physical address. Two types: hard links and symbolic links. 3. What is mount command? Ans: It instructs the OS that a file system is ready to use and associates it with a particular point in file system hierarchy. 4. What is finger command? Ans: Finger protocol is the simple network protocol for exchange of human-oriented status and user information 5. What is telnet command? Ans: The telnet command is used to communicate with another host using the TELENT protocol. 6. Explain cpio command? Ans: cpio files into or out of a tar archive, which is a file that contains other files and information about them, such as their filename, owner and access permissions.

UNIT 3: INTRODUCTION TO SHELLS AND FILTERS 1. What is redirection? Ans: It is a process that specifies a file is to be used in place of one of the standard files. 2. Explain different categories in vi editor with atleast one command in each category? Ans: category Adding text Deleting text Moving cursor Undo Mode command a dd h u <esc> Description appends text after current character deletes the command line moves cursor one character to the left undoes only the last edit enters command mode

3. What are foreground and background jobs? Ans: Foreground: job that runs under the active supervision of the user. Background: jobs cannot receive input from the keyboard while they are running in background. 4. What is a filter? Ans: It is any command that gets its input from the standard input stream, manipulates the input and then sends the result to the standard output stream. 5. Explain head and tail commands?

Ans: Head copies a specified no. of lines from beginning of one or more files to the standard o/p stream. Tail also outputs the data, only this time from the end of the file. 6. Explain uniq command? Ans: It deletes duplicate lines, keeping the fist and deleting the others.

UNIT 4: Grep and Sed 1. What is grep command? Ans: grep stands for global regula expression print. It is a family of programs that is used to search the i/p file for all lines that match a specified regular expression and write them to standard o/p file. 2. What are the 3 utilities of grep family? Ans: grep: supports limited no. of regular expressions. Fgrep: supports only string patterns. Egrep: supports most regular expressions but not all of them. 3. What is the action performed by grep? Ans: The action grep performs on a line is to send the line to the standard output. 4. What is sed command? Ans: sed is an acronym for stream editor. As the name suggests that it is a editor, but it does not change anything in the original file, rather it scans the i/p file line by line. 5. What is a comment? Ans: A comment is a script line that documents or explains one or more instruction in a script. 6. Explain line number command? Ans: The line number command (=) writes the current line number at the beginning of the line when it writes the line to the o/p without affecting the pattern space.

UNIT 5: AWK 1. Explain about awk utility? Ans: Awk is powerful programming language disguised as a utility. It reads the input file, ilne by line and performs an action on the part of or on the entire line. 2. What is record buffer? Ans: The record buffer ($0) contains the concatenation of all the fields, which may be changed during script processing. 3. What are the statements used, which controls the execution of entire script? Ans: 3 statements are used. Next, Get line and Exit. 4. Explain 'substring string function? Ans: The substr function extracts a substring from a string. It has 2 formats. substr(string, position) substr(string,position, length). 5. What are the options provided by awk utility? Ans: 2 Unix options for awk utility. F Specifies the input field separator. F Names the script file. 6. Explain some of the system variable supported by awk utility?

Ans: ARGC No. of command line arguments. RS Input record separator. FILENAME a - Name of the current file, etc.

UNIT 6: Interactive korn shell,korn shell programming 1. Explain tee command? Ans: The tee command copies standard input to the standard output and at the same time copies it to one or more files. 2. Explain two special files in UNIX? Ans: Trash File(/dev/null) used for deleting data. Terminal File( /dev/tty) owned by the root, everybody has permission to read and write it. 3. Explain typeset command? Ans: To associate one or more attributes such as character format and justification we use typeset command $ typeset attribute variable-name #set attribute. $typeset + attribute variable-name #Remove attribute. 4. Explain eval command? Ans: The eval command is used when the korn shell needs to evaluate a command twice before executing it. 5. Explain xtrace command? Ans: The xtrace option displays the command with a plus sign(+) and the evaluation of the expressions in each step of a command script. 6. What is an expression? Ans: Expressions are a sequence of operators and operands that reduces to a single value.

UNIT 7: Interactive c shell and c shell programming 1. Explain pipe operator? Ans: The pipe operator temporarily saves the o/p from one command in a buffer that is being used at the same time as the input to the next command. 2. Explain aliases in C shell? Ans: An alias is a means of creating a customized command by assigning a name or acronym to a command

3. Explain exit status of a command? Ans: In the C shell, when a command is executed, returns a value known as the exit status of the command. 4. Explain verbose command? Ans: The verbose option shows commands before they are executed by the shell. It is useful when debugging a script. 5. Explain child shell execution? Ans: To ensure that the script is properly executed, we can create a child shell and execute it in the new shell. 6. Discuss file operators in detail? Ans: -e file -> True, if file exists. -l file -> True, if file exists and is a symbolic link. -x file -> True, if file exists and is executable. -z file -> True, if file length is zero.

UNIT 8: File Management 1. List the security levels in UINX? Ans: There ae 3 levels of securities in UNIX they are system, directory and file. 2. What is the use of symbolic code? Ans: The use of symbolic code in the chmod command allows a user to set, add or remove individual permissions. 3. What is the use of octal code? Ans: The use of octal code in the chmod command requires that all permissions be completely reset. 4. Explain Chown command? Ans: The owner and optionally the group are changed with the change ownership (chown) command. 5. What is the option used by chown? Ans: -R (Recursive option) : is used with a directory, all files in the directory and all subdirectories and their files are changed recursively. 6. Explain Umask command? Ans: Displays or sets the default permission for newly created files or directories.

DATA WAREHOUSING AND DATA MINING


UNIT-1 What is Data Mining? Ans: Data Mining is a task of discovering interesting patterns from large amounts of data.
1.

Which type of databases contain word descriptions for objects? Ans: Text Database.
2.

What is Data Cleaning? Ans: Data Cleaning is to remove noise and inconsistent data.
3.

OLTP stands for? Ans: On-Line Transaction Processing.


4.

In equal width histogram,the width of each bucket range is? Ans: uniform.
5.

What is Generalization? Ans: Generalization is where low-level data are replaced by higher-level concepts through the use of concept hierearchy.
6.

What is Data Cube Aggregation? Ans: Data Cube Aggregation is where aggregation operations are applied to the data in the construction of a data cube.
7.

Data Preprocessing includes? Ans: Data Cleaning,Data integration,Data Transformation,Data Reduction.


8.

UNIT-2 OLAP stands for? Ans: On-Line Analytical Processing.


1.

In fact table,what are the numerical measures? Ans: facts.


2.

Tell few OLAP operations. Ans: roll-up,drill-down,slicing,dicing.


3.

What is zero-dimensional operation? Ans: An SQL query containing no group-by is a zerodimensional operation.
4.

What are the schemas for multi-dimensional database? Ans: star schema,snowflake schema,fact constellation.
5.

Tell few types of OLAP servers. Ans: Relational OLAP,Multi-dimensional OLAP,Hybrid OLAP.
6.

UNIT-5 What are Multi-dimensional association rules? Ans: Multi-dimensional association rules involves more than one dimension.
1.

Buys(X,digital Camera)->Buys(X,HP Printer) is which dimensional association rule? Ans: single.


2.

What is a set containing k-conjunctive predicates? Ans: k-predicate set.


3.

What are Multi-level association rules? Ans: Association rules generated from mining data at multiple levels of abstraction are called Multi-level association rules.
4. 5.

What is equal-frequency binning?

Ans: Equal-frequency binning is where each bin has same number of tuples assigned to it. The occurrence of itemset A is independent of occurrence of itemset B if P(AUB) is equal to Ans: P(A).P(B)
6.

UNIT-8 What partitions the data into a set of contiguous buckets? Ans: Histogram.
1.

DSMS stands for? Ans: Data Stream Management System.


2.

What can be both predefined and adhoc? Ans: Query.


3.

A pattern is said to frequent if its count satisfies? Ans: minimum support.


4.

VFDT stands for? Ans: Very Fast Decision Tree.


5.

CVFDT uses which approach? Ans: sliding-window approach.


6.

FLAT COMPREHENSIVE VIVA QUESTIONS


Unit : 1 FUNDAMENTALS

1. What is a language?

A language over an alphabet is a set of strings over that alphabet. Therefore, a language L is any subset of language
2. How can a sentence be constructed?

. That is, any

is a

Sentence can be constructed using a 'noun-phrase' followed by a predicate.


3. What is a language?

A language is a subset of the set of all possible strings formed from a given set of symbols. There must be a membership criterion for determining whether a particular string in the set.
4. What is a string?

Its a finite sequence of symbols.


5. A finite automaton involves states and transitions . 6. What do automata contain?

It is a graph which is a transition diagram with i. Starting state ii. Accepting states iii. Each arc is assigned with output symbols.
7. Difference between NFA and DFA?

DFA is similar to NFA except: i. It has no transition on input E ii. For each state s and input symbol E, there is at most one edge.

Unit : 2

FINITE AUTOMATA

8. How NFA for R* is constructed given NFA for R ?

9. How NFA is denoted?

An NFA is represented formally by a 5-tuple, (Q, , , q0, F), consisting of i. A finite set of states Q ii. A finite set of input symbols iii. A transition relation : Q P (Q). iv. An initial (or start) state q0 Q v. A set of states F distinguished as accepting (or final) states F Q.
10. Define Grammar?

A grammar is a formal system for accepting or rejecting strings.


11. When does two DFAs said to be isomorphic?

Two DFAs are said to be isomorphism if they are identical up to renaming of the states.
12. Application of finite automata is lexical analyzer. 13. What is NFA?

Its an automata with finite number of states, arcs are assigned with symbols including E and each state can have more than one outgoing arc with same assigned symbol.

14. Difference between Moore and Mealy machine is that the output of

Moore machine depends only on the present state.

Unit : 3

REGULAR LANGUAGES

15. Regular grammar is also known as type3 grammar. 16. If r1 and r2 are regular expressions then L(r1+r2)=L(r1) U L(r2),

L(r1*r2)=L(r1)* L(r2), L(r*)=(L(r1))*.


17. Let r, s, t are regular expressions then (r + s)* = (r* s*)* 18. Pumping Lemma is generally used for proving a given grammar is not

regular.
19. Let f(0) = a and f(1) = b*. Then f(010) = ab*a 20. What is meant by closure?

If S is an alphabet, then set of all words, including over S is called closure of S and it is denoted by S*.

Unit : 4

GRAMMAR FORMALISM

21. What is sentential form?

A string x is called a sentential form if S->*x


22. When is a relation R said to be right invariant?

A relation R such that xRy implies xzRyz is said to be right invariant.


23. When a grammar is said to be right linear?

A grammar G=V, T, P, S is said to right linear if all productions are AXB, AX of the form.

24. Regular Grammar is a subset of Type 0,1,2 Grammar. 25. A string with odd number of zeros is regular. 26. Let R,S,T are regular expressions ,then R(S+T)=RS+RT

Unit : 5

CONTEXT FREE GRAMMARS

27. In a context free grammar each production is of the form Aa. 28. The logic of pumping lemma is a good example of the pigeon hole

principle.
29. The principle of pigeon hole is we put n objects into m boxes and if

n>m then at last one box must have more concatenations.


30. A production of the form AB A, B belongs to T is called unit

production.
31. A CFL for which every CFG is ambiguous is said to be an inherently

ambiguous CFL.
32. LetG=(V,T,P,S) be a CFG. A tree is a derivation (or parse) tree for G if

vertex n has label then n is a leaf node

Unit : 6

PUSHDOWN AUTOMATA

33. How Pushdown automata differ from finite state machines.

Pushdown automata differ from finite state machines in two ways: i. They can use the top of the stack to decide which transition to take. ii. They can manipulate the stack as part of performing a transition.
34. What is PDA?

Context-Free Language is the language accepted by a class of machines called "Pushdown Automata" (PDA).

35. A PDA, M is a 7-tuple M =

. 36. For each pushdown automaton M one may construct a context-free grammar G such that N (M) = L (G).
37. Running time of a FA like NPDA for an input string of length n is

Linear in n. 38. Let L1 be the set of languages accepted by a NPDA L2 be the set of CFL then L1 =L2

Unit : 7
39. Define Turing Machine.

TURING MACHINE

A Turing machine is a device that manipulates symbols on a strip of tape according to a table of rules. Turing machine can be adapted to simulate the logic of any computer algorithm, and is particularly useful in explaining the functions of a CPU inside a computer.
40. A finite state machine can be considered to be a TM if finite tape length

rewinding capability and bidirectional tape movement.


41. Why is TM more powerful than Finite State Machine?

Because it has the capability to remember arbitrary long input symbols.


42. How Turing machine can be represented.?

Turing machine as a 7-tuple where Q is a finite, non-empty set of states is a finite, non-empty set of the tape alphabet/symbols is the blank symbol (the only symbol allowed to occur on the tape infinitely often at any step during the computation) is the set of input symbols is the initial state is the set of final or accepting states.

is a partial function called the transition function, where L is left shift, R is right shift. (A relatively uncommon variant allows "no shift", say N, as a third element of the latter set.)
43. Difference between FA and TM?

Turing machines are similar to FA but have finite read and write memory.
44. Can TM move in their memory?

No, they cannot move.

Unit : 8

COMPUTABILITY THEORY

45. Ackermans function is not primitive recursive. 46. A problem whose language is recursive is said to be undecidable. 47. Universal language is Recursive. 48. A problem is said to be NP-hard if it is hard to implement. 49. NP-complete mean?

A class of problems is called NP-complete if there is solution of one decision problem from that family then there will be solution for each and every decision problem from that family.
50. Decidability in decidable and undecidable problem refers to

Existence of algorithm which takes an instance of the problem and determines whether the answer to that instance is yes or no

COMPUTER GRAPHICS

UNIT-1: Introduction to Computer Graphics 1.What are the major applications of computer graphics? A. It is applied in the field of Engineering & Architecture, Image processing, Graphical user interface, Visualization, Education and training etc. 2.Define Persistence? A. The time taken by the emitted light from the screen to decay to 1/10 th of its original intensity is called as persistence. 3.What are the techniques used to produce color displays? The techniques that are used to produce color displays are (a)The beam-penetration method and

(b)The shadow-mask method 4. Define aspect ratio? A. Aspect ratio= Vertical points/Horizontal points which is required to generate equi-length lines in both the directions on the screen. 5.What is a control grid in a CRT device? A. It consists of a small hole through which electrons are passed on the application of voltage. 6. Define resolution? A. It refers to the number of pixels which the screen can display horizontally or vertically without overlap. 7.What is cell-encoding? A. It is a technique used to encode the raster image as a set of rectangular areas. UNIT-2: Output Primitives 1.Define output primitives? A.These are the geometric structures that describes the picture by making use of the functions provided by the graphics package. 2.What are the different types of line-caps and line-joins? A. Different types of line caps are Butt Cap, Round Cap and ProjectionSquare Cap .Different types of line joins are Miter join, Round join and Bevel join. 3.What are the different types of line drawing algorithms? A.(a)DDA algorithm (b)Bresenhams Line algorithm (c)Parallel line algorithm 4.What are the advantages of using flood-filling algorithm? A. It is used to fill multiple colored boundary efficiently and when compared to the boundary-fill algorithm the storage requirements are less for flood fill algorithm.

5.What are 4-connected regions with respect to boundary-fill algorithm? A. The pixels that lie towards the right,left, above and below the current pixels are tested and filled using this method. 6.What are the different types of Image Compression Techniques? A. Different types of image compression techniques are (a) Run-length encoding (b) Area image compression UNIT-3: 2-D Geometric Transforms 1.Define geometric transformations? A.The process of varying the shape,size and orientation of the objects by changing their coordinate positions is called as geometric transformations. 2.What are the basic geometric transformations? A. The basic geometric transformations are translation, rotation and scaling. 3.Define Composite transformations? These are formed as multiplications of any combinations of translations, rotation and scaling matrices. 4.Define the reflection matrix when the reflection axis is along the diagonal line(y=x)? A. The reflection matrix is 0 1 0 1 0 0 0 0 1 5.Define translation? A.It is a rigid-boby transformation that moves objects without deformation. 6.Define the matrix to generate x-direction shares relative to other reference lines?

A. the matrix is

1 shx -shx.yref 0 1 0 0 0 1

UNIT-4: 2-D Viewing 1.What is the major differenc between A window and a view port? A.Window defines what is to be seen where as the viewport defines where it is to be shown. 2.Define Clipping? A.The process of identifying and retrieving the portions of a scene that lies either outside or inside a particular region is called as clipping. 3.What are the different methods involved in line clipping algorithm? A. (a) Cohen-Sutherland method (b)The Liang-Barsky method and (c) Nicholl-Lee-NIcholl method 4.What are the different types of clipping? A.The different types of clipping are Line clipping Point clipping Area Clipping Curve clipping Text clipping. 5.Define a viewport? A.It is an area on a display device to which a window is mapped. 6.What are the various applications of clipping? A. (a) To get a portion of the scene for viewing (b) For displaying the multi-window environments.

(c) In drawing and painting operations Unit-5:3-D Object Representation 1.What are the lists includes in geometric transformations? A. The geometric representation of the data include three lists. They are (a)Vertex table (b) Edge table (c) Polygon table 2.Define a spline curve? A.A spline curve is a composite curve which can be drawn using the polynomial regions that fulfils certain continuity conditions at their boundaries. 3.What are polygon tables? A.These ar eth structures that contains the information about each polygon in a 3Dspace which is used for display of objects. 4.Define edgr table? A.It stores the pointers,which points to the vertex table to obtain the vertices for each edge of a polygon. 5.What are the different types of parametric continuity? A. The different types of parametric continuity are: (1)Zero-order parametric continuity (2)First-order parametric continuity (3)Second-order parametric continuity.

6.What is a Hermite curve? A.It is a piecewise interpolating cubic polynomial consisting of a tangent at each control point. UNIT-6: 3-D Geometric Transformation & Viewing

1.Define rotation? A.It is a transformation method used to change the position of an object by moving it along the circular path in xyz plane by specifying a rotation angle and the axis of rotation. 2.Define reflection? A.It generates the mirror image of an object by rotating the object about an axis called reflection axis at 180 degrees. 3.Define the transformation matrix to rotate a point (x,y,z) about z-axis throung an angle in clockwise direction/ A. The matrix is Cos -sin 0 0 Sin cos 0 0 0 0 1 0 0 0 0 1

4.Define projection? A.After converting the world-coordinates object descriptions to the viewing coordinatines the objkects are projected onto the 2D view point. 5.Define vanishing point? A.The set of lines which are parallel to the plane of projection converges at a point called as a vanishing point. 6.What are the different types of projections? A. The different types of projections are: (a)Parallel projection and (b) Perspective projection. 7.Define parallel projection? A. The projection in which the coordinate position of the objects are transformed to the view plane along parallel lines is called parallel-projection.

UNIT-7: Visible Surface Detection Molecules 1.What are visible surface detection methods? A.These are the methods that shows only the visible part thereby hiding the invisible parts. They are (a) Object-cpace methodology (b)Image-space method. 2.Define object space methods? A.These are the methods that identifies the vsible surfaces by comparing the objects in a scene with one another. 3.What are the different types of surfaces? A. The different types of surface s are Surrounding surface,Overlapping surface,Inside surface and Outside surface. 4.Define Area-subdivision method? A.It is an image-space method where the object-space operations are applied to order the surfaces according to their depths. 5. Define edge table? A. This table contains endpoints for each line, inverse of the line slopes and pointers to the polygon table. 6.Define image-space methods? A.These are the methods that identifies the surface visibility by determining the visibility at each pixel position separately. UNIT-8: Computer animation 1.What are the steps involved in the design of animation? A.The steps involved in design of animation are (a) Story board layout. (b)Object definition (c)Key-frame specification

(d)Generation of in-between frames 2.What are parameterized systems? A. These systems allow object-motion characteristics to be specified as part of the object definition. 3.What are the functions that are included in animation? A.Animation functions include a graphics editor,a key-frame generator,and a standard graphics routine. 4.Define morphing? A.Transformation of object shapes from one form to another is called as morphing. 5.What are Scripting systems? A. These systems allow object specifications and animation sequences to be defined with a user-input script. 6.What are the different ways in which motions af an object can be specified? A. The different ways in which motions of a n object can be specified are (1)Direct motion specification (2)Goal-Directed systems (3)Kinematics and Dynamics COMPREHENSIVE VIVA SUBJECT: DIGITAL LOGIC DESIGN

UNIT 1 BINARY SYSTEMS


1. The number of zero bits precede the binary number will

Ans: does not change its value


2. To find out the complement of an n digit number the following relation is valid one Ans: r's complement =3D rn number

3. In signed magnitude representation the sign is represented by the


Ans:MSB 4. In the signed magnitude representation the MSB of the binary number is 1 then the number is Ans:negative 5. Going form binary to hexadecimal, grouping of four bits can be obtained by Ans:added as zero padding on the MSB 6. convert the following a)Convert 172 in octal to decimal Ans:-122 b) Convert 15E hex to decimal Ans:-350 c) Convert the binary number 001100111010 to Hexadecimal number Ans:-33A d) Convert the binary number 001100111010 into octal number Ans:-1472+

UNIT-2 BOOLEAN ALGEBRA AND LOGIC GATES


1. The bit combination of an n-bit code is determined from the count in binary from Ans:0 to 2n-1 2. The contents of a processor register are transferred into the Ans:-memory register 3. The information from the input register is transferred into the Ans:-four least significant cells of a processor register 4. The generalized form of DeMorgan's theorem states that Ans:-the complement of a function is obtained by interchanging AND and OR operators complementing each others 5. In Boolean algebra there is no subtraction or division operations because Ans:-it does not have additive or multiplicative inverses

6. Reduce the Boolean expression a) A'C' + ABC + AC' to three literals Ans:-AB + C' b) xyz + x'y + xyz Ans:- y

UNIT 3

GATE LEVEL MINIMISATION


1. Determine the complement of the function F(x,y,z) =3D( = 1,3,6,7)
Ans: - F(x,y,z) =3D (0,2,4,5) a) The number of minterms formed from n variables are Ans:-2n b) The Minterm is obtained from Ans:-an AND term of the n = variables c) The minterm is also called Ans:-standard product

2. Boolean functions expressed as a sum of minterms or product of maxterms are said to be in


Ans: canonical form

3. The don't care conditions can be used on a map to provide a


Ans: further simplification of the Boolean expressions

4. To implement any Boolean function using NOR gates, it must be in the form of
Ans: product of sums

5. a)Which gate is the universal gate


Ans:-NAND b)The NAND gate is also called as a Ans:- Invert-OR c) The NOR gate is also called as Ans:-OR Invert d)To implement any Boolean function using NAND gates, it must be in the form of Ans:-sum of products

UNIT 4 COMBINATIONAL LOGIC

1. A combinational circuit consists of

Ans: - logic gates, input and output variables


2. A combinational circuit has a logic gates with

Ans:-no feed -back paths


3. The following is used for logic simulation of combinational circuit

Ans:- verilog HDL

4. a)The Truth table defines the required relationship between

Ans:-inputs and outputs b) The input columns of a truth table for a combinational circuit are obtained from Ans:- 2n binary numbers for the n input = variables
5. Every combinational circuit corresponds a Boolean function which describes the circuit

Ans:- logical behavior 6. a) An n-bit binary adder requires .... number of full adders with each output carry connected to Ans:-n, input carry of the next higher order full adder b) The over flow occurs when the addition is perform , this problem in digital computers takes care by using a Ans:-flip-flop c) The longest propagation delay time in the adder will be the time it takes Ans:-the carry to propagate through the full adders .

UNIT 5 SYNCHRONOUS SEQUENTIAL LOGIC


1. What is a flip-flop? Ans: The memory elements in clocked sequential circuits are called flip-flops. These are binary cells used for storing one bit information. 2. A Flip-flop can be made using Ans: NAND gates or NOR gates 3. A shift Register can be used for Ans: Parallel to serial conversion, Serial to parallel conversion, Digital delay line.

4. What is the difference between latch and flip-flop? Ans: A flip-flop is edge-triggered whereas a latch is level-triggered. A flip-flop has two values , latch has only one value. 5. What is priority encoder? Ans: Priority Encoder is a circuit that compresses multiple binary inputs to smaller number of outputs.Output is the binary representation of ordinal number starting from zero to most significant bit. 6. What is a clocked RS Flip-flop? Ans: By adding gates to basic asynchronous sequential circuit,flip-flop can be made to respond to input levels during the occurrence of clock pulse.The clocked RS-flipflop consistes of basic NOR flip-flop and two AND gates. 7.Ring Counter use which flip-flop?

D flip-flop 8. How race condition occurs in NAND latch? Low R and Low S produces race condition in NAND latch

UNIT 6 REGISTERS
1. What is the difference between bit time and word time? Ans:The time interval between clock pulses is called the bit time and the time required to shift the entire contents of a shift register is called the word time. 2. What is latch? Ans:If a register is sensitive to the pulse duration, it will be referred to as a latch. 3. What is down-counter? Ans: A binary counter with a reverse count is called a binary down-counter. In down-counter binary count is decremented by 1 with every input count pulse. 4. What is ripple counter? Ans: In a ripple counter, the flip-flop output transition serves as a source for triggering other flipflops. 5. What is the difference between latch and flip-flop? Ans:Flip-flops are edge-sensitive devices where as latches are level sensitive devices.

6. What is a ring counter? Ans:A ring counter is a type of counter composed of a circular shift register. The output of the last shift register is fed to the input of the first register.

UNIT 7 MEMORY ORGANISATION


1. What is decoder? A decoder is a combinational circuit that converts binary information from n input lines to a maximum of 2n unique output lines. 2. Define PLA.

A programmable logic array (PLA) is a kind of programmable logic device used to implement combinational logic circuits. The PLA has a set of programmable AND gate planes, which link to a set of programmable OR gate planes, which can then be conditionally complemented to produce an output. 3. How many output lines are there in 328 ROM? There are 8 output lines and 32 distinct words stored in the unit. The unit consists of 32 words of 8 bits each. 4. Why PLA over ROM? The words at the don't care address need not be programmed and may be left in their original state(all 0's or all 1's ). The result is not all the bit patterns available in Read-only memory are used which may be considered a waste of available component. . 5.What is a demultiplexer? A demultiplexer is a circuit which receives information on a single line and transmits information on one of 2n possible output lines. 6.How is 2n-to-1 line multiplexer is constructed? It is constructed from n-to-2n decoder by adding it to2n input lines, one to each AND gate.

UNIT 8 ASYNCHRONOUS SEQUENTIAL LOGIC


1. The race around condition occurs in JK flip-flop if Ans: J=1 and K=1 2. Which flip-flop is used in Bounce-elimination switch Ans: S-R flip-flop 3. In sequential circuits, the outputs at any instant of time depend Ans: On past output as well as present inputs. 4. What is the characteristic of master-slave flip-flop? Ans: Change in output occurs when the state of slave is effected. 5. Which functionality SR Latch does not provide ? Ans: Toggle State 6. How a race condition exist? Ans: If two or more state variables change simultaneously, circuit makes a transition from one stable state to other.

SOFTWARE ENGINEERING BITS

UNIT 1 1. What are the 6 levels of CMMI?? Ans. CMMI stands for- CAPABILITY MATURITY MODEL INTEGRATION Level 0:Incomplete Level 1:Performed Level 2:Managed Level 3:Defined Level 4:Quantitatively managed Level 5:Optimized 2. The process framework compasses of Ans. Set of umbrella activities 3. What are the different layers in Software Engineering- Layered Technology?? Ans. Tools, Methods, Process, Quality of Focus. UNIT 2 4. What are the various phases of waterfall model?? Ans. Communication, Planning, Modeling, Construction and Deployment. 5. What are the PHASES OF UNIFIED PROCESS?? Ans. Inception, Elaboration, Construction and Transition phase 6. What do you mean by Functional Requirements?? Ans. It should be both complete and consistent, Completeness - All services required by the user should be defined Consistent - Requirements should not have contradictory definition Difficult to achieve completeness and consistency for large system UNIT 3 7. The architecture that consists of components of a system encapsulate data and operations that must be applied to manipulate the data is?? Ans. Object Oriented Architecture 8. What are the requirements engineering process distinct steps??

Ans.

requirements elicitation requirements analysis and negotiation

requirements specification system modeling requirements validation requirements management 9. What is the second stage of Requirement Engineering?? Ans. UserRequirements elicitation and analysis UNIT-4 10. What are the different types of cohension? Ans.Cohension is a measure of the relative functional strength of a module. Coupling is a measure of the relative interdependence among modules. 11. What does a data design indicates?? Ans. Data design translates the data objects defined in the analysis model into data structures that reside within the software. 12. What is data mining?? Ans. The technique that is developed to extract useful data from the data environment when the information desired is cross- functional. UNIT-5 13. What are the 3 golden rules for interface design ?? 1. Place the user in control. 2. Reduce the users memory load. 3. Make the interface consistent 14. What does Interface consistency imply?? Ans. It implies that both input mechanisms remain the same throughout the application and visual information is organised according to the designed standard. 15. What is cardinality?? Ans. Its the maximum number of object s that can participate in the relationship. UNIT-6 16. What is White-Box Testing?? Ans. White box testing is a test case design method that uses the control structure of the procedural design to derive test cases. It is otherwise called as structural testing. 17. What are the different debugging approaches?? Ans

Ans. There are 3 debugging approaches. They are: (1) brute force (2) backtracking, and (3) cause elimination

18. What is a metric?? Ans. It is a Quantitative measure of the degree to which the System Component or process possesses a given attribute. UNIT-7 19. What is the key concept of quality control? Ans. All work product should have measurable specifications for process outputs. 20. What is Risk Identification?? Ans. Risk identification is a systematic attempt to specify threats to the project plan 21. What are three Major Categories of Risks?? Ans. Project risks, Technical risks and Business risks. 22. Whar does RMMM stand for?? Ans. Risk Mitigation, Monitoring and Management UNIT-8 23. What does SQA involve?? Ans. It involves tracing each defect to its underlying cause, Isolating the vital few causes and moving to correct them 24. The ISO quality assurance Standard that applies to Software engineering is: Ans. ISO 9000:2001 25. What is Quality Control? Ans.Quality control involves the series of inspections, reviews, and tests used throughout the software process to ensure each work product meets the requirementsplaced upon it.

SOFTWARE TESTING METHODOLOGIES

UNIT 1:Introduction 1. The importance of bugs depends on? Ans. Frequency, correction cost, installation cost, consequences. 2. What is the purpose of testing and debugging? Ans. The purpose of testing is to show that a program has bugs, where as the purpose of debugging is to find the error or misconception that led to the programs failure and to design and implement the program changes that correct the error. Debugging usually follows testing. 3. Phases in a Testers Mental Life? Ans. PHASE 0: Theres no difference between testing and debugging other than in support of debugging, testing has no purpose. PHASE 1: The purpose of testing is to show that the software works. PHASE 2: The purpose of testing is to show that software doesnt work. PHASE 3: The purpose of testing is not to prove anything, but to reduce the risk of not working to an acceptable value. PHASE 4: Testing is not an act. It is a mental discipline that results in low-risk software without much testing effort. 4. List out Bug Consequences Ans. 1. Mild 2. Moderate 3. Annoying 4. Disturbing 5. Serious 6. Very Serious 7. Extreme 8. Intolerable 9. Catastrophic 10. Infectious

UNIT 2:Flow graphs and Path testing 1. What is Control Flowgraph? Ans. It is a representation of a programs control structure. 2. What is Path Testing? Ans.Testing in which all paths in the program source code are tested at least once. 3. What are Predicates and Path Predicates? Ans. The logical function evaluated at a decicion is called a predicate, some examples are: A is greater than Zero, X is either negative or equal to 10. A Pridicate associated with a path is called a path predicate. UNIT 3:Transaction Flow Testing 1. What is a Transaction? Ans. It is a unit of work seen from a system users point of view. A transaction consists of a sequence of operations, some of which are performed by a system, persons, or devices that are outside of the system. 2. What is Data Flowgraph? Ans. It is a graph consisting of nodes and directed links(links with arrows on them). 3. What is a Data Flow Anomaly? Ans. An anomaly is denoted by a two-character sequence of actions. For example, ku means the object is killed and then used. Here d: defined, k: killed, u: used. There are nine possible two-letter combinations for d,k,u. Some are bugs, some are suspicious, and some are ok. (dd: probably harmless but suspicious. Why define the object twice without an intervening usage? dk: probably a bug. Why define the object without using it? du: The normal case. The object is defined then used. kd: normal situation. An object is killed, then redefined. kk: haemless but probably buggy. Did you want to be sure it was really killed? Ku: a bug. The object doesnt exist in the sense that its value is undefined or indeterminate.

ud: usually not a bug because the language permits reassignment at almost any time. uk: normal situation. uu: normal situation.) UNIT 4:Domain Testing 1. Domain testing is based on? Ans. Specifications and/or implementation information. If based of specifications, it is a functional test technique; if based on implementations, it is a structural technique. 2. What is the bug assumption for domain testing? Ans. The bug assumption for domain testing is theat processing is okay but the domain definition is wrong. 3. Properties of Nice Domains Ans.linear boundaries, boundaries that extend from plus to minus infinity in all variables, have systematic inequality sets, form orthogonal sets, have consistent closures, are convex. Nice domains are easy to test because the boundaries can be tested one at a time, independently of the other boundaries. UNIT 5:Paths, Path products and Regular expressions 1. Define Path Product and give a simple example Ans. The name of a path that consists of two successive path segments is conveniently expressed by the concatenation or path product of the segment names. For example, if X an Y are defined as X= abcde Y= fghij Then path product of both XandY is XY= abcdefghij 2. Define path expression Ans. An algebraic representation of sets of paths in a graph is called a path expression. 3. Path sum denotes? Ans. Paths in parallel.

4. How are regular expressions formed? Ans. By converting path expressions to algebraic functions. UNIT 6:Logic Based Testing 1. What are the four components of a decision table? Ans. Condition stub, condition entry, action stub, action entry. 2. A list of names of conditions in a decision table is called? Ans. Condition stub 3. The list of names the actions the routine will take or initiate if the rule is satisfied is called? Ans. Action stub 4. What is the expression that the following KV chart denotes?

Ans.A'C' + AC
UNIT 7:State,

State Graphs and Transition testing

1. Define state with an example? Ans. A state is a combination of circumstances or attributes belonging for the time being to a person or thing. For example, a persons checkbook can have the following states with respect to the bank balance: 1. Equal 2. Less than 3. Greater than. 2. Define equivalent state Ans. Two states are equivalent if every sequence of inputs starting from one state produces exactly the same sequence of outputs when started from the other state. 3. Define Unreachable and Dead states Ans. An unreachable state is like unreachable code, a state that no input sequence can reach. A dead state is a state that once entered cannot be left. UNIT 8:Graph Matrices and Application

1. A graph whose relations are symmetric is called a? Ans. Directed graph 2. The number of links a node has is equal to? Ans. In-degree + out-degree 3. Node reduction algorithm steps Ans. 1) Select a node for removal; replace the node by equivalent links that bypass that node and those links to the links they parallel. 2) Combine the parallel terms and simplify as you can. 3) Observe loop terms and adjust the outlinks of every node that had a self-loop to account for the effect of the loop 4) The result is a matrix whose size has been reduced by 1. Continue until only the two nodes of interest exist

COMPUTER ORGANIZATION UNIT 1 1. What is computer organization? Ans: It is concerned with the way they hardware components operate and the way they are connected together to form the computer system. 2. List the different digital logic gates?

Ans: AND, OR, NAND, NOR, INVERT OR, XOR. 3. What is sequential circuit? Ans: It is interconnection of flipflops and gates. 4. What does the state table constitute? Ans: The present state, input, next state, output. 5. What is state diagram? Ans: The information available in state table represented graphically in state diagram. - State, - transition(directed line). 6. What are the functional units of a computer? Ans: Input unit, output unit, memory unit, ALU, Control unit. 7. What is program counter? Ans: It stores the address of the next instruction to be executed. 8. What is a compiler? Ans: It is a program capable of acception any of high level language as input and producing its equivalent machine language as output.

UNIT 2 1. Name any three program control instructions? Ans: These instruction cause the program control to be switched to different locations depending on requirement. They are JUMP, Branch, Return, Skip, Cmp, and Test. 2. List some data transfer instructions? Ans: These facilitate data transfer from one location to another such that no changes have been done to binary information content. Some of them are push, pop, i/p, o/p, load, store, move and exchange.

3. What are data manipulation instructions? Ans: Thes instructions facilitate various types of operations ( arithematic, shift, logical) to be performed on a given set of data. Some of them are ADD, SUB, MUL, DIV, INC, DEC, AND, OR, XOR, CLR, SHR, SHL. 4. List any 3 addressing modes? Ans: Direct, Indirect, Direct memory, Relative addressing, Indexed addressing 5. What is an interrupt? Ans: It is an asynchronous event that halts the normal programs execution and divers the program flow temporarily to an interrupted routine. 6. What are the different types of interrupts? Ans: Internal, External, Software. 7. What are the 3 types of shift micro operation? Ans: Logical shift, Arithmetic shift, Circular shift.

UNIT 3 1. What is control memory? Ans: The memory unit associated with control unit which allows reading and writing of data. 2. What is micro instruction sequencing? Ans: It is a process of fetching next micro instruction to be executed from the control memory. 3. What are the techniques to derive address of next instruction to be executed? Ans: Two address field, Single address field, Variable address field. 4. What is MIR?

Ans: Micro Instruction Register. 5. What is MAR? Ans: Memory Address Register. 6. What is CAR? Ans: Control Address Register.

UNIT 4 1. What are computational errors? Ans: These errors that are caused when doing computations on a computer. 2. What are the 2 types of computational errors? Ans: Round off errors, Truncation errors. 3. What is overflow? Ans: It refers to a condition where a given storage area runs short of accommodating available quantity since the register size is fixed. 4. What is the use of fast multiplication circuits? Ans: These are used when long multiplicand is given which provides fast address structures. 5. Which algorithm is used for signed 2s complement multiplication? Ans: Booths algorithm.

UNIT 5 1. What is FIFO? Ans: FIFO replaces the page that has been in the memory for the longest period of time. 2. What is LRU? Ans: It replaces the page that has not been used for longest period of time. 3. What is RAID? Ans: Redundant Array Of Inexpensive Disks. 4. What are optical disks? Ans: Form of external storage devices which are used to store large volumes of computer data.

5. What is hit rate? Ans: It refers to ratio of no. of hits or success to total no. of attempts made. 6. What is EPROM? Ans: Erasable Programmable Read Only Memory.

UNIT 6 1. What are the different input output devices? Ans: Keyboard, Monitor, Printer, Magnetic tape, Mouse, Scanner. 2. What are the different modes used to transfer data? Ans: Simplex, half duplex, full duplex mode. 3. What is polling? Ans: It is a procedure of determining the highest priority source among all the available sources with the help of software means. 4. What is the status command? Ans: It is used to test the device or to identify its state information. 5. What is Data output command? Ans: It is used to transfer data from bus into interface registers later stored on storage devices. 6. What is I/O processor? Ans: Separate module in a system capable of interacting with almost all I/O devices. UNIT 7 1. What is SIMD? Ans: Single Instruction Multiple Data. 2. What is a branch instruction? Ans: It is an instruction that delays the execution of other pipeline operations. 3. What is a pipeline? Ans: A method that is used to decompose a sequential process into suboperations is called pipeline. 4. What is MISD? Ans: Multiple Instruction Single Data Stream. 5. What is parallel processing?

Ans: It is a concept where concurrent execution of various tasks is accomplished. 6. What is spacetime diagram? Ans: It is used to explain behavior of pipeline. UNIT 8 1. What is multiprocessor system? Ans: A system supporting interconnection structure of more than one processor. 2. What are the different levels of multistage switching networks? Ans: Omega, butterfly. 3. What is system bus? Ans: Special kind of bus that connects major components like memory, CPUs, IOP s in a multiprocessor system. 4. List different communication topologies? Ans: Hypercube, Ring, Tree, Mesh. 5. List various dynamic arbitration algorithms? Ans: Polling, LRU, FIFO, Time slice. 6. What are 2 different type of mutliprocessors? Ans: Tightly coupled, Loosely coupled.

MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE


UNIT-I : Mathematical Logic 1.Define a statement or a proposition? A.It is a well defined argument which is either true or false, but not both. 2.Any statement which doesnot contain any of the connectives is called atomic Statements (or) primary (or) primitive statement.

3.Define a universally valid formula? A.A statement formula which is true regardless of the truth values of the Statements which replace the variables in it, is called a universally valid Formula (or) a tautology or a logical truth. 4.Define contradiction? A.A statement formula which is false regardless of the truth values of the Statements which replace the variables in it, is called a contradiction. 5.DUALITY LAW: A.Two formulas A and A* are said to be duals of each other if either one can be obtained from the other by replacing ^ by v and v by ^.The connectives ^ and v are also called duals of each other. 6.Conjunctive Normal Form: A formula which is equivalent to a given formula and which consists of a Product of elementary sums is called as a Conjunctive Normal Form of The given formula.

UNIT-2 : Predicates 1.Define inference theory? A.The main aim of logic is to provide rules of inference to infer a conclusion from certain premises.The theory associated with rules of inference is known as inference theory. 2.When are a set of formulas said to be consistent? A.A set of formulas H1 ,H2 ,......, Hm is said to be consistent if their conjunction has the truth value T for some assignment of the truth values to the atomic variables appearing in H1 ,H2 ,......, Hm. 3.When are a set of formulas said to be inconsistent?

A.A set of formulas H1 ,H2 ,......, Hm is said to be inconsistent if atleast one of the formulas H1 ,H2 ,......, Hm is false for every assignment of the truth values to the atomic variables appearing in H1 ,H2 ,......, Hm 4.What is scope of the quantifier? A.The formula P(x) in (x) P(x).In other words scope of the quantifier is the formula immediately following the quantifier. 5.Define deduction? A.If a conclusion is derived from a set of premises by using the accepted rules of reasoning, then such a process of derivation is called as deduction or a formal proof and the argument is called as a valid argument or conclusion a valid conclusion.

UNIT-3 : Set Theory 1.Define a set and its elements? A.A set is a well-defined collection or class of distinct objects. The objects in a set are called is elements (or) members. 2.Define Cartesian Product? A.Let A,B be two sets. Then the Cartesian Product of A,B denoted by A x B and it is defined as set of all ordered pairs (a,b) where a E A , b E B. 3.Define Equivalence relation? A.A relation R on a set A is said to be an equivalence relation on A if: a. R is reflexive on A. b. R is symmetric on A.

c. R is transitive on A. 4.Methods for representing relations? A.(i).Matrix Method (ii).Directed graph method 5. Define Compatibility Relations? A.A relation R in x is said to be a Compatibility Relation if it is reflexive or symmetric. 6.What is a partial order relation? A. A relation R on a set P is called a partial order relation or a partial ordering in P iff R is reflexive, anti symmetric and transitive.

UNIT-4 : Algebraic structures 1.Define Groupoid or Quasi Group? A.A set G with a binary operation O defined on it is called a groupoid or a quasi group.Thus (G , O) is a groupoid or a quasi group. 2.What is semi group? A.An algebraic structure (S,o) is said to be a semi group if o is associative in S. 3.Define a Sub semi group? A.Let (S,o) be a semi group. A subset T of S is said to be a Sub semi group w.r.t O if (T.O) is a semi group. 4.What is the difference between infinite group and a finite group ? A.A group (G,O) is said to be finite group if G contains a finite number of distinct

elements.Otherwise the group (G,O) is called infinite group. 5.Define an abelian group?(Commutative property) A. A group (G,O) is said to be abelian group(commutative group) if a o b = b o a 6.Define subgroup? A. Let (G,O) be a group.Let H be a non empty subset of G such that (H,O) be a group.Then H is called a subgroup of G.

UNIT-5 : Elementary Combinatorics 1.What are the two basic counting principles? (i). Sum rule or Disjunctive rule. (ii). Product rule or Sequential rule. 2.Define Combination? A.A Combination of n objects taken r at a time called an unordered selection of r (r<n) of the n objects. (an r-combination of n objects)

3.Define Permutation? A. A Permutation of n objects taken r at a time called an ordered selection of r of the n objects. (an r-Permutation of n objects)

4.Symmetry Property : C (n,r)= C (n,n-r)

5.Pascals Identity : C(n,r) = C(n-1, r-1) + C(n-1,r) 6.Pascals row sum identity : C(n,0) + C (n,1) + C (n,2) + ..+ C (n,n)=2n

UNIT-6 : Recurrence Relation 1.What is a recurrence relation? A.A recurrence relation for the sequence {an} is an equation that expresses an in terms of one or more of the sequence , namely a0, a1, a2, .,an-1 , for all integers n>=1. Recurrence relation is also called as Difference equation. 2.Define Fibonacci Recurrence Relation? A.The recurrence relation Fn = Fn-1 + Fn-2, n>=2 with initial conditions F0 = F1 =1 is known as Fibonacci Recurrence Relation (or) Fibonacci numbers. 3.What is the solution of a recurrence relation? A.A sequence {an}n=0 is said to be a solution of a recurrence relation if each value an (i.e), a0, a1, a2, ., an ..... satisfies the recurrence relation. 4.What are the methods for solving recurrence relation? A.(i).Substitution (Iteration) (ii).Generating Functions (iii).Characteristic roots.

5. What are the methods for solving Inhomogeneous Linear recurrence relation? A.(i).Characteristic roots method (ii).Generating Functions

UNIT-7 : Graph Theory 1.Define a Graph? A.A Graph is a pair of sets (V,E) where V is a non-empty set and the elements of E are pairs of elements of V. 2.Define digraph? A.If the elements of E are ordered pairs denoted as (u,v) then G is called as a directed graph(digraph). 3.Define spanning tree? A. A subgraph H of a graph G is called a spanning tree of G if (i). H is a tree, (ii). H contains all the vertices of G. 4.When a graph is said to be planar? A.A graph is said to be planar if it can be drawn in a plane so that its edges do not cross over. 5.Define a Complete Graph? A.A graph with `n vertices so that each of the `n vertices are adjacent to each of the other n-1 vertices is called a complete graph and is denoted by kn.

6.Define a Tree? A.A Tree T is a connected graph without cycles.

UNIT-8 : Graph Theory and Applications 1.Define walk? A. A walk is a finite alternating sequence of vertices and edges v0e0v1e1......envn. Such that ei = ( vi-1 , vi ), 1<=i<=n. If v0=vn it is called as a closed walk, otherwise it is an open walk. 2.When are two graphs isomorphic? A. Two graphs G1 and G2 are isomorphic if there is a function f:V(G1) -> V(G2) such that (i) f is one-to-one. (ii) f is onto (iii) f preserves adjacency 3.Define multigraph? A. A graph containing parallel edges is called a multigraph. 4.What is an Euler Path and an Euler Circuit? A.An Euler Path in a multigraph is a path that includes each edge of the multigraph exactly once and intersects each vertex of the multigraph at least once. An Euler circuit is an Euler Path whose end points are identical. 5.Define Hamiltonian path, Hamiltonian cycle and Hamiltonian graph?

A.A path in a graph G is called a Hamiltonian path if it contains every vertex of G. A cycle in a graph G is called a Hamiltonian cycle if it contains every vertex of G. A graph G is said to be a Hamiltonian graph if it contains Hamiltonian cycle 6.Define vertex colouring? A.A vertex colouring of a graph G is an assignment of colors to the vertices of G, one colour to each vertex , so that adjacent vertices are assigned different colors.

ACA VIVA QUESTIONS UNIT-1:1) What is the difference between price and cost? A) Price is the amount for which we sell a finished good, whereas cost is the amount spent to produce it. 2) What is the use of Amdahls law? A) The performance gain that can be obtained by improving some portion of a computer can be calculated by using Amdahls law. Or It defines the speed up. 3) What is speed up? A) It tells us how much faster a task will run using the machine with enhancement as opposed to the original machine.

i.e.,It is the ratio of performance for entire task with enhancement to the performance for entire task without enhancement 4) What is CPU performance equation? A) CPU time=CPU clock cycles for a program * clock cycle time 5) What is IC? A) IC stands for Instruction Count. It is the no. of instuctions executed in a program. It is also called as Instruction path length. 6) What are the factors that affect cost of a computer design? How? A) Factors that affect cost of computer Commodification. design are Time, Volume,

Time:- As manufactured product gets older, cost of it decreases. Learning curve states that Manufacturing costs decreases over time. Volume:- Cost of a product decreases with increase in volume. Commodification:- Commodities are the similar type of products sold by different vendors in large volumes. Cost is decreased because, the vendors sell their commodities at lower prices inorder to attract customers. 7) On what characteristics CPU performance depends? A) It depends on Clock rate, CPI(Clock cycles per Instruction), IC(Instruction Count).

UNIT-2:1)What is Addressing Mode? A) It is the way of specifying address of the operand. 2) What are the different types of Addressing Modes and what is Immediate AM? A) Register AM, Immediate AM, Direct AM, Register Indirect AM, Indexed AM, Autoincrement AM, Autodecrement AM, Displacement AM. In Immediate AM, the actual operand(a constant value) is specified in instruction itself. Eg:- ADD R1 , #4 ( i.e., [R1] <- [R1]+4)

3) What are different types of optimizations performed by modern compilers? A) High level optimization, Local optimisaion, Global optimization, Register Allocation, Processor-dependent optimization. 4) What are different control transfer instructions?

A) Branch, Jump, Procedure call, Return. 5) What is accumulator? A) It is a special register where CPU stores the result of any operation. 6) How is a memory address interpreted? A) There are two ways for ordering of bytes. They are i. ii. Little endian format:- In this byte0 is kept at least significant position (LSB) . Big endian format:- In this byte0 is kept at most significant position (MSB).

7) What are different types of Global opimisations? A) Types: i. ii. iii. iv. UNIT-3:1)What is the data structure that is used to store Activation Records? A) Stack is used to store Activation Records. 2) What is branch-prediction buffer? A) It is a small memory that contains a bit that says whether the branch was recently taken or not. 3) Expand VLIW and EPIC? A) VLIW - Very Long Instruction Word EPIC - Explicitly Parallel Instruction Computers 4) What are different types of dependencies? A) Data dependencies, Name dependencies, Control dependencies 5) What is formula for cache CPI? Global common sub-expression elimination Copy propagation Code motion Induction variable elimination

A) Cache CPI=Misses per instruction * Miss penalty where, Miss penalty=Memory access time / Clock cycle 6) What is data hazard and what are the types of hazards? A) Data hazards occur when two or more instructions are dependent on each other in such a way that any overlap or reordering carried out on these instructions will change the program order. Types of hazards:i. ii. iii. RAW (Read After Write) WAW (Writer After Write) WAR (Write After Read)

UNIT-4:1)What is meant by static branch prediction? A)Static predictors are the predictors used in processors so as to predict the behavior of branching at compile time. 2)What is meant by copy propagation? A)The copy-propagation technique is an optimization technique that performs algebraic simplifications of expressions and removes those operations that copy values. 3)What is meant by Speed Penalty? A)When compared to unconditional instructions, conditional instructions have slow clock rates. Thus, conditional instructions have some speed penalty. 4)What the two methods for global code scheduling?

A)The two methods for global code scheduling are, i. Trace scheduling. ii. Super Blocks. 5) What is software pipelining? A)Software pipelining is a compiler technique that reorganizes loops in such a way that, the instruction in the iterations of the original loop are used to form the iterations in the software-pipelined code. 6) Explain VLIW approach? A)VLIW is the abbreviation for Very Long Instruction Word. VLIW approach is an architectural approach that uses several wide instructions of size 64 to 128 bits or more and defines multiple operations within a single instruction.The instruction formats of previous versions of VLIWs were very rigid. The programs to be recompiled for different hardwares are also required.

UNIT-5:1)What is meant by cache hit? A)Whenever cpu needs a word,it accesses the cache memory to check whether the requested word is available or not.If the requested word is present then it is fetched from a cache.This is referred as a cache hit. 2)What is meant by page fault? A)When the cpu needs a word and encounters a cache miss then the main memory is accessed for reading the required word .But, if the requested item in a page is not present even in main memory then such a failure is called page fault. 3)Define Hit Ratio? A)Hit ratio is defined as the number of hits divided by the sum of hits and misses.Mathematically,

Hr=H/(H+M) Where, H is the number of hits and M is the number of misses.Higher hit ratios are always desired as they affect the average memory acces time. 4}Describe virtual memory? A)Virtual memory is a memory, which logically divides the physical memory, into blocks and assigns them to their respective processes. 5)What is the advantage of segmentation? A)Segmentation divides the address space, so that smaller addresses are present in small segments thereby preventing the internal fragmentation issue. 6)Explain about Least-Recently Used(LRU) ? A)Least-Recently Used replacement is based on principle of locality of reference, which states that recently used blocks are highly probable to be used again and therefore cannot be replaced.Thus, instead of replacing those blocks LRU replaces the block that has not been used for a longer period of time. UNIT-6:1)What are the two applications that fall under commercial work load? A)The two applications that fall under commercial work load are, i. ii. OLTP(On Line Transaction Processing). Alta Vista.

2)How does multiprocessors get the name shared memory? A)Multiprocessors consisting of shared address space which is used to communicate data implicitly using the load and store instructions which is called as shared memory multiprocessors. 3)What are the properties of cache coherence? A)Cache memories in a symmetric memory-architecture provide two properties to maintain cache coherence.The two properties are, i. Migration Property.

ii.

Replication Property.

4)What is meant by uncached state? A)In tis state, no processor stores a copy of the cached block. 5)What are different types of coherence misses? A)Coherence misses are of two types: i. ii. True Sharing Misses. False Sharing Misses.

6)Define Synchronization? A)Synchronization is a feature which allows atomic execution of instructions wherein execution of one instruction is not dependant on other instruction. This feature helps in preserving cache coherence as only independent instruction to execute atomically preventing write serialization problems. It is advantageous for a small scale multiprocessor, where contention for data is low.

Unit-7:1)What is an I/O Bus Standards? A)An I/O bus is the interface between the cpu and I/O devices.Thus the I/O bus standard can be used as a guiding document for designing I/O buses and computer systems independently. 2)Why Embedded systems use flash memory? A)Embedded systems use flash memory instead of magnetic disks.However, they used flash as a re-writable ROM for upgrading software without replacing chips. 3)What is meant by Average Rotation Time? A)Rotation time (or) rotation latency (or)rotational delay is the time taken by the requested sector to rotate under the read/write head. It is measured in RPM(Rations Per Minute. 4)What is meant by Average Seek Time?

A)Seek time is the time taken to move the arm to the track requested by the disk controller. 5)Which RAID Level is better for higher level of reliability? A)If higher level of reliability is required then the RAID level 6 is the good choice. 6)What is meant by Flash Memory and its uses? A)Flash Memory is a non volatile,block erasable and block erasable memory. It can be erased without unplugging it from circuit. USES: Flash Memories are used mainly in digital cameras as film for storing pictures.They have an access time of 50ns, which is most desired.

UNIT-8:1)What is LAN and WAN and give examples? A) LAN (Local Area Network) is a network for machines in a building or campus, such as Ethernet. WAN (Wide Area Network) is a network across a continent, such as ATM (Asynchronous Transfer Mode). 2) What is checksum? A) It is a field of a message for an error detection code. 3) What is payload? A) It is the middle part of the message that contains user information. 4) What are the different performance parameters of interconnection networks? A) Bandwidth, Time of Flight(ToF), Transmission Time, Transport Latency, Sender Overhead, Receiver Overhead.

5) What is the message format for a network? A) It consists of 2 bits header, 32 bits payload(data), 4 bits trailer(checksum). The header part may be a) 00 Request b) 01 Reply c) 10 Ack. Request d) 11 Ack. Reply 6) What are the components of Fiber Optics? A) A Fiber Optic network has 3 components i. ii. iii.
iv. v. vi. vii. viii. ix. x. xi. xii. xiii. xiv. xv. xvi. xvii. xviii. xix. xx. xxi. xxii. xxiii. xxiv. xxv. xxvi.

Transmission medium, a fiber optic cable The light source, an LED or laser diode The light detector, a photodiode
COMPUTER NETWORKS UNIT1 1. Define Network? A network is a set of devices connected by physical media links. A network is recursively is a connection of two or more nodes by a physical link or two or more networks connected by one or more nodes. 2.What is protocol,interface? Protocol is an agreement between communicating parties on how communication is proceed. Interface defines which primitive operations and services the lower layer makes available to upper ones. 3. What is a node? A network can consist of two or more computers directly connected by some physical medium such as coaxial cable or optical fiber. Such a physical medium is called as Links and the computer it connects is called as Node. 4.What are the different types of switching? There are 3 different types of switching Circuit swiching Message switching(it is not presently used) Packet swiching 5.what are different guided media? Twisted pair Shielded twisted pair Un shielded twisted pair

xxvii. xxviii. xxix. xxx. xxxi. xxxii. xxxiii. xxxiv. xxxv. xxxvi. xxxvii. xxxviii. xxxix. xl. xli. xlii. xliii. xliv. xlv. xlvi. xlvii. xlviii. xlix. l. li. lii. liii. liv. lv. lvi. lvii. lviii. lix. lx. lxi. lxii. lxiii. lxiv. lxv. lxvi. lxvii.

Coaxial cable Fiber optics 6.Expand PSTN? Public switched telephone network UNIT-2 7. What are the responsibilities of Data Link Layer? The Data Link Layer transforms the physical layer, a raw transmission facility, to a reliable link and is responsible for node-node delivery. a. Framing b. Physical Addressing c. Flow Control d. Error Control e. Access Control 8. What are the types of errors? a. Single-Bit error In a single-bit error, only one bit in the data unit has changed b. Burst Error A Burst error means that two or more bits in the data have changed. 9. What are the Data link protocols? Data link protocols are sets of specifications used to implement the data link layer. The categories of Data Link protocols are 1. Asynchronous Protocols 2. Synchronous Protocols a. Character Oriented Protocols b. Bit Oriented protocols 10. What is Framing? Framing in the data link layer separates a message from one source to a destination, or from other messages to other destinations, by adding a sender address and a destination address. The destination address defines where the packet has to go and the sender address helps the recipient acknowledge the receipt. 11.What are various collision-free protocols? Bitmap protocol Binary countdown protocol 12.What are the services of 802.11? Association Disassociation Reassociation Distribution Integration Unit_3 13.Expand FDDI?

lxviii. lxix. lxx. lxxi. lxxii. lxxiii. lxxiv. lxxv. lxxvi. lxxvii. lxxviii. lxxix. lxxx. lxxxi. lxxxii. lxxxiii. lxxxiv. lxxxv. lxxxvi. lxxxvii. lxxxviii. lxxxix. xc. xci. xcii. xciii. xciv. xcv. xcvi. xcvii. xcviii. xcix. c. ci. cii. ciii. civ. cv. cvi.

Fiber Distributed Data Interface 14. What are the responsibilities of Network Layer? The Network Layer is responsible for the source-to-destination delivery of packet possibly across multiple networks (links). a. Logical Addressing b. Routing 15.Explain virtual circuit mechanism of transferring packets in network layer? Virtual circuit is a connection oriented mechanism of transmitting data between source and destination. Establish the connection Transmit the packets Release the connection 16.What is routing table? Routing table contains a metric which is used to perform routing. 17. What is the range of addresses in the classes of internet addresses? Class A - 0.0.0.0 - 127.255.255.255 Class B - 128.0.0.0 - 191.255.255.255 Class C - 192.0.0.0 - 223.255.255.255 Class D - 224.0.0.0 - 239.255.255.255 Class E - 240.0.0.0 - 247.255.255.255 18.What are internet control protocols? ICMP ARP RARP BOOTP DHCP UNIT-4 19. What is traffic shaping? One of the main causes of congestion is that traffic is often busy. If hosts could be made to transmitat a uniform rate, congestion would be less common. Another open loop method to help manage congestion is forcing the packet to be transmitted at a more predictable rate. This is called traffic shaping. 20. What are the responsibilities of Transport Layer? The Transport Layer is responsible for source-to-destination delivery of the entire message. a.Service-point Addressing b.Segmentation and reassembly c.Connection Control d.Flow Control e.Error Control

cvii. cviii. cix. cx. cxi. cxii. cxiii. cxiv. cxv. cxvi. cxvii. cxviii. cxix. cxx. cxxi. cxxii. cxxiii. cxxiv. cxxv. cxxvi. cxxvii. cxxviii. cxxix. cxxx. cxxxi. cxxxii. cxxxiii. cxxxiv. cxxxv. cxxxvi. cxxxvii. cxxxviii. cxxxix. cxl. cxli. cxlii. cxliii. cxliv. cxlv. cxlvi.

21.What are properties of TCP protocol? Connection oriented Reliable End to end protocol 22.What is port no of FTP,SMTP,HTTP? FTP-21 SMTP-25 HTTP-80 23.EXPAND DNS? Domain Name System Protocol used for mapping IP address with domain name 24. What are the responsibilities of Application Layer? The Application Layer enables the user, whether human or software, to access the network. It provides user interfaces and support for services such as e-mail, shared database management and other types of distributed information services. a. Network virtual Terminal b. File transfer, access and Management (FTAM) c. Mail services d. Directory Services 25.What is www? The World Wide Web is an architectural framework for accessing linked documents spread over millions of machines over the internet. NETWORK PROGRAMMING UNIT-5 ELEMENTARY UDP SOCKETS 1.What are the functions involved in the UDP client/server environment? A. The functions involved in the UDP client/server environment are socket(), bind(), sendto(), recvfrom(). 2. What are demerits of UDP echo client server over TCP echo client server? A. It cannot detect lost packets, cannot perform retransmission. 3.Write the syntax for recvfrom( ) function? ssize_t recvfrom(int sockfd, void *buff, size_t nbytes, int flags, struct sockaddr *from, socklen_t *addrlen); 4. Write the syntax for sendto( ) function? ssize_t sendto (int sockfd, void *buff, size_t nbytes, int flags, struct sockaddr * sendto, socklen_t *addrlen); 5.What is a socket? write syntax for socket( ) function? A. socket creates the logical connection between client and the server. Syntax: socket(int family, int type, int protocil); 6. Write syntax for bind( ) function?

cxlvii. cxlviii. cxlix. cl. cli. clii. cliii. cliv. clv. clvi. clvii. clviii. clix. clx. clxi. clxii. clxiii. clxiv. clxv. clxvi. clxvii. clxviii. clxix. clxx. clxxi. clxxii. clxxiii. clxxiv. clxxv. clxxvi. clxxvii. clxxviii. clxxix. clxxx. clxxxi. clxxxii. clxxxiii.

A. bind( int sockfd, struct sockaddr *myaddr,socklen_t addrlen); UNIT-6 ELEMENTARY NAME AND ADDRESS CONVERSIONS 1.What is DNS? DNS is a heirarchial distribution method of name spaces. it maps the host names with the ip adresses. 2.What is resource record and what are the type of records? The entries in the dns are reffered as resource records. tthey are A, AAAA, PTR, MX, CNAME 3.Write about gethostbyname() function? The gethostbyname function maps the given hostname into ip address. 4.Write about gethostbyaddr() function? The gethostbyaddr function maps the given ip address into its hostname. 5.Write about uname function? The uname function returns the name of the current host. syntax : int uname(struct utsname *name); 6.Write about gethostname function? The gethostname function returns the name of the current host along with access information. UNIT-7 INTERPROCESS COMMUNICATION 1.What are the different methods of IPC? 1.Pipes 2.FIFOs 3.Semaphores 4.Shared memory 2.What are named pipes? FIFOs are also called named pipes.They provide unidirectional(half duplex)flow of data.In FIFOs, data is read in first in first out order.i.e it is read in the order in which it was written. 3.What is file locking? File locking is a process of locking an entire file.When a process locks a file,it ensures that other processes cannot examine or modify the file unti is unlocked by the first process. 4.What is record locking? Record locking is a process of locking the portion of a file.It is also called ad regions locking..the application can partition a file into as many arbitrarily sized regons or records that it wants and lo0ck a specificn region by specifying a file offset and the length of record. 5.What are Message queues?

clxxxiv. clxxxv. clxxxvi. clxxxvii. clxxxviii. clxxxix. cxc. cxci. cxcii. cxciii. cxciv. cxcv. cxcvi. cxcvii. cxcviii. cxcix. cc. cci. ccii. cciii. cciv. ccv. ccvi. ccvii. ccviii. ccix. ccx. ccxi. ccxii.

ccxiii.

Message queue is a form of system VIPC that store a linked list of messages.messages are unidirectional i.e the data can flow in the both directions. 6.What is a Semaphore? Semaphore allow multiple processes to synchronize their execution.A semaphore is a memory location whose valu can be tested and set by more than one process. 7.What is a Shared memory? Shared memory is the fastest form of IPC.It allows multiple processes to share a common region of memory. UNIT-8 REMOTE LOGIN 1.What is a terminal? A terminal is a full duplex device that is it has two seperate paths for input and output. 2.What is a pseudo-terminal? A pseudo-terminal is a pair of master and slave devices. the user process opens the pair of devices and obtains the file descriptors associated with each device. 3.Write about grantpt( ) function? This function grants access to the slave pseudo-terminal device associated with a master pseudo-terminal device by changing its mode and ownership. 4.What are the three modes of terminal device? The three modes of terminal device are 1. cooked mode 2.raw mode 3.cbreak mode. 5.Write about rlogin? The remote login process involves a remote login client and remote login server. the system through which the ruser logs is called remote system. 6.Write about unlockpt() function? This function unlocks the slave pseudo-terminal device associated with a master pseudoterminal device it has only one argument called mfd. syntax : int unlockpt(int mfd);

MOBILE COMPUTING

VIVA QUESTIONS

Unit 1 Introduction to Mobile Communications & Computing

1. Define the term Wireless. A. The term Wireless is used with reference to a device which accesses a network or other communication devices with out a wire. Here the wire is replaced by the electromagnetic wave transmission through air.

2. What is GSM? A. The most successful digital mobile system in present generation is Global System for Mobile Communications. The main aim aim of GSM was to provide a mobile phone system that allows roaming and service compatibility with others.

3. What are the services offered by GSM? A. GSM provides three categories of services. They are Bearer Services Tele services Supplementary services

4. What are the subsystems consists of GSM? A. Radio Subsystem Networking and Switching Subsystem Operation Subsystem

5. What are the different kinds of Hand over GSM? A. There are four possible handover scenarios in GSM:

Intra-Cell handover Inter-Cell, intra-BSC handover Inter-BSC, intra-MSC handover Inter MSC handover

6. Explain the terms Mobile and Wireless A. The Mobile is used in communications to express two types of mobility. They are User mobility and device portability. In user mobility the user is mobile and the services follow him. For eg, the call forwarding facility in telephones which support roaming. In device portability the communication device moves with or without a user. For eg, the mobile phone system hands the device from one base station to other.

Unit 2 (Wireless) Medium Access Control

7. Explain Hidden and Exposed terminals. A. Consider the scenario with three mobile phones A, B, C. The transmission ranges of A reaches B, but not C. The range of C reaches B, but not A. The range of B reaches both A & B. A is hidden terminal for C and vice versa. C & A are exposed terminals to B.

8. What is meant by SDMA? A. Space Division Multiple Access is used for allocating a separated space to users in wireless networks.

9. Explain FDMA A. Frequency Division Multiple Access contains all algorithms allocating frequencies to transmission channels according to Frequency Division Multiplexing scheme. Allocation can either be fixed or dynamic.

10. What is spread Aloha multiple access? A. Spread Aloha Multiple access is a combination of CDMA and TDMA. Here each sender uses the same spreading code and access the medium at the same time which causes collision. The same can be transmitted sending the higher power for a shorter period.

11. How to avoid hidden and exposed terminals problem? A. Multiple Access with Collision Avoidance is a scheme that solves the hidden and exposed terminals problem. This scheme involves in the usage of RTS-Request To Send and CTS-Clear To Send.

12. What is CSMA and what are their versions? A. Carrier Sense Multiple Access is based on the fact that each terminal on the network is able to monitor the status of the channel before transmitting information. Hence this reduces the chance of happening collisions expect in case of hidden terminals. There exist several versions of CSMA: 1. Non-persistent CSMA. 2. P-persistent CSMA. 3. 1-persitent CSMA 4. CSMA/CA 5. EY-NYMPA(Elimination yield-non-preemptive multiple access).

Unit 3 Mobile Network Layers

13. What are the requirements of Mobile IP? A. Compatibility Transparency Scalability and efficiency

Security

14. What are the entities of mobile IP? A. Mobile Node, Correspondent Node, Home Network, Foreign Network, Foreign Agent, Care-of address, Home Agent.

15. What is Agent discovery? A. One initial problem of mobile node after moving is how to find a foreign agent. For this purpose mobile IP describes two methods: 1. Agent advertisement. 2. Agent solicitation.

16. What is the main purpose of Registration? A. The main purpose of registration of a mobile node is to inform the home agent of the current location for correct forwarding of packets. Registration can be done in two different ways depending on the location of the COA.

17. Why is DHCP is required? A. Dynamic Host Configuration Protocol is mainly used for the simplification of installation & maintenance of networked computers. DHCP is used to provide all the necessary information for full system integration into network. Eg., address of DNS servers.

18. What is meant by tunneling and encapsulation? A. Tunneling: A tunnel establishes a virtual pipe for data packets between tunnel entry and a tunnel end point. Packets entering a tunnel are forwarded inside the tunnel and leave the tunnel unchanged. Tunneling is process of sending a packet through a tunnel and this is achieved through encapsulation. Encapsulation: It is the process of taking a packet consists of packet header and data & putting it into the data part of new packet. Both tunneling & encapsulation are used for forwarding packets between HA & COA.

Unit 4 Mobile Transport Layer

19. What are the several mechanisms that influence TCP in mobile environment? A. Several mechanisms of the transmission control protocol that influence the effiency of TCP in mobile environment are Congestion Control Slow Start Fast retransmit/fast recovery Implications on mobility

20. What are the insights that led to the development of I-TCP? A. Two competing insights led to the development of Indirect TCP. One is that YCP performs poorly together with wireless links, the other one is that TCP within the fixed network cannot be changed.

21. What is I-TCP? A. I-TCP segments a TCP connection into a fixed part and a wireless part.

22. What is Snooping TCP? A. Snooping TCP is the enhanced version of I-TCP which overcomes the disadvantage of it. The main function of enhancement is to buffer data close to the mobile host to perform fast local retransmission in case of packet loss.

23. What is M-TCP?

A. Mobile TCP tries to improve overall throughput, to lower the delay, to maintain end-to-end semantics of TCP and to provide a more efficient handover. The M-TCP basically splits the TCP connection and chokes the sender through the window size.

24. What is selective retransmission? A. TCP acknowledges are cumulative i.e., they acknowledge the ordered receipt of packets up to a certain packet. If single packet is lost then sender has to retransmit everything starting from the lost packet, this wastes bandwidth. Hence TCP can indirectly request the selective retransmission.

Unit-5 Database Issues

25. What are the four possible states of the cache at a mobile device? A. 1. Modified State 2. Exclusive State 3. Shared State 4. Invalidation State

26. What is QoS? A. Quality of Service is the mechanism that controls reservation of resources i.e., It prioritizes the applications, users or data flows

27. What are the three Cache Access Protocols? A. TCP (Encapsulating Protocol) UDP (Connectionless Protocol) ASCII (Proxy-Http Protocol)

28. What is the various quality issues related to mobile database computing?

A. Fault tolerance (Connectivity and Data Sharing), Heterogeneity, Openness and Scalability

29. What is Prefetching? A. Prefetching is a method for obtaining early information for the user It is based in evaluation of users former interests and priorities

30. What is power aware computing and context aware computing? A. Power aware computing is the process that reduces power consumption of mobile devices for computing different processors Context aware computing system is a system that utilizes the entities such as users , devices in order to be aware of the post and present affairs which includes the battery life and the activities performed by a device user in the past

Unit-6 Data Dissemination

31. What is Pull-Based mechanism? A. In Pull based mechanism, the user or client makes an explicit request for the data i.e., the user pulls the data from the channel

31. What is Push-Based mechanism? A. In Push based mechanism, the server broadcasts the data to all the receivers or clients. The data is explicitly pushed or enters the clients

32. What is signature indexing? A. It is an indexing technique used by the mobile clients in order to retrieve the information frames. This technique broadcasts signatures along with data frames

33. What are several indexing techniques? A. Distributed Indexing Method Flexible Indexing Method Hashing Signature Indexing Hybrid Indexing

34. What are the three temperature states assigned to data items by adaptive hybrid broadcast method? A. Vapor - Heavily Requested Liquid - Moderately Requested Frigid - Least Frequently Requested

35. Which method is the best suited for wireless data broadcasting? A. Hybrid method, because the hybrid method enjoys advantages of both index tree method and signature method It has low tune-in time and low access time overhead, which consequently increases the overall efficiency.

Unit 7 Mobile Ad hoc Networks

36. What are the challenges faced by mobile ad-hoc networks? A. Spectrum allocation and purchase. Media access Routing Multi Casting

Energy efficiency

37. What are the issues that are to be considered by successful ad-hoc wireless internet? A. Gateways Address Mobility Routing Transport layer protocol Load Balancing

38. What are the different kinds of routing algorithms? A. Classification of routing algorithms based on the variations in network topology are: Routing information update mechanism Use of temporal information for routing Routing topology Utilization of specific resources

39. What are the complications formed in routing in ad-hoc networks? A. Asymmetric links Redundant links Interference Dynamic topology

40. Dynamic source routing divides the task of routing into two separate problems. What are they? A. Route discovery Route maintenance

41. Mention any few advantages of MANETs. A. MANET has the capability of establishing the networks quicker and faster

MANET depends upon the wireless transmission links which consumes very less power than wired links

42. Mention any disadvantages of MANETs. A. Because of wireless transmission, only limited physical security is provided.

MANET has a dynamic topology and the periodic changes occurring in the topology are different to predict.

43. What are the security problems in mobile and wireless computing system? A. Confidentiality Integrity Pre-keying Availability Non-repudiation Mobility risks Eavesdropping

Unit-8 Protocol and Tools

44. Define WAP. A. Wireless Application Protocol forum is a standard for wireless web access and was formed in 1997 by Ericsson, Motorola and Nokia. The main objective of WAP forum are to bring diverse internet content and other data services to digital cellular phones and other wireless, mobile terminals.

45. Expand the following

WAE - Wireless Application Environment WSP Wireless Session Protocol WTP Wireless Transaction Protocol WDP Wireless Datagram Protocol

46. What is WML? A. Wireless Markup Language is a markup language which enables the formatting of text in the WAP environment. It describes the structure of document to be delivered to the wireless devices.

47. What is WML script? A. WML script is a language which defines the format of the down-loadable client logic that can be executed within the client browser.

48. What are different user scenarios of Bluetooth? A. Connection of peripheral devices Support of ad-hoc networking Bridging of networks

49. What is Bluetooth? A. It is a wireless protocol which uses a short range radio technology to simplify data transmission among internet devices over short distance.

50. What is PICONET? A. A piconet is a formation of network units. Piconet is a combination of PICO and NET, where PICO means very small or one trillionth and NET for network. PICONET is also sometimes referred as PAN (personal area network).

Artificial Intelligence and Neural Networks

Comprehensive Viva

Unit -1 -Introduction & Intelligent Agents


9. 7. 10. 7.

What is the Definition of knowledge? Knowledge is defined as the piece of information that helps in decision-making . Definition of AI ? Part of Computer Science concerned with designing intelligent systems that exhibit the characteristics we associate with intelligence in human behavior. What is an Expert System ? An expert system is a computer program designed to act as an expert in a particular domain also known as knowledge based system.

11. 7.

12. The most common methods of problem representation in AI are ? A. 1. State space representation 2. Problem reduction

5) Definition of an Agent ? A. An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators
1. A.

what is meant by Agent Programme? Agent program Agent function for an artificial agent will be implemented by agent program.

UNIT -2-Solving Problems By Searching


1. A.

What is meant by goal formulation ? based on the current situation and the agents performance is the first step in problem solving. What is meant by problem formulation ? Problem formulation is the process of deciding what actions and states to consider given a goal.

2. A.

What is meant by search ? A. An agent with several immediate options of unknown value can decide what to do by first examining different possible sequences of actions that lead to states of known value and
3.

then choosing the best sequence. This process of looking for such a sequence is called search.

What is meant by Breadth first search ? A. Root node is expanded first, and then all the successors of root node are expanded next and so on. 5) what is meant by depth first search ?
4.

A. Expands deepest node in current fringe of search tree, search proceeds immediately to the deepest level of search tree where nodes have no successors. As those nodes are expanded they are dropped from the fringe, then the search backs up to the next shallowest node. This is implemented with LIFO queue also known as stack. 6) what is meant by back tracking search ? A. uses less memory compared to DFS. Only one successor is generated at a time rather than all successors, each partially node expanded node remembers which successor to generate next.

UNIT-3- Logical Agents

1. A.

What is meant by Knowledge based agent ? The central component of a knowledge based agent is its knowledge base or KB. A knowledge base is a set of sentences. Each sentence is expressed in a language called a knowledge representation language. For adding new sentences to the knowledge base and for querying, we use tasks called TELL and ASK respectively. Both these tasks involve inference that is deriving new sentences from old. What is meant by Grounding ? It is the connection between logical reasoning processes and the real environment in which the agent exists. Agents sensors help in creating this connection What is meant by proposition symbol. ? The syntax of propositional logic defines allowable sentences. The atomic sentences the indivisible syntactic elements consist of a single proposition symbol.

2. A.

3. A.

4. A.

Briefly explain about Wumpus World problem ?


The Wumpus World is a cave consisting of rooms connected by passageways. There is a beast called wumpus inside the cave that eats anyone who enters its room. The wumpus can be shot by an agent but the agent has only one arrow. Some rooms contain bottomless pits that will trap anyone who wanders into the room. The only feature or goal is to find a heap of glittering gold.

5. A.

What is meant by inference ? Inference is the act or process of deriving logical conclusions from premises known or assumed to be true.The conclusion drawn is also called an idiomatic. The laws of valid inference are studied in the field of logic.

Brief note on Back ward chaining ? A. The back ward chaining algorithm works backward from the query. If the query q is known to be true, then nothing has to be done UNIT-4- First order logic
6.

1) what is meant by universal quantifier ? A. universal quantifier - a logical quantifier of a proposition that asserts that the proposition is true for all members of a class of things 2) what is meant by existential quantifier ? A. existential quantifier - a logical quantifier of a proposition that asserts the existence of at least one thing for which the proposition is true 3) What is meant by a proportional logic ? A. a proposition is a possible condition of the world about which we want to say something. The condition need not be true in order for us to talk about it. In fact, we might want to say that it is false or that it is true if some other proposition is true. 4) first order inference rule ? A. If there is some substitution that makes the premise of the implication identical to sentences already in the knowledge base, then conclusion of the implication can be asserted after applying .

5) what is meant by resolution ? A. The resolution procedure is a simple iterative process. At each step two clauses, called the parent clause are compared (resolved) yielding a new clause that has been inferred from them. The new clause represents ways that the 2 parents clauses interact with each other. 6) functioning of set of support strategy ? A. Set of support This strategy starts by identifying a subset of sentences called the set of support. Every resolution combines a sentence from the set of support with another sentence and

adds the resolvent into the set of support. If the set of support is small relative to the whole knowledge base, the search space will be reduced drastically.

UNIT-5- Characteristics of Neural Networks 1) what is meant by processing unit ? A. An artificial neural networking (ANN) is a highly simplified model of the structure of the biological neural network. An ANN consists of interconnected processing units. The general model of a processing unit consists of a summing part followed by an output part. The summing part receives N input values, weights each value and computes a weighted sum. The weighted sum is called the activation value. The output part produces a signal from the activation value. 2) what are meant by interconnections ? A. Several processing units are interconnected according to some topology to accomplish a pattern recognition task. Therefore the inputs to a processing unit may come from the outputs of other processing units and/or from external sources. The output of each unit may be given to several units including itself. The amount of the output of one unit received by another unit depends on the strength of the connection between the units and it is reflected in the weight value associated with the connecting link. The set of N activation values of the network defines the activation state of the network at that instant. The set of N output values of the network define the output state of the network at that instant. 3) Expand Adaline ? A. Adaptive Linear Element is a computing model proposed by Widrow 4) What is meant by weight space ? A. The set of all weights on all connections in a network form a weight vector. The set of all possible weight vectors define the weight space 5) three classical models of neurons ? A. 1) McCulloch Pitts model 2)perceptron model 3)adaline model

UNIT-6- Feed Forward Neural Networks


1. A.

Describe feed forward network ? Simplest feed forward network is a two layer network with M input units and N output units. Each input unit is connected to each of the output units and each connection is associated with a weight or strength of the connection. Input units are linear and perform fan out task. Output units are linear or non linear depending on the task that the network

should perform. Feed forward networks are used for pattern association or pattern
classification or pattern mapping. What is basin of attraction ? A. Each attractor is encompassed by a distinct region of its own such region is called as
2.

basin of attraction
3.

UNIT-8 - Competitive Learning Neural Networks & Complex pattern Recognition 1) what are components of competitive learning ? A. A competitive learning network consists of an input layer with linear units, a group of instars forming
a feed forward portion of the network and a feedback layer with linear or non linear units. 2)Brief about input layer ? A. The Input Layer The purpose of this layer is to distribute the given external input pattern

vector to the feed forward portion of the network. The input vectors may be of varying magnitude even though they contain the same pattern information. The input layer should not feed back ground noise to the feed forward portion of the competitive learning network. 3) brief about instar ? A. In star Each unit in the feedback layer receives inputs from all the input units. A configuration where a unit receives weighted inputs from several units of another layer is called an in star.
4)Brief about basic competitive learning ?

A.Basic competitive learning The steady activation value with an external input depends on the angle between the input and weight vectors. 5) describe about feed back layer ? A. In the arrangement of a group of in stars, the category of an input vector can be identified by observing the in star processing unit with maximum response. The maximum response unit can be determined by the system itself if the outputs of the 6)What are the ways of implementing feature mapping process ? A. Ways of implementing feature mapping process In one method, the output layer is organized into predefined receptive fields and the unsupervised learning should perform the feature mapping by activating appropriate connections. This can also be viewed as oriental selectivity.

Another method is to modify the feedback connections on the output layer. Instead of connecting them in an on centre off surround manner, the connections can be made as indicated by a Mexican hat type function.

COMPREHENSIVE VIVA

SUBJECT: INFORMATION SECURITY

UNIT I

Introduction to Information Security

1. Define Information Security.

Information Security refers to the process of protecting data or information from unauthorized user, at the same time allowing legitimate uses to access the data. 2. Define Security Attack.

Any action that compromises the security of information owned by an organization 3. Define Nonrepudation.

Nonrepudation prevents either sender or receiver from denying a transmitted message. Thus, when a message is sent, the receiver can prove that the message was in fact sent by the alleged sender. 4. Define Buffer Overflow.

Buffer Overflow is a situation that occurs when the amount of data that is placed in the memory is greater than the amount of storage space actually allocated. 5. What are the two types of authentication?

Peer entity authentication: is used to verify the identities of the peer entities involved in communication. Data origin authentication: is used for ensuring the authencity of the source of data without providing protection against the alterations or replications of the data units. 6. Define Encipherment.

The use of mathematical algorithms to transform data into a form that is not readily intelligible. The transformation and subsequent recovery of e data depend on an algorithm and zero or more encryption keys.

7. What are types of attacks?

Passive attack: This attack does not modify data(or) harm the system however the attack may harm the sender or the receiver of the message Active attack: An active attack may change the data or harm the system.

UNIT II

Symmetric Encryption and Message Authentication

8. What is the input and output of S-DES algorithm?

The S-DES encryption algorithm takes an 8-bit block of plain text and a 10-bit key as input and produces an 8-bit block of cipher text as output.

9. Define Stream Cipher & Block Cipher.

A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. A block cipher is one in which a block of plaintext is treated as a whole and used to produce a cipher text block of equal length.

10. What is difference between symmetric key &asymmetric key cryptography?

Symetric key cryptography uses a single secret key for both encryption and decryption. It is also called as secret key cryptography.

Asymetric key cryptography uses two keys; one key for encryption and another key for decryption.

11. What is the output of DES (Data Encryption Standard) algorithm?

The algorithm transforms 64-bit input in a series of steps into a 64-bit output. For DES, data are encrypted in 64-bit blocks using a 56-bit key.

12. Explain about the types of encryption techniques.

Link Encryption: In this technique, each of the exposed communication link is furnished with an encryption device on its ends, thereby, securing all the traffic on all the communication links.

End-to-End Encryption: In this scheme, the encryption device is located at the ends of both the communicating systems. Encryption of data is carried out at the source terminal.

13. What are the block cipher modes of operation?

Electronic code book Cipher block chaining mode Cipher feedback mode Output feedback mode

UNIT III

Public-key Cryptography

14. What are the five elements involved in public-key cryptography/encryption?

Plain text Encryption algorithm Public and private key Cipher text Decryption algorithm

15. Mention the three main applications of public-key cryptosystems.

Encryption/decryption Digital signature Key exchange

16. Describe RSA algorithm.

RSA is a public-key encryption algorithm. It involves a public-key and a private-key where the public-key is known to all and is used to encrypt data or message. The data or message which has been encrypted by using a public-key can only be decrypted using its corresponding private-key.

17. Describe Diffie-Hellman key exchange algorithm.

The Diffie-Hellman key exchange is a public-key cryptography algorithm.

The purpose of

the algorithm is to allow two users to exchange a secret-key in a secure manner. The key can then be used to encrypt the subsequent messages.

18. What is a digital signature?

. The sender signs a message with its private key. Signing is achieved by a cryptographic algorithm applied to the message or to a small block of data that is a function of the message.

19. Explain in detail about digital signature?

Suppose that Bob wants to send a message to Alice, and although it is not important that the message be kept secret, he wants Alice to be certain that the message is indeed from him. In this case,

Bob uses his own private key to encrypt the message. When Alice receives the cipher text, she finds that she can decrypt it with Bobs public key, thus proving that the message must have been encrypted by Bob. No one else has Bobs private key, and therefore no one else could have created a cipher text that could be decrypted with Bobs public key. Therefore, the entire encrypted message serves as a digital signature. In addition, it is impossible to alter the message without access to Bobs private key, so the message is authenticated both in terms of source and in terms of data integrity.

UNIT IV

E-mail Privacy

20. What is PGP (Pretty Good Privacy)?

PGP is an open-source, freely available software package for e-mail security. It provides authentication through the use of digital signature, confidentiality through the use of symmetric block encryption, compression using the ZIP algorithm, and e-mail compatibility using the radix-64 encoding scheme

21.What S/MIME? S/MIME is an Internet standard approach to e-mail security that incorporates the same functionality as PGP

22.What are the services of PGP? Digital signature, message encryption,compression,e-mail compatibility.

23. How is an effective signature produced?

The combination of SHA-1 and RSA provides an effective digital signature scheme. Because of the strength of RSA, the recipient is assured that only the possessor of the matching private key can generate the signature.

24. How is confidentiality obtained in PGP?

It is provided by encrypting messages to be transmitted or to be stored locally as files. In both cases, the symmetric encryption algorithm CAST-128 may be used. Alternatively, IDEA or 3DES may be used. The 64-bit cipher feedback (CFB) mode is used.

25. What is message component and signature component?

The message component includes the actual data to be stored or transmitted, as well as a filename and a timestamp that specifies the time of creation. The signature component includes the following:

Timestamp: The time at which the signature was made. Message digest: The 160-bit SHA-1 digest encrypted with the senders private signature key. The digest is calculated over the signature timestamp concatenated with the data portion of the message component.

UNIT V

IP Security

24. Define IPSpoofing?

It is a technique with which a duplicate packet with fake IP address is created by a hacker which resembles that of the original packet.

25. Mention the three sections of IPSecurity Architecture?

IPSec Documents IPSec Services Security Associations

26. Mention the three functional issues of IPSec?

Authentication Confidentiality Key management

27. What are the three essential parameters of security association?

Security Parameter Index (SPI) IP Destination Address Security Protocol Identifier

28. Which protocols are used to provide IP security?

Authentication Protocol Encapsulating Security Payload

29. Explain the difference between Tunnel mode and Transport mode.

Transport mode protects only the payload portion of the IP packet by implementing encryption or authentication.

Tunnel mode protects the whole IP packet by encapsulating it into some other packet.

UNIT VI

Web Security

30. What are the approaches used for web traffic security.

IPSec SSL (Secure Socket Layer) TLS (Transport Layer Security)

31. Define SET (Secure Electronic Transaction).

SET is an open encryption and security specification designed to protect credit card transactions on the Internet.

32. What are the major services provided by SSL record protocol.

Confidentiality Message Integrity

33. Define Active Attack.

An active attack refers to the attack in which an intruder pretends to be an authorized user and performs illegitimate modifications to the information or data being transferred.

34. What are the three primary transaction types involved in SET.

Purchase request Payment authorization Payment capture

35. Define Password Sniffing.

Password Sniffing is a method in which an attacker can listen to confidential information like username, password that passes through the network. It is done using sniffing software called sniffer that monitors a network constantly for confidential information.

UNIT VII Network Management

36. Define SNMP (Simple Network Management Protocol).

SNMP is used as a tool in network management system to examine the conditions of network attached devices.

37. Define Clandestine User.

A clandestine user can either be a person inside or outside the system. This user captures all the administrative control and applies this control to escape auditing or to conceal audit collection control functions.

38. What are the two common techniques for protecting a password file?

One-way transformation function Access Control

39. List the four techniques used to avoid guessable passwords.

Educating the users Passwords generated by computers Reactive password checking Proactive password checking.

40. Define Misfeasor.

A misfeasor may be authentic person inside the system who can access those data, program or system resources for which they are not authorized. Misfeasor can also be a person who is authorized to perform these access but misuses their privileges.

41. Define Logic Bomb.

The logic bomb is code embedded in some legitimate program that is set to explode when certain conditions are met.

42. Define Trap Door.

A trap door is a secret entry point into a program that allows someone that is aware of the trapdoor to gain access without going through the usual security access procedures.

43. Define Zombie. A zombie is a program that secretly takes over another Internet-attached computer and then uses that computer to launch attacks that are difficult to trace to the zombie`s creator.

UNIT VIII Firewalls

44. Define Firewall.

A firewall is an information security program located at a network gateway sever to protect the confidential information present in the network from being interpreted by intruders or by other insecure networks.

45. What are the different types of firewall?

Packet filtering router Application level gateway Circuit level gateway

46. Define IDS (Intrusion Detection System)

An IDS is a defensive tool used for detecting malicious attacks that can affect the security features of a system. It is a software program installed at a higher level of an operating system.

47. Define False Positive.

A false positive is a term used to describe a situation where a network intrusion detection system reports an intrusion activity though no such potential intrusion has occurred.

48. What are the basic elements of an access matrix?

Subject Object

Access Right.

49. What is Bastion Host?

Bastion host is a separate host used to examine an application layer protocol such as HTTP and the other proxy servers.

50. Describe various Statistical Anomaly Detection techniques.

There are two categories of Statistical Anomaly Detection:

Threshold Detection: In threshold detection the number of occurances of a particular event over a period of time is calculated. If the event count exceed the value of occurrences which cane be allowed to occur, then it can be assumed that an intrusion has occurred.

Profile-based Anomaly Detection: This technique is based on past user profile of behavior that is analyzed to identify major deviations. An alert can be confirmed only after considering all the parameters of the user profile. The user profile is recorded in the form of "Audit records". Therefore, the audit records explain a specific user's behavior and can be used as an input to intrusion detection function, to determine deviation from average behavior.

C.S.E. IV-II OOAD Comprehensive Viva 1|Page

OOAD VIVA QUESTIONS


UNIT- I: Introduction to UML 1. UML stands for UNIFIED MODELLING LANGUAGE. 2. What is a model? A model is a simplification of reality 3. What are the building blocks of UML? 1.Things 2.Relationships 3.Diagrams 4. What are the four types of things in UML? 1.Structural things 2.Behavioral things 3.Grouping things 4.Annotational things. 5. What are the different kinds of relationships in UML? 1.dependency 2.association 3.Generalization 4.Realization 6. What is exactly the purpose of UML? Visualizing, specifying, constructing, & documenting object-oriented systems . 7. What are different views in a systems architecture?explain each view. 1. Use case view 2. Design view 3. Implementation view 4. Process view 5. Deployment view The usecase view of a system encompasses the usecases that describe the behavior of the system as seen by its endusers,analysts and testers.

The design view of a system encompasses the classes,interfaces.This view mainly supports the functional requirements of the system. The process view of a system encompasses the threads and processes.This view addresses the performance,scalability and throughput of the system.
C.S.E. IV-II OOAD Comprehensive Viva 2|Page

The implementation view of a system encompasses the components and files.This view focuses on system assembly and configuration management. The deployment view of a system mainly focus on system topology,distribution ,delivery and installation. UNIT-II: Basic & Advanced Structural Modeling 8. What is a class? A class is a description of a set of objects that share the same attributes, operations, relationships and semantics. It is rendered as a rectangle. 9. What are different diagrams in UML? There are nine types of diagrams. They are: Class diagram, object diagram, usecase diagram, sequence diagram, collaboration diagram, statechart diagram, activity diagram, component diagram, deployment diagram. 10.What is meant by dependency? A dependency is a semantic relationship between two things in which a change to one thing may affect the semantics of the other thing. Eg:Filmclip and channel. 11.What is an interface? An interface is a collection of operations that specify a service of a class or component. 12. Aggregation is a _has-a _kind of relationship and Generalization is ISA kind of relationship. 13.What is a package? A package is a general-purpose mechanism for organizing elements into groups.Graphically,package is rendered as a tabbled folder. 14.What are constraints, stereotypes and tagged values? A Constraint extends the semantics of a UML building block, allowing you to add new rules or modify existing ones.
C.S.E. IV-II OOAD Comprehensive Viva 3|Page

A Tagged value extends the properties of a UML building block, allowing you to create new information in that elements specification. A stereotype extends the vocabulary to the UML,allowing you to create new kinds of building block that are derived from existing ones out that are specific to your problem. UNIT-III Class And Object Diagrams 15.What does a class diagram contain? A class diagram contains classes,interfaces,collaborations and

relationships.Its a collection of vertices and arcs. 16. Class diagrams are used to model the Static design view of a system. 17. Explain object diagram? An object diagram is an instance of a class diagram .It contains objects and links. 18. Forward engineering is the process of transforming a model into code through a mapping to an implementation language. 19. Reverse Engineering is the process of transforming code into a model through a mapping from a specific implementation language. 20.What are the common uses of class and object diagrams? The uses of class diagram are to model the vocabulary of a system, to model simple collaborations, to model a logical database schema. The use of object diagram is to model the object structures. UNIT-IV Basic Behavioral Modelling-I 21. An Interaction is a behavior comprises a set of messages exchanged among a set of objects within a context to accomplish a purpose. 22. A Message is a specification of a communication between objects that conveys information with the expectation that activity will ensure. 23. Sequence diagram emphasize on the Time ordering of messages. 24. Create action creates an object . 25. An object may commit suicide by destroying itself with Destroy.
C.S.E. IV-II OOAD Comprehensive Viva 4|Page

26.What are the two features that distinguishes sequence diagram from

collaboration diagrams? Object lifeline Its a vertical dashed line which represents the existence of an object over a period of time. Focus of control Its a tall, thin rectangle that shows the period of time during which an object is performing an action UNIT-V Basic Behavioral Modeling-II 27. Use case captures the intended behavior of the system and the behavior is specified by the flow of events. 28. A Use-case is rendered as an eclipse. 29. Include relationship between usecases means that the base use case explicitly incorporates the behavior of another usecase at a location specified at the base. 30. Actor represents a role that plays within a system. 31. Actors are connected to the usecases only by association relationship. 32.What are the contents and uses of use case diagrams? Use case diagrams mainly contain usecases, actors, dependency, generalization and association relationships.

The uses are: 1. To model the context of a system 2. To model the requirements of a system. UNIT-VI Advanced Behavioral Modeling 33.What are the four kinds of events which can be modeled in UML? Signals, Calls, Passing of time and Change in state. 34. Events that can cause transitions to fire are Triggers. 35. Internal Event occurs when a method is invoked via a message. 36. The relationship between two states is called a transition. 37. In UML, processes are modeled as Stereotyped Active Classes. 38.What is a state? Explain its parts.
C.S.E. IV-II OOAD Comprehensive Viva 5|Page

A state is a condition or situation during the life of an object during which it satisfies some condition. A state has several parts: 1. Name (A textual string that distinguishes the state from other states) 2. Entry/Exit actions(Actions executed on entering and exiting the state) 3. Internal Transitions (Transitions that are handled without causing a change in state) 4. Substates (The nested structure of a state) 5. Deferred events (A list of events that are not handled in that state but are handled by a object in another state) UNIT-VII Architectural Modeling 39. The deployment view of a system is modeled by using Deployment diagram. 40. Component is used to model physical and replaceable part of a system. Component is rendered as a rectangle with tabs. 41. In UML, physical things are modeled as Components. 42. Creating a new system by adding new components and replacing old ones is called binary replaceability. 43. Component diagram is used to model adaptable systems. 44.What are the standard stereotypes that apply to components? Explain. 1. Executableexecuted on a node 2. Library----static or dynamic object library 3. Table---represents a database table 4. Filecontains source code or data 5. Documentrepresents a document. UNIT-VIII Case Study 45.Metadata is stored in data dictionary. 46. Student Class is present in the class diagram of a Library system. 47. Student is a valid actor for a library system. 48. Issue book is a valid usecase in a library system.

49. Association relationship exists between the student and book classes. 50. The multiplicity of the association corresponds to one-to-many in a

library system.