Thursday, 25 July 2013

MCA 2012-2013 SYLLABUS FINALLY RELEASED :-)

Happy News MCA SYLLABUS FINALLY RELEASED AFTER ONE YEAR OF COURSE COMPLETION

HOPE EVERYBODY GETS 2ND YEAR BOOKS ON TIME.

SAY YOUR PRAYERS!!!


CLICK HERE FOR MCA 2012-2013 SYLLABUS

WELCOME TO MCA 2ND YEAR :-)

Hi all welcome to 2nd year MCA correspondence course.


classes starts on 27th july @ Kandaswamy Naidu College for Men





View Larger Map

Tuesday, 11 June 2013

SYSTEM SOFTWARE---- OLD  QUESTION PAPER 



 

MAY 2012 P/ID 17408/RBJ 

Time : Three hours Maximum : 75 marks
PART A — (5 × 5 = 25 marks)
Answer ALL questions.

1. (a) What are the components of system software? 
 Or
 (b) Write about the evolution of system software. 
2. (a) What are the elements of Assembly language 
programming? Give suitable examples.
 Or 
 (b) Define :
  (i) Macros
  (ii) Directives
  (iii) Parameters.  
3. (a) Explain the compilation process with an 
example.
 Or 
 (b) Define 
  (i) Tokens 
  (ii) Parsing
  (iii) Left and Right sentential form.  
  
 
4. (a) Compare linking and relocation. 
 Or 
 (b) What is linkage editing? Explain.  
5. (a) Explain the functions of a text editor.  
 Or 
 (b) What are Debug monitors? Explain. 

PART B — (5 × 10 = 50 marks) 

Answer any FIVE questions. 

6. Explain the model of a computer system with a
neat diagram.  
7. Explain the activities of a 2-pass assembler during
the assembly process.  
8. Describe Macros with examples. 
9. Explain the compilation process of expression and
control structures.  
10. Describe any three data structures used for
storage allocation.  
11. Explain any two parsing techniques used in the
compilation process.  

 P/ID 17408/RBJ 2

 
12. Explain how linking of program overlays are
performed?  
13. Write short notes on : 
 (a) S/w tools for system software 
 (b) Interactive programming environment. 

———————
 P/ID 17408/RBJ 3

Wednesday, 24 April 2013

NEW TYPE OF CURRENCY (DIGITAL ) BITCOINS

Check out this new type Digital Currency BITCOIN which can be minted with computers and claims to be environmental friendly.









bitcoin



புது வகையான பணம் (மின் பணம் ) நீங்களே உங்கள் பணத்தை கணினி (computer) உருவாக்குங்கள் . 





Monday, 22 April 2013

C++ PROGRAMS FOR MCA


//DOUBLY LINKED LIST

#include<iostream.h>
#include<conio.h>
#include<alloc.h>
struct Doubly
{
int info;
struct Doubly*next;
struct Doubly*previous;
};
class linked
{
public:
int no,dnode,search;
Doubly first,*new1;
public:
void create(Doubly*);
void insert(Doubly*);
void delet(Doubly*);
void display(Doubly*);
};
void linked::create(Doubly*node)
{
first.next=NULL;
first.previous=NULL;
node=&first;
no=0;
cout<<"\n input choice b for break: ";
char ch=getche();
while(ch!='b')
{
node->next=(Doubly*)malloc(sizeof(Doubly));
node->next->previous=node;
node=node->next;
cout<<"\n Input the values of the node: "<<(no+1)<<":";
cin>>node->info;
node->next=NULL;
cout<<"\n Input choice b for break;";
ch=getche();
no++;
}
cout<<"\n total node="<<no;
}
void linked::delet(Doubly*node)
{
search=0;
cout<<"Enter the node to be delete: ";
cin>>dnode;
node=first.next;
if(node==NULL)
{
cout<<"\n underflow\nList is empty\n";
}
else
{
while(node)
{
if((search+1)==dnode)
{
node->previous->next=node->next;
node->next->previous=node->previous;
free(node);
}
else
{
node=node->next;
}
search++;
}
}
node=node->next;
}
void linked::insert(Doubly*node)
{
new1=(Doubly*)malloc(sizeof(Doubly));
cout<<"\n insert the node value";
cin>>new1->info;
node=first.next;
if(node==NULL)
{
cout<<"\n list is empty";
}
else
{
new1->next=node;
new1->previous=node->previous;
node->previous->next=new1;
node->previous=new1;
}
}
void linked::display(Doubly*node)
{
node=first.next;
do
{
cout<<"\n";
cout<<""<<node->info;
node=node->next;
}
while(node->next);
do
{
cout<<"\n";
cout<<""<<node->info;
node=node->previous;
}
while(node->previous);
getch();
}
void main()
{
linked l;
int zy,t;
clrscr();
cout<<"\n\t\t Creating a simple Doubly linked list";
cout<<"\n\t\t *****************************\n";
Doubly*node=(Doubly*)malloc(sizeof(Doubly));
do
{
cout<<"\1. Create\n2. Insert New Node\n3. Display
\n5. Exit\nEnter ur choice: ";
cin>>zy;
switch(zy)
{
case 1:
l.create(node);
cout<<"\n Create doubly linked list is as follows\n";
l.display(node);
break;
case 2:
cout<<"\t\t inserting some nodes\n\n";
l.insert(node);
case 3:
cout<<"\n Insert node doubly linked list is as follows\n";
l.display(node);
break;
case 4:
cout<<"\t\tDelete nodes\n\n";
l.delet(node);
break;
case 5:
break;
}
}
while(zy!=5);
getch();
}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 // STACK USING ARRAY

#include<iostream.h>
#include<conio.h>
#include<ctype.h>
int max=5;
class stack
{
int stack[10],top;
public:
int i;
stack()
{
top=-1;
}
void push();
void pop();
void disp();
};
void stack::push()
{
int p;
if(top==max-1)
cout<<"\nstack is full";
else
{
cout<<"Enter the value\n";
cin>>p;
top=top+1;
stack[top]=p;
}
}
void stack::pop()
{
if(top==-1)
cout<<"stack is empty";
else
{
cout<<"The deleted element is"<<stack[top]<<"\n";
top--;
}
}
void stack::disp()
{
if(top==-1)
cout<<"stack is empty";
else
{
cout<<"Element in stack\n";
for(i=0;i<=top;i++)
cout<<stack[i]<<"\n";
}
cout<<"\n";
}
void main()
{
int ch;
clrscr();
stack s;
cout<<"\nSTACK IN ARRAY";
cout<<"1.push\n";
cout<<"2.pop\n";
cout<<"3.disp\n";
cout<<"4.exit\n";
do
{
cout<<"Enter your choice";
cin>>ch;
do
{
cout<<"Enter your choice";
cin>>ch;
switch(ch)
{
case 1:
s.push();
break;
case 2:
s.pop();
break;
case 3:
s.disp();
break;
}
}
while(ch!=4);
}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SINGLE LINKED LIST

#include<iostream.h>
#include<conio.h>
#include<alloc.h>
struct link
{
int info;
struct link *next;
};
class insert
{
private:
int i,number;
link start,*previous,*new1;
public:
void insertion(link *);
void create(link *);
void display(link *);
void dele(link *);
};
void insert::create(link *node)
{
start.next=NULL;
node=&start;
i=0;
cout<<"\ninput choice n for break;";
char ch=getche();
while(ch!='n')
{
node->next=(struct link *)malloc(sizeof(struct link));
node=node->next;
cout<<"\n input node:"<<(i+1)<<":";
cin>>node->info;
node->next=NULL;
cout<<"\ninput choice n for break:";
ch=getche();
i++;
}
}
void insert::insertion(link *node)
{
node=start.next;
previous=&start;
new1=(struct link *)malloc(sizeof(struct link));
new1->next=node;
previous->next=new1;
cout<<"\ninput the first node value:";
cin>>new1->info;
}
void insert::display(link *node)
{node=start.next;
cout<<"\nafter inserting a node list is a follows:\n";
while(node)
{
cout<<"\n"<<node;
cout<<" "<<node->info;
cout<<"\t"<<node->info;
node=node->next;
}
}
void insert::dele(link *node)
{
node=start.next;
previous=&start;
if(node==NULL)
cout<<"\nunder flow\n";
else
{
previous->next=node->next;
free(node);
}
}
void main()
{
int t;
clrscr();
insert in;
link *node=(link *)malloc(sizeof(link));
do
{
cout<<"\n1.creat\n2.insertion\n3.display\n4.delete\n5.exit\n";
cout<<"\n enter ur choice:";
cin>>t;
switch(t)
{
case 1:
in.create(node);
case 2:
in.insertion(node);
break;
case 3:
in.display(node);
break;
case 4:
in.dele(node);
break;
case 5:
cout<<"\nur choice is wrong"<<endl;
break;
}
}
while(t<5);
getch();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 QUEUE USING POINTER

#include<iostream.h>
#include<conio.h>
#include<malloc.h>
struct node
{
int data;
node *link;
};
struct q1
{
node *front;
node *rear;
node *link;
};
struct queue
{
q1 q;
node *t;
public:
void intialise()
{
q.front=NULL;
q.rear=NULL;
}
void addq();
void delq();
void displayq();
};
void queue::addq()
{
t=new(node);
cout<<"enter item to add";
cin>>t->data;
cout<<"item added is:"<<t->data;
t->link=NULL;
if((q.rear)==NULL)
q.front=t;
else
q.rear->link=t;
q.rear=t;
}
void queue::delq()
{
if(q.front==NULL)
{
cout<<"Queue is empty";
q.rear=NULL;
}
else
{
t=q.front;
cout<<"item deleted is"<<q.front->data;
q.front=q.front->link;
free(t);
}
}
void queue::displayq()
{
if(q.front==NULL)
cout<<"queue is empty";
else
{
cout<<"\n front";
for(t=q.front;t!=NULL;t=t->link)
cout<<"==>"<<t->data;
cout<<"<==REAR\n";
}
}
void main()
{
int choice;
queue qu;
clrscr();
qu.intialise();
cout<<"\n\t1-add\n\t2-delete\n\t3-display\n\t4-exit";
do
{
cout<<"\n Enter your choice:\t";
cin>>choice;
switch(choice)
{
case 1:
qu.addq();
break;
case 2:
qu.delq();
break;
case 3:
qu.displayq();
break;
case 4:
break;
default:
cout<<"invalid choice";
}
}
while(choice!=4);
getch();
}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// POLYNOMIAL

#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
void line(int lines);
class subpoly
{
private:
int degree;
int *coeff;
public:
subpoly()
{
degree=0;
coeff=new int[1];
}
subpoly(int deg)
{
degree=deg;
coeff=new int[deg+1];
}
subpoly(const subpoly &A);
void get(istream &in);
int Coeff(int deg);
void display(ostream &out);
friend subpoly operator -(subpoly &A, subpoly &B);
};
void main()
{
subpoly A(3);
subpoly B(3);
clrscr();
cout<<"Enter he value for first polynomial:\n";
A.get(cin);
cout<<"Enter the value for second polynomial:\n";
B.get(cin);
cout<<"\n First polynomial=";
A.display(cout);
line(2);
cout<<"\n Second polynomial=";
B.display(cout);
line(2);
subpoly C(3);
C=A-B;
cout<<"\nSubtraction  polynomial=";
C.display(cout);
getch();
}
subpoly operator-(subpoly &A, subpoly &B)
{
subpoly C;
if(A.degree==B.degree)
{
 C=A;

for(int i=B.degree;i>=0;i--)
{
C.coeff[i]=A.coeff[i]-B.coeff[i];
}
return C;
}
else if(A.degree<B.degree)
{
C=B;
for(int i=A.degree;i>0;i--)
{
C.coeff[i]=B.coeff[i];
}
return C;
}
else if(A.degree>B.degree)
{
 C=A;
for(int i=A.degree;i>=0;i--)
{
C.coeff[i]=A.coeff[i];
}
return C;
}
return 0;
}
int subpoly::Coeff(int deg)
{
return coeff[deg];
}
void line(int lines)
{
for(int i=0;i<lines;i++)
cout<<endl;
}
void subpoly::get(istream &in)
{
for(int i=degree; i>=0;i--)
{
cin>>coeff[i];
}
in.ignore();
}
void subpoly::display(ostream &out)
{
for(int i=degree; i>=0;i--)
{
 if(coeff[i]>=0)
 {
if(i!=degree)
out<<" + ";
out<< coeff[i];
 }
else
{
if(coeff[i]<0)
out<<" - ";
out<< 0-coeff[i];
}
if(i>1)
out<<"X^"<<i;
else if(i==1)
 out<<"X";
}
 }
 subpoly::subpoly(const subpoly &A)
 {
coeff=new int[A.degree+1];
degree=A.degree;
for(int i=A.degree;i>=0;i--)
{
coeff[i]=A.coeff[i];
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//MATRIX

#include<iostream.h>
#include<conio.h>
class matmul
{
public:
int r1,r2,c1,c2,i,j,k;
int a[10][10],b[10][10],c[10][10];
public:
void get();
void mul();
void put();
};
void matmul::get()
{
cout<<"Enter row of 1stmatrix";
cin>>r1;
cout<<"Enter col of 1st matrix";
cin>>c1;
cout<<"Enter row of 2nd matrix";
cin>>r2;
cout<<"Enter col of 2nd matrix";
cin>>c2;
}
void matmul::put()
{
cout<<"First matrix\n";
for(i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
{
cout<<a[i][j]<<"\t";
}
cout<<"\n";
}
cout<<"Second matrix\n";
for(i=0;i<r2;i++)
{
for(j=0;j<c2;j++)
{
cout<<b[i][j]<<"\t";
}
cout<<"\n";
}
cout<<"RESULT\n";
for(i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
{
cout<<c[i][j]<<"\t";
}
cout<<"\n";
}
}
void matmul::mul()
{
if(r1==c2)
{
cout<<"Enter first matrix";
cout<<"Second matrix\n";
for(i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
{
cin>>a[i][j];
}}
cout<<"Second matrix\n";
for(i=0;i<r2;i++)
{
for(j=0;j<c2;j++)
{
cin>>b[i][j];
}}
for(i=0;i<r1;i++)
{
for(j=0;j<c2;j++)
{
c[i][j]=0;
for(k=0;k<r1;k++)
{
//c[i][j]=c[i][j]+a[k][j]*b[i][k];
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}}}
put();
}
else
cout<<"not possible";
}
void main()
{
clrscr();
matmul m;
m.get();
m.mul();
getch();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
INFIX POSTFIX

#include <iostream.h>
#include <string.h>
#include <ctype.h>
#include<conio.h>
const int MAX = 50 ;
class infix
{
private :
char target[MAX], stack[MAX] ;
char *s, *t ;
int top, l ;
public :
infix( ) ;
void setexpr ( char *str ) ;
void push ( char c ) ;
char pop( ) ;
void convert( ) ;
int priority ( char c ) ;
void show( ) ;
} ;
infix :: infix( )
{
top = -1 ;
strcpy ( target, "" ) ;
strcpy ( stack, "" ) ;
l = 0 ;
}
void infix :: setexpr ( char *str )
{
s = str ;
strrev ( s ) ;
l = strlen ( s ) ;
* ( target + l ) = '\0' ;
t = target + ( l - 1 ) ;
}
void infix :: push ( char c )
{
if ( top == MAX - 1 )
cout << "\nStack is full\n" ;
else
{
top++ ;
stack[top] = c ;
}
}
char infix :: pop( )
{
if ( top == -1 )
{
cout << "Stack is empty\n" ;
return -1 ;
}
else
{
char item = stack[top] ;
top-- ;
return item ;
}
}
void infix :: convert( )
{
char opr ;

while ( *s )
{
if ( *s == ' ' || *s == '\t' )
{
s++ ;
continue ;
}

if ( isdigit ( *s ) || isalpha ( *s ) )
{
while ( isdigit ( *s ) || isalpha ( *s ) )
{
*t = *s ;
s++ ;
t-- ;
}
}

if ( *s == ')' )
{
push ( *s ) ;
s++ ;
}

if ( *s == '*' || *s == '+' || *s == '/' ||
*s == '%' || *s == '-' || *s == '$' )
{
if ( top != -1 )
{
opr = pop( ) ;

while ( priority ( opr ) > priority ( *s ) )
{
*t = opr ;
t-- ;
opr = pop( ) ;
}
push ( opr ) ;
push ( *s ) ;
}
else
push ( *s ) ;
s++ ;
}

if ( *s == '(' )
{
opr = pop( ) ;
while ( ( opr ) != ')' )
{
*t = opr ;
t-- ;
opr =  pop ( ) ;
}
s++ ;
}
}

while ( top != -1 )
{
opr = pop( ) ;
*t = opr ;
t-- ;
}
t++ ;
}
int infix :: priority ( char c )
{
if ( c == '$' )
return 3 ;
if ( c == '*' || c == '/' || c == '%' )
return 2 ;
else
{
if ( c == '+' || c == '-' )
return 1 ;
else
return 0 ;
}
}
void infix :: show( )
{
while ( *t )
{
cout << " " << *t ;
t++ ;
}
}

void main( )
{
char expr[MAX] ;
infix q ;
clrscr();
cout << "\nEnter an expression in infix form: " ;
cin.getline ( expr, MAX ) ;

q.setexpr( expr ) ;
q.convert( ) ;

cout << "The Prefix expression is: " ;
q.show( ) ;
}
 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    DOUBLY LINKED LIST

#include<iostream.h>
#include<conio.h>
#include<alloc.h>
struct Doubly
{
int info;
struct Doubly*next;
struct Doubly*previous;
};
class linked
{
public:
int no,dnode,search;
Doubly first,*new1;
public:
void create(Doubly*);
void insert(Doubly*);
void delet(Doubly*);
void display(Doubly*);
};
void linked::create(Doubly*node)
{
first.next=NULL;
first.previous=NULL;
node=&first;
no=0;
cout<<"\n input choice b for break: ";
char ch=getche();
while(ch!='b')
{
node->next=(Doubly*)malloc(sizeof(Doubly));
node->next->previous=node;
node=node->next;
cout<<"\n Input the values of the node: "<<(no+1)<<":";
cin>>node->info;
node->next=NULL;
cout<<"\n Input choice b for break;";
ch=getche();
no++;
}
cout<<"\n total node="<<no;
}
void linked::delet(Doubly*node)
{
search=0;
cout<<"Enter the node to be delete: ";
cin>>dnode;
node=first.next;
if(node==NULL)
{
cout<<"\n underflow\nList is empty\n";
}
else
{
while(node)
{
if((search+1)==dnode)
{
node->previous->next=node->next;
node->next->previous=node->previous;
free(node);
}
else
{
node=node->next;
}
search++;
}
}
node=node->next;
}
void linked::insert(Doubly*node)
{
new1=(Doubly*)malloc(sizeof(Doubly));
cout<<"\n insert the node value";
cin>>new1->info;
node=first.next;
if(node==NULL)
{
cout<<"\n list is empty";
}
else
{
new1->next=node;
new1->previous=node->previous;
node->previous->next=new1;
node->previous=new1;
}
}
void linked::display(Doubly*node)
{
node=first.next;
do
{
cout<<"\n";
cout<<""<<node->info;
node=node->next;
}
while(node->next);
do
{
cout<<"\n";
cout<<""<<node->info;
node=node->previous;
}
while(node->previous);
getch();
}
void main()
{
linked l;
int zy,t;
clrscr();
cout<<"\n\t\t Creating a simple Doubly linked list";
cout<<"\n\t\t *****************************\n";
Doubly*node=(Doubly*)malloc(sizeof(Doubly));
do
{
cout<<"\1. Create\n2. Insert New Node\n3. Display
\n5. Exit\nEnter ur choice: ";
cin>>zy;
switch(zy)
{
case 1:
l.create(node);
cout<<"\n Create doubly linked list is as follows\n";
l.display(node);
break;
case 2:
cout<<"\t\t inserting some nodes\n\n";
l.insert(node);
case 3:
cout<<"\n Insert node doubly linked list is as follows\n";
l.display(node);
break;
case 4:
cout<<"\t\tDelete nodes\n\n";
l.delet(node);
break;
case 5:
break;
}
}
while(zy!=5);
getch();
}

Dijkstra's

#include <iostream.h>
#include <conio.h>
#define MAX_NODE 50
struct node
{
int vertex;
int weight;
node *next;
};
struct fringe_node
{
int vertex;
fringe_node *next;
};
node *adj[MAX_NODE];
int totNodes;
const int UNSEEN=1,FRINGE=2,INTREE=3;
int status[MAX_NODE];
fringe_node *fringe_list;
void createGraph()
{
node *newl,*last;
int neighbours;
cout<<"\n\n---Graph Creation---\n\n";
cout<<"Enter total nodes in graph : ";
cin>>totNodes;
for(int i=1;i<=totNodes;i++){
last=NULL;
cout<<"Total Neighbours of "<<i<<" : ";
cin>>neighbours;
for(int j=1;j<=neighbours;j++){
newl=new node;
cout<<"Neighbour #"<<j<<" : ";
cin>>newl->vertex;
cout<<"Weight    #"<<j<<" : ";
cin>>newl->weight;
newl->next=NULL;
if(adj[i]==NULL)
adj[i]=last=newl;
else
{
last->next = newl;
last = newl;
}
}  }  }
//Insert node in a fring_list at Begining.
void Insert_Beg(int item)
{
fringe_node *newl;
newl = new fringe_node;
newl->vertex = item;
newl->next = NULL;
newl->next = fringe_list;
fringe_list = newl;
}
//Delete element at pos position from fringe_list.
void del(int pos)
{
//to points to previous node from where
//to insert
int i;
fringe_node *tmp,*delnode;
for(i=1,tmp=fringe_list; i < (pos-1); tmp=tmp->next,i++);
delnode = tmp->next;
tmp->next = tmp->next->next;
delete(delnode);
}
void print_path(int s,int d,int parent[])
{
if(d==s)
cout<<"    "<<s;
else{
print_path(s,parent[d],parent);
cout<<"-->"<<d;
}}
void shortestPath()
{
int i,x,parent[MAX_NODE],edge_count,w,wt,v;
int min_dist,y,dist[MAX_NODE],stuck;
int source,destination;
node *ptr1;
fringe_node *ptr2;
cout<<"Enter Source Node : ";
cin>>source;
cout<<"Enter Destination Node : ";
cin>>destination;
fringe_list=NULL;
for(i=1;i<=totNodes;i++)
{
status[i]=UNSEEN;
parent[i]=0;
}
status[source]=INTREE;
dist[source]=0;
x=source;
stuck=0;
while( (x != destination) && (!stuck))
{
ptr1=adj[x];
while(ptr1!=NULL)
{
y=ptr1->vertex;
wt=ptr1->weight;
if((status[y]==FRINGE) && (dist[x]+wt < dist[y]))
{
parent[y]=x;
dist[y] = dist[y] + wt;
}
else if(status[y]==UNSEEN)
{
status[y]=FRINGE;
parent[y]=x;
dist[y] = dist[y] + wt;
Insert_Beg(y);}
ptr1=ptr1->next;}
if(fringe_list==NULL)
stuck=1;
else{
x=fringe_list->vertex;
min_dist=dist[x];
ptr2=fringe_list->next;
while(ptr2!=NULL){
w=ptr2->vertex;
if(dist[w] < min_dist)
{
x=w;
min_dist=dist[w];
}
ptr2=ptr2->next;
}
del(x);
status[x]=INTREE;
}   }
if(parent[destination]==0)
cout<<"No path from "<<source<<" to "<<destination;
else
{
cout<<"\n\nShortest Path\n";
print_path(source,destination,parent);
}
}
void main(){
clrscr();
cout<<"*****Minimum Spaning Tree (MST)*****\n";
createGraph();
cout<<"\n===Minimum Spaning Tree===\n";
shortestPath();
getch();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DFS BFS

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#define max 50
int adj[max][max];
class graph
{
private:
int vertex[max];
int visited[max];
public:
graph()
{}
~graph()
{}
void creategraph(int);
void depthfirst(int);
void breathfirst(int);
void DFS(int,int);
};
void graph::DFS(int ad,int v)
{
int k;
for(k=ad;k<v;k++)
for(int j=0;j<v;j++)
if(adj[k][j]==1)
{
if(visited[j]==0)
{
visited[j]=1;
cout<<vertex[j]<<"==>>";
DFS(j,v);
}}}
void graph::creategraph(int v)
{
int i,j;
for(i=0;i<v;i++)
{
cout<<"Enter the node value:";
cin>>vertex[i];
visited[i]=0;
}
for(i=0;i<v;i++)
for(j=0;j<v;j++)
adj[i][j]=0;
cout<<"enter the adjacency vertices list for each vertex of the graph:";
cout<<"\n";
int n,m,k;
for(i=0;i<v;i++)
{
cout<<"Enter the no of adjacency vertices for the vertex";
cout<<vertex[i]<<";";
cin>>n;
for(j=1;j<=n;j++)
{cout<<"Enter the adjacency vertex";
 cin>>m;
 for(k=0;k<v;k++)
{if(vertex[k]==m)
 adj[j][k]=1;
}}}
clrscr();
cout<<"\n graph created with no of vertices=="<<v<<endl<<endl;
cout<<"\n\n the adjacency matrix of the graph is:\n\n";
for(i=0;i<v;i++)
cout<<adj[i][j]<<" ";
cout<<endl;
}
void graph::depthfirst(int v)
{
int i=0;
for(i=0;i<v;i++)
visited[i]=0;
adj[0][0]=1;
visited[0]=1;
cout<<"\t\t depth first traversal \n\n";
cout<<vertex[0]<<"==>>";
DFS(0,v);
}
void graph::breathfirst(int v)
{
int i,j;
for(i=0;i<v;i++)
visited[i]=0;
cout<<"\t\t breath first traversal\n\n";
cout<<vertex[0]<<"==>>";
visited[0]=1;
for(i=0;i<v;i++)
{
for(j=0;j<v;j++)
{
if(adj[i][j]==1)
{
if(visited[j]==0)
{
cout<<vertex[j]<<"==>>";
visited[j]=1;
}}}}
cout<<"x\n\n";
}
void main()
{
graph g;
int ch,v;
do
{
clrscr();
cout<<"\t\t Graph creation and traversal\n\n";
cout<<"\t\t 1.Creat Graph\n\n";
cout<<"\t\t 2.Breadth First Traversal\n\n";
cout<<"\t\t 3.Depth First Traversal\n\n";
cout<<"\t\t 4.Exit\n\n";
cout<<"\t\t Enter your choice\n\n";
cin>>ch;
switch(ch)
{
case 1:
clrscr();
cout<<"\n\t\t Graph Creation \n\n";
cout<<"Enter the no of vertices to be created";
cin>>v;
g.creategraph(v);
cout<<"Press any key to continue";
getch();
break;
case 2:
clrscr();
g.breathfirst(v);
cout<<"press any key to continue";
getch();
break;
case 3:
clrscr();
g.depthfirst(v);
cout<<"X\n\n";
cout<<"press any key to continue";
getch();
break;
default:
break;
}
}
while(ch!=4);
}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CIRCULAR LINKED LIST

#include<iostream.h>
#include<conio.h>
#include<malloc.h>
struct node
{
int a;
struct node*next;
};
class list
{
struct node*root,*end;
public:
void create();
void insert();
void delet();
void show();
};
void list::create()
{
struct node*p,*n;
int t,s;
root=p=NULL;
s=sizeof(struct node);
cout<<"\n Enter -99 to stop";
cin>>t;
while(t!=-99)
{
n=(struct node*)malloc(s);
n->a=t;
n->next=NULL;
if(root==NULL)
root=n;
else
p->next=n;
p=n;
cout<<"\n Enter -99 to stop";
cin>>t;
}
end=n;
end->next=root;
}
void list::show()
{
struct node*x=root;
cout<<"/n root->";
do
{
cout<<x->a<<"->";
x=x->next;
}while(x!=root);
cout<<"root";
}
void list::insert()
{
struct node*temp,*ex=root;
int t,p,i=2;
cout<<"\n enter the value & position to insert:";
cin>>t>>p;
temp=(struct node*)malloc(sizeof(struct node));
temp->a=t;
temp->next=NULL;
if(p==1)
{
temp->next=root;
end->next=temp;
root=temp;
}
else
{
while(ex->next!=root && i<p)
{
ex=ex->next;
i++;
}
temp->next=ex->next;
ex->next=temp;
if(ex==end)
end=temp;
}}
void list::delet()
{
struct node*ex=root;
int p,i=2;
cout<<"\n Enter the position to delete:";
cin>>p;
if(p==i)
{
root=root->next;
end->next=root;
}
else
{
while(ex->next!=NULL && i<p)
{
ex=ex->next;
i++;
}
if(ex->next==end)
{
ex->next=root;
end=ex;
}
else
{
ex->next=ex->next->next;
}}
}
void main()
{
clrscr();
cout<<"\n\t\t OUT PUT \n";
list o;
o.create();
o.show();
o.insert();
o.show();
o.delet();
o.show();
getch();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//CIRCULAR QUEUE

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<ctype.h>
#include<process.h>
#define size 6
class cirque
{
public:
int rear,front;
int ch;
int q[size];
public:
cirque()
{
rear=front=-1;
}
void insert();
void deleteq();
void display();
clrscr();
};
void cirque :: insert()
{
if((front==0)&&(rear==size-1))
{
cout<<"\n overflow";
rear=1;
return;
}
else
if(front<0)
{
front=0;
rear=0;
cout<<"\n Give the input  element";
cin>>ch;
q[rear]=ch;
}
else
if(rear==size-1)
{
rear=0;
cout<<"\n Give the input element:";
cin>>ch;
q[rear]=ch;
}
else
{
rear++;
cout<<"Give the input element:";
cin>>ch;
q[rear]=ch;
}
}
void cirque :: deleteq()
{
if(front<0)
{
cout<<"\n underflow";
return;
}
ch=q[front];
q[front]=NULL;
cout<<"Elementis Deleted:"<<ch;
if(front==rear)
{
front=-1;
rear=-1;
}
else
if(front==size-1)
{
front=0;
}
else
{
front++;
}
}
void cirque :: display()
{
if(front<0)
return;
if(rear>=front)
{
for(int i=front;i<=rear;i++)
{
cout<<"\n i="<<i;
cout<<" "<<q[i];
}
}
else
{
for(int i=front;i<=size;i++)
{
cout<<"\n i="<<i;
cout<<" "<<q[i];
}

for(i-0;i<=rear;i++)
{
cout<<"\n i="<<i;
cout<<" "<<q[i];
}
}
}
void main()
{
cirque Q;
int k=0;
char choice;
clrscr();
do
{
cout<<"\n INSERT->i DELETE->d QUIT->q:\n";
cout<<"\n  Input choice:\n";
do
{
cin>>choice;
choice=tolower(choice);
}
while(strchr("idq",choice)==NULL);
cout<<"\nenter your choice is->"<<choice;
switch(choice)
{
case 'i':
Q.insert();
cout<<"\n queue after inserting:";
Q.display();
break;
case 'd':
Q.deleteq();
cout<<"\n queue content after deleteion is as follow:\n";
Q.display();
break;
case 'q':
k=1;
}
}
while(!k);
getch();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
BINARY TREE TRAVERSAL
#include<iostream.h>
#include<stdio.h>
#include<alloc.h>
#include<stdlib.h>
#include<conio.h>
typedef struct tree *node;
node create(int,node temp);
void inorder(node temp);
void preorder(node temp);
void postorder(node temp);
struct tree
{
int data;
struct tree *right,*left;
}*root;

void main()
{
node temp= NULL;
int data,ch,i=0,n;
clrscr();
cout<<"\nEnter the number of elements in the Tree:";
cin>>n;
cout<<"\n The elements are :\n";
for(i=0;i<n;i++)
{
cin>>data;
temp=create(data,temp);
}
cout<<"1.INORDER\n2.PREORDER\n3.POSTOTRDER\n4.EXIT\n";
do
{
cout<<"Enter your choice:";
cin>>ch;
switch (ch)
{
case 1:
cout<<"Inorder traversal of the given Tree\n";
inorder(temp);
break;
case 2:
cout<<"Preoroder traversal of the given Tree\n";
preorder(temp);
break;
case 3:
cout<<"Postorder traversal of the given Tree\n";
postorder(temp);
break;
default:
cout<<"Exit";
exit(0);}
}
while(ch!=4);
getch();
}
node create(int X, node temp)
{
struct tree *new1;
new1=(tree*)malloc(sizeof(struct tree));
if(new1==NULL)
cout<<"No Nodes are here\n";
else
{
if(temp==NULL)
{
new1->data=X;
new1->left=NULL;
new1->right=NULL;
temp=new1;}
else
{
if(X<temp->data)
temp->left=create(X,temp->left);
else
temp->right=create(X,temp->right);
}
}
return temp;
}
void inorder(node temp)
{
if(temp!=NULL)
{
inorder(temp->left);
cout<<"\t"<<temp->data;
inorder(temp->right);
}
}
void preorder(node temp)
{
if(temp!=NULL)
{
cout<<"\t"<<temp->data;
preorder(temp->left);
preorder(temp->right);
}
}
void postorder(node temp)
{
if(temp!=NULL)
{
postorder(temp->left);
postorder(temp->right);
cout<<"\t"<<temp->data;
}
}

THE NEW HEIGHTS OF TECHNOLOGY :-)





தொழில்  நுட்பம்  அறிவின்  எழுச்சியா  OR வீழ்ச்சியா 

BIRD FOUND DEAD 





This coloured Bird, found Dead near our Balcony, Location Annanagar chennai, India.

Can any body Identify what kind of this bird belong to.

WHAT'S THE NAME OF THIS BIRD


WHAT'S THE NAME OF THIS BIRD
WHAT'S THE NAME OF THIS BIRD

Resting After c++ practicals MrSelvaraj and Friends.
 Relaxing after c++ practicals 22nd april 2013
MERA DOSTH








யாரும்  இனிமே கேக்க  முடியாது  படிச்சு என்ன கிழிச்ச 

Angry birds still @fight.
PADICHU ENNA KIZHICHAA ??
 இந்த  பாஷா  ஒரு தடவ சொன்னா

நூறு  தடவ  சொன்ன  மாதிரி .

Tuesday, 9 April 2013

MATHEMATICS FOR COMPUTER SCIENCE ---- SEM I

Mathematics for Computer Science

UNIT I
Mathematical Logic: Statement Calculus – Connectives – normal forms – Predicate Calculus – Theory of inference for statement Calculus – Predicate Calculus including theory of inference.
UNIT II
Set Theory: Basic concepts of set theory – relations and ordering – functions –recursion.
UNIT III
Algebraic Structures: Semigroups – monoids- grammars and languages – groups and subgroups – Polish experiments and their compilation.
UNIT IV
Roots of Equations: Graphical Method – Bisection Method – False- Position Method – Fixed-Point Iteration – Newton-Raphson Method – Secant Method – Roots of Polynomials: Conventional Methods – Muller’s Method – Bairstow’s Method. Algebraic Equations: Gauss Elimination –Gauss-Jordan – LU Decomposition – Matrix Inverse –Gauss-Seidel.
UNIT V
Numerical Differentiation - Integration: Trapezoidal Rule – Simpson’s Rule – Romberg Integration – Differential equations: Taylor’s method – Euler’s method –Runge-Kutta 2nd and 4th order methods – Predictor – corrector methods.
Text Books
(i) J.P. Tremblay and R. Manohar, 1975, Discrete Mathematical Structures with Applications to Computer Science, Tata McGraw-Hill, New Delhi

(ii) S.S. Sastri, 1977, Introductory Methods of Numerical Analysis, Prentice Hall India, New Delhi
Reference Books
(i) J. Truss, 1999, Discrete Mathematics for Computer Scientists, 2nd Edn., Addison Wesley, Boston.

(ii) S. C. Chapra and R. P.Canale, 2002, Numerical Methods for Engineers, Fourth Edition, McGraw Hill International Edition.

(iii) Kolman, Busby and Ross, 2005, Discrete mathematical structures, 5th edition, PHI, New Delhi.

(iv) P.Niyogi, 2003, Numerical Analysis and Algorithms, Tata McGraw Hill, New Delhi.

PRACTICA III------ Data Structures Lab using C++


Data Structures Lab using C++

1. Implementation of Arrays (Single and Multi-Dimensional)
2. Polynomial Object and necessary overloaded operators.
3. Singly Linked Lists.
4. Circular Linked Lists.
5. Doubly Linked Lists.
6. General Lists.
7. Implementation of Stack (using Arrays)
8. Implementation of Queue (Using Pointers)
9. Implementation of Circular Queue (using Arrays and Pointers)
10. Evaluation of Expressions- ITP (Infix to Prefix).
11. Binary Tree implementations and Traversals using recursion.
12. Binary Search Trees.
13. Shortest path (Dijkstra’s)
14. Search methods in graphs (DFS & BFS) using recursion.

OBJECT ORIENTED PROGRAMMING WITH C++ -------------SEM II

Object Oriented Programming with C++

UNIT I
Introduction to OOP – Overview of C++ - Classes – Structures – Union – Friend Functions – Friend Classes – Inline functions – Constructors – Destructors – Static Members – Scope Resolution Operator – Passing objects to functions – Function returning objects.
UNIT II
Arrays – Pointers – this pointer – References – Dynamic memory Allocation – functions Overloading – Default arguments – Overloading Constructors – Pointers to Functions – Ambiguity in function overloading.
UNIT III
Operator Overloading – Members Operator Function – Friend Operator Function – Overloading some special operators like [ ] , ( ) , a and comma operator – Inheritance – Types of Inheritance – Protected members – Virtual base Class – Polymorphism – Virtual functions – Pure virtual functions.
UNIT IV
Class templates and generic classes – Function templates and generic functions – Overloading function templates – power of templates – Exception Handling – Derived class Exception – overhandling generic functions – Exception handling Functions – terminate () unexpected () – Uncaught – exception ()
UNIT V
Streams – Formatted I/O with ios class functions and manipulators – creating own manipulator – overloading << and >> - File I/O – Name spaces – conversion functions – Array based I/O – Standard Template Library (STL).
Text Books
(i) H. Schildt, 2003, C++ The Complete Reference, 4th Edition, Tata McGraw-Hill, New Delhi.
Reference Books
(i) J.P. Cohoon and J.W. Davidson, 1999, C++ Program Design – An Introduction to Programming and Object-oriented Design, 2nd Edition, Tata McGraw-Hill, New Delhi.

(ii) Johnston, 2002, C++ programming today, PHI, New Delhi.

(iii) A. N Kanthane, 2005, Object Oriented Programming with ANSI & Turbo C++ , Pearson Education, New Delhi.

(iv) Farrel , 2001, Object Oriented Programming using C++ , 2 nd Edition, Thomson Learning, Singa[pore.

STATISTICAL METHODS----SEM II

Statistical Methods

UNIT I
Sample spaces - events - Axiomatic approach to probability - conditional probability - Independent events - Baye's formula - Random Variables - Continuous and Discrete random variables - distribution function of a random variables - Characteristic of distributions - Expectation, variance - coefficient of variation, moment generation function - Chebyshev's inequality
UNIT II
Bivariate distribution - conditional and marginal distributions - Discrete distributions - discrete uniform, Binomial poison and geometric Distributions - Continuous distributions - Uniform, Normal, Exponential and Gamma distributions.
UNIT III
Correlation coefficient - Rank correlation coefficient of determination - Linear Regression - Method of Least squares - Fitting of the curve of the form ax + b, ax2 + bx + c, abx and axb - multiple and partial correlation (3 - variables only).
UNIT IV
Concept of sampling – Methods of sampling - simple random sampling - Systematic sampling and stratified random sampling (descriptions only) - concepts of sampling distributions and standard error - point estimation (concepts only) - Interval Estimation of mean and proportion. Tests of Hypotheses - Critical Region - two types of Errors - Level of significance - power of the test - Large sample tests for mean and proportion - Exact tests based on Normal, t, F and Chi-square distributions.
UNIT V
Basic principles of experimentation - Analysis of variance - one way and two way classifications - computing randomized design - Randomized Block design - Time series Analysis - Measurement of Trend and Seasonal variations.
Text Books
(i) Mood, A.M., Graybill, F. and Boes, 1974, Introduction to Mathematical Statistics, McGraw-Hill.

(ii) Trivedi, K.S, 1994, Probability and Statistics with Reliability, Queuing and Computer Science Applications. Prentice Hall India, New Delhi.
Reference Books
(i) Arnold O. Allen, 1978, Probability, Statistics and Queuing Theory with Computer Science Application.

(ii) Bajpai, A.C. Calus, I.M. Fairley, J.A., 1979, Statistical Methods for Engineers and Scientists. John Wiley & Sons.

(iii) Doughlas, C.,Montagomery, Lynwood,A. & Johnson, 1976, Forecasting and Time Series Analysis, Tata McGraw-Hill, New Delhi.

(iv) Baisnab, A.P. and Manoranjan Jas, 1993, Elements of Probability and Statistics, Tata McGraw-Hill, New Delhi.

(v) Kossack, C.F. and Hensschkec, C.I., Introduction to Statistics and Computer Programming, Tata McGraw-Hill, New Delhi.

MICROPROCESSORS AND ITS APPLICATIONS

Microprocessors and its Applications

UNIT I
Introduction to 8086 assembly language programming - Development steps – Construction - Writing Programs and Development Tools – Standard program structures – simple Programs – Jumps – While-do – repeat-until- Delay loops.
UNIT II
Strings – Procedures – Macros – Instruction Descriptions – Assembler Directives.
UNIT III
8086 Microcomputer – Observing Bus signals – Minimum mode System – Troubleshooting – 8086 interrupts – Interrupt Applications – Programmable timer/Counter – Interrupt Controller.
UNIT IV
Parallel Ports – Handshaking – Interfacing Digital Devices – Analog Interfacing – Industrial Control.
UNIT V
DMA – DRAMS – Cache Memories – Co-Processors – EDA Tools – 80286 80386 and 80486 microprocessors.
Text Books
(i) D. V. Hall , 1992, Microprocessors and Interfacing, Programming and Hardware, 2nd Edition, Tata McGraw-Hill, New Delhi.
Reference Books
(i) K. Udaya Kumar and B.S. Uma shankar, 1998, Advanced Microprocessors and IBM, PC Assembly Language Programming, Tata McGraw-Hill, New Delhi.

(ii) A. P. Mathur, 1989, Introduction to Microprocessors, 3rd Edn., Tata McGraw-Hill, New Delhi.

(iii) Yu Cheng Liu & Glenn A Gibson – 2005-Microcomputer Systems 8086/8088 Family- 2 nd Edition –PHI- New Delhi

DATA STRUCTURES -----SEM II

Data Structures

UNIT I
Abstract data types - asymptotic notations – complexity analysis – Arrays- representation of arrays – operations on arrays – ordered lists – polynomials.
UNIT II
Linked lists: Singly linked list- circular linked lists - doubly linked lists – general lists – stacks -queues - circular queues – Evaluation of expressions.
UNIT III
Trees – Binary Trees – Binary Tree Traversals – Binary Tree Representations – Binary Search Trees – Threaded Binary Trees – Application of Trees (Sets) – Representation of Graphs – Graph Implementation – Graph Traversals- Application of Graph Traversals- Minimum Cost Spanning Trees – Shortest Path Problem
UNIT IV
Internal Sorting – Optimal Sorting Time – Sorting Large Objects – Sorting with Tapes- Sorting with Disks.
UNIT V
Hashing – AVL Trees - Red-Black Trees – Splay Trees – B-Trees.
Text Books
(i) E.Horowitz, S. Sahni and Mehta, 1999, Fundamentals of Data Structures in C++, Galgotia, New Delhi
Reference Books
(i) G. L. Heileman, 1996, Data Structures, Algorithms and Object Oriented Programming, Tata McGraw-Hill, New Delhi.

(ii) A.V.Aho, J.D. Ullman, J.E. Hopcraft, 1983, Data Structures and Algorithms, Addison Wesley, Boston.

(iii) S. Sahni , 2001, Data structures , Algorithms & Applications, Tata McGraw-Hill, New Delhi.

(iv) Yedidyah Langsam Augensteil, Tanenbaum, Data Structures using C and C++ , PHI, New Delhi

(v) Gilberg , Forouzan, 2002, Data Structures,Thomson Asia, Singapore.

MADRAS UNIVERSITY SYLLABUS FOR MCA

NOTE: The syllabus given in this blog for reference only for your actual accurate syllabus contact IDE of Madras University.


( IF U ARE STILL NOT ABLE TO FIND U R SYLLABUS PLS FOLLOW THIS BLINDLY :-) )

BEST WISHES FOR EVERYBODY TO GET THEIR TEXT BOOKS AND STUDY MATERIALS  BEFORE EXAMINATION FOR JUNE 2013 EXAMS.

Theory Papers
Mathematics for Computer Science ------
for more information on the subject contact Professor Mr. Raman  or the Maths wiz Murugan fa10 MCA.
Programming in C and Unix ---hope u got the text book for this! if not atleast come to university once.
Digital Computer Fundamentals---available in IDE counter
System Software---available in ide counter
Practical Papers
Practical – I: Programming in C 
Practical – II: Unix and Shell Programming
SEMESTER II
Theory Papers
Practical Papers
Practical – III: Data Structures Lab using C++.
Data Structure Lab Exercise Programs
Practical – IV: Microprocessor Lab ------this one changed to pc lab ---contact lab