Tuesday, February 26, 2013

Dear Student,

PL refer to the following link for FPL-II unit -I

Microprocessor book for Pune university, First Year Engineering, FPL-II reference:

https://docs.google.com/file/d/0BwBMbY_2VMQsTkp3VUVxLU9XY0k/edit?usp=sharing


Best Luck

Wednesday, June 30, 2010

Turbo C

1987 – Version 1.0 of the Turbo C programming language is released. It offers the first integrated edit-compile-run development environment for the C programming language for IBM-compatible personal computers. Turbo C was developed by Bob Jervis as “Wizard C”. It runs on just 384KB of memory and is capable of inline assembly with full access to C symbolic names and structures.

Steve Yegges Blog about Why compilers matter?

Principles of Compiler Design

This semester I will be helping my B.E Computer Students to understand Compilers and its working.

OVERVIEW


A compiler or interptreter for a programminning language is often decomposed into two parts:

1. Read the source program and discover its structure.
2. Process this structure, e.g. to generate the target program.


Why to learn it?

To enhance understanding of programming languages


• To have an in-depths knowledge of low-level machine executables

• To write compilers and interpreters for various programming languages and domain-specific languages
   Examples: Java, JavaScript, C, C++, C#, Modula-3, Scheme, ML, Tcl/Tk, Database Query Lang., Mathematica, Matlab, Shell-Command-Languages, Awk, Perl, your .mailrc file, HTML, TeX, PostScript, Kermit scripts, .....

• To learn various system-building tools : Lex, Yacc, ...

• To learn interesting compiler theory and algorithms.

• To learn the beauty of programming in modern programming lang.

Sunday, April 25, 2010

Index Sequential Search

#include


#define MAX 24

void createIndex(int index[],int isize,int arr[],int asize)
{
int i,j;

for(i=0,j=0;i
{
index[j]= arr[i];
}
index[j] = arr[asize-1];
}

int indexSeqSearch(int val, int index[], int isize, int arr[], int asize)
{
int i=0,j=0,pos=0;
int high=0,low=0;
if(val > index[isize-1] && val < index[0])
return -1;

while(i
{
if(val == index[i])
{
pos = 8 * i;
return pos;
}

if(val < index[i])
{
low = 8 * (i-1);
high = 8 * i;
break;
}

else
{
low = 8 * i;
high = 8 * (i+1);
}
i++;
}

while(low < high)
{
if(val == arr[low])
return low;
else
low++;
}
return -1;
}



int main()
{
int arr[MAX]={ 8,14,26,38,72,115,306,321,329,387,409,512,540,567,583,592,602,611,618,741,798,811,814,876};

int index[(MAX/8)+1]={0};
createIndex(&index[0],(MAX/8)+1,&arr[0],MAX);
int opt=0,pos=0;
while(opt < MAX)
{
pos = indexSeqSearch(arr[opt],&index[0],(MAX/8)+1,&arr[0],MAX);
if( pos != -1)
{
printf("\n%d found at position %d",arr[opt],pos);
}
else
printf("\n%d not found.",arr[opt]);
opt++;

}
return 0;
}

PL Practical Exam Variation List

1. Perform Set operations using arrays


2. Perform Set operations using linked list

3. String operations without using standard library functions

4. Matrix operations : Add, Sub, Multiply, Saddle Point

5. Matrix operations : Add, Sub, Multiply, Transpose

6. Matrix operations : Add, Sub, Transpose, Check for Magic Square

7. Matrix operations : Multiplication, Transpose, Check for magic Square

8. Create a Database using array of structures and perform following operations

a. Add

b. Delete

c. Modify

d. Display

e. Search and

f. Sort

9. Create a Database using text files and perform following operations

a. Add

b. Delete

c. Modify

d. Display

e. Search and

f. Sort

10. Implement Sorting methods using functions

a. Bubble

b. Selection

11. Implement Sorting methods using functions

a. Bubble

b. Insertion

12. Implement Sorting methods using functions

a. Insertion

b. Selection

13. Implement Sorting methods using functions

a. Shell Sort

b. Bubble Sort

14. Implement Sorting methods using functions

a. Shell Sort

b. Selection

15. Implement Sorting methods using functions

a. Shell

b. Insertion

16. Implement sorting methods using recursion

a. Quick Sort

b. Merge Sort

17. Implement Searching Methods

a. Sequential Search

b. Binary Search

18. Implement Searching Methods

a. Indexed Sequential Search

b. Binary Search

19. Implement Searching Methods

a. Sequential Search

b. Fibonacci Search

20. Represent Polynomial using structures and write a menu driven program to perform addition, Multiplication and Evaluation

21. Represent Sparse matrix using array and perform matrix addition, simple and fast transpose

22. Create SLL and Write a menu driven program to perform operations on it like

a. insert an element: at start, In between, At end

b. Search

c. Delete

d. Reverse

e. Display

23. Create CLL and Write a menu driven program to perform operations on it like

a. insert an element : at start, In between, At end

b. Search

c. Delete

d. Reverse

e. Display

24. Create DLL and Write a menu driven program to perform operations on it like

a. insert an element: at start, In between, At end

b. Search

c. Delete

d. Reverse

e. Display

25. Create CDLL and Write a menu driven program to perform operations on it like

a. insert an element: at start, In between, At end

b. Search

c. Delete

d. Reverse

e. Display

26. Create two SLLs, sort one after creation and one while creation using pointer manipulation. Merge these two lists into one list without creating a new node or swapping of the data

27. Create two DLLs, sort one after creation and one while creation using pointer manipulation. Merge these two lists into one list without creating a new node or swapping of the data

28. Represent Polynomial using CLL and write a menu driven program to perform addition, Multiplication and Evaluation

29. Implement stack as an ADT using array. Use this ADT to perform expression conversion and evaluation- Prefix to postfix

30. Implement stack as an ADT using array. Use this ADT to perform expression conversion and evaluation- Postfix to Prefix

31. Implement stack as an ADT using array. Use this ADT to check the correctness of parenthesized expression e.g. (a))-wrong, (a+b)+c-correct

32. Represent a circular queue using linked list and write a program to perform operations like Insert, Delete, finding front and rear element

33. Create a Database using linked list and perform following operations

a. Add

b. Delete

c. Modify

d. Display

e. Search and

f. Sort

Saturday, April 24, 2010

DSL Practical Exam Variation List From Anil Bhadgale Sir

 DATA STRUCTURES LABORATORY


ASSIGNMENTS LIST

Group A (C++ programming)

• Create binary search tree and perform recursive traversals (Preorder, Inorder and Postorder)

• Create binary search tree and perform non recursive traversals (Preorder, Inorder and Postorder)

• Create a binary expression tree for any expression (infix/prefix/postfix) and perform non recursive traversals.

Eg. A+B

+AB

+

/ \

A B

• Create a binary expression tree for any expression (infix/prefix/postfix) and perform recursive traversals.

• Create a binary expression tree for any expression(infix/prefix/postfix) and perform non recursive Inorder and Preorder traversals and recursive Postorder traversal( any combination can be asked in examination)

• For any of above tree assignment perform deletion of node operation, The tree should be updated after deleting the node( assume different cases like lea, non leaf node with single child/double child)

• Create binary search tree and find height of the tree, print leaf nodes.

• Create binary tree for string as information and find height of the tree, print leaf nodes and display siblings of each other, find the number of subtrees that can be generated.

• Create binary tree by asking the user to insert (left/right).Find mirror image, print original and mirror image using level-wise printing

• Create in-order threaded binary tree and perform traversals(also deletion of node)

• Represent graph using adjacency list (Adjacency matrix) and perform DFS(Non recursive/recursive )

• Represent graph using adjacency list (Adjacency matrix) and perform BFS (Non recursive/recursive )

• Represent graph using adjacency list or matrix and generate minimum spanning tree using Prism’s algorithm

• Represent graph using adjacency list or matrix and generate minimum spanning tree using Kruskal’s algorithm (prims and kruskals having same minimum weight)

• Represent graph using adjacency list or matrix and find shortest distance and path using Dijkstra’s Algorithm

• Implementation of AVL tree

• Implementation of direct access file using different collision resolution techniques(using linear probing/chaining)

• Different File operations using command line arguments on sequential file.

Group B (STL implementation)

• Write a program to add binary numbers (assume one bit as one number)

• Implement Dqueue (Double ended queue)

• Use STL for Sorting and searching with user-defined records such as Person Record

(Name, birth date, telephone no), item record (item code, item name, quantity and cost)

• .Implementation of SLL , DLL and CLL

• Implementation of stack & queue using SLL

Group C

• Write a C++ program to implement a small database mini project to understand persistent objects and operations on sequential files (eg library information, inventory systems, automated banking system, reservation systems etc.) For example, write a program to create a database for reservation

system using information such as Name, sex, age, starting place of journey and destination. Program should have following facilities

a) To display entire passenger list

b) To display particular record

c) To update record

d) To delete and sort record

Use Exception Handling for data verification



(Subject I/c)