COMPILER DESIGN THEORY(click on the image and then save it....)

Tuesday, March 30, 2010
(click on the image and then save it....)



djkstras(shortest path)

Monday, March 29, 2010
#include
#include
void sort(void);
static int dsp[10][10],nodes;
struct
{ char src;
char dest;
int length;
}stemp,permanent[10]={' ',' ',0},temp[10]={' ',' ',-1};
static int perm,tem;
void main()
{ int i,j,k,l,m,n=0,point;
char initial,dest,path[10]={' '};
clrscr();
printf("\t\t Shortest Path (Dijkstra's algorithm)");
printf("\n*******************************************************");
printf(“\nEnter the number of nodes:”);
scanf(“%d”,&nodes);
printf(“\nEnter the adjacency matrix for the graph:\n”);

for(i=0;i {
for(j=0;j scanf(“%d”,&dsp[I][j]);
}
fflush(stdin);
printf("\n enter the source node:");
scanf("%c",&initial);
fflush(stdin);
printf("\n Enter the destination node:");
scanf("%c",&dest);

permanent[perm].src=initial;
permanent[perm].dest=initial;
permanent[perm++].length=0;
i=permanent[perm-1].dest-97;

for(j=0;j {
if(i!=j)
{
if(dsp[i][j]>0)
{
temp[tem].src=permanent[perm-1].src;
temp[tem].dest=j+97;
temp[tem++].length=dsp[i][j];
}
}
}

sort();

while(tem>=0)
{
j=permanent[perm-1].dest-97;
for(i=0;i {
if(i!=initial-97)
{
if(dsp[j][i]>0)
{
l=-1;
for(k=0;k
{
if(permanent[k].dest==(i+97))
l=k;
}
for(k=0;k {
if(temp[k].dest==(i+97))
l=k;
}
if(l<0)
{
temp[tem].src=j+97;
temp[tem].dest=i+97;

for(m=0;m {
if(permanent[m].dest==temp[tem].src)
n=permanent[m].length;
}
temp[tem++].length=dsp[j][i]+n;
}
else
{
for(m=0;m {
if(permanent[m].dest==j+97)
{
n=permanent[m].length+dsp[j][i];
break;
}
else
n=dsp[j][i];
}

if((n {
temp[l].length=n;
temp[l].src=j+97;
temp[l].dest=i+97;
}
}
}
}
}

sort();
}

printf("\nShortest path:\n");
printf("From %c to %c is:",initial,dest);
for(i=0;i {

if(permanent[i].dest==dest)
{
point=i;
n=i;
break;
}
}

i=0;

for(j=perm;j>0;j--)
{
if(permanent[j-1].dest==permanent[point].src)
{
path[i++]=permanent[point].dest;
point=j-1;
}
}

path[i]=initial;

for(j=i;j>=0;j--)
printf("%c ",path[j]);

printf("\t length=%d",permanent[n].length);

getch();

}

void sort()
{ int i,j,k;
for(i=0;i<=tem;i++)
{ k=1;

for(j=0;j<=tem;j++)
{
if((temp[j].length <= temp[j+1].length))
{
stemp=temp[j];
temp[j]=temp[j+1];
temp[j+1]=stemp;
k=0;
}
}

if(k)
break;

}

permanent[perm++]=temp[tem-1];
temp[tem-1].src=' ';
temp[tem-1].dest=' ';
temp[tem-1].length=-1;
tem--;

}

DISTANCE VECTOR ROUTING

Sunday, March 28, 2010
#include
#include
#define e 1000
#define nodes1 40
int topology [nodes1][nodes1];
static int l,n,neighb,nodes;
static char neigh[nodes1];
struct
{
char name ;
int delay;
}dv[nodes1];
void main()
{
int i,j,k[nodes1*nodes1],add=0,src1;
char src='a';
clrscr();
printf("\t\t\t Distance vector routing \n");
printf("\n *********************************");
printf("\n Enter the no.of nodes ");
scanf("%d",&nodes);
fflush(stdin);
printf("\n Enter the node for which distance vector table is needed :");
scanf("%c",&src);
fflush(stdin);
printf("\n enter the no of neighbours to %c",src);
scanf("%d",&neighb);
fflush(stdin);
printf("\n enter the no of the neighbours in alphabetic order :");
neigh[0]=src;
for(i=1;i {
scanf("%c",&neigh[i]);
fflush(stdin);
}

printf("\n enter the distance vector of the source and neighbouring nodes ");
printf("\n\n starting with source ,then with neighbouring nodes in alphabetical order:\n");
printf("\n \n starting with source,then with neighbouring nodes in alphabetical order :\n");
for(i=0;i {
scanf("%d",&k[i]);
}
src1=src;
l=nodes;
n=1;
for(i=0;i {
if(i==src1-97)
{
for(j=0;j {
if(k[j]<0)
topology[i][j]=e;
else
topology[i][j]=k[j];
}
}
else if(i==neigh[n]-97)
{
for(j=0;j {
if(k[l]<0)
topology[i][j]=e;
else
topology[i][j]=k[l];

l++;
}
n++;
}
else
{
for(j=0;j topology[i][j]=e;
}
}
i=src1-97;
for(j=0;j {
dv[j].name=src1;
dv[j].delay=topology[i][j];

}
k[nodes*nodes]=e;
n=1;
for(i=0;i {
if(i==neigh[n]-97)
{
add=topology[src1-97][i];
for(j=0;j {
k[j]=add+topology[i][j];
}
for(j=0;j {
if(k[j] {
dv[j].name=i+97;
dv[j].delay=k[j];
}
}
if(i!=src1-97)
n++;

printf("\n %c's distance vector after receiving %c's vector :\n",src1,i+97);
for(j=0;j printf("\n To %c:\t from :%c\t %d\n",j+97,dv[j].name,dv[j].delay);
getch();
}
}
}

Component Diagrams(CLICK ON THE IMAGE AND THEN SAVE IT....

Thursday, March 25, 2010
















Object Diagrams

CLICK ON THE IMAGE AND THEN SAVE IT....


Class Diagrams

CLICK ON THE IMAGE AND THEN SAVE IT....


Usecase Diagrams

CLICK ON THE IMAGE AND THEN SAVE IT....





Activity Diagrams

CLICK ON THE IMAGE AND THEN SAVE IT....




Deployment Diagrams

CLICK ON THE IMAGE AND THEN SAVE IT....

JNTU-HYD 2-2 (R07,R05,RR,NR) Results Are Released

Wednesday, March 10, 2010
check it out in JNTUWORLD and JNTU.ac.in

Triple SIM Phone @ Rs. 4,700

Monday, March 8, 2010


Intex has launched its first ever triple SIM handset known as IN 5030 in India.
The phone can take two GSM cards and a CDMA SIM. That means you get connectivity over three different networks at one time . IN 5030 is Priced at Rs. 4,700 in India.

Key Features

  • Tri SIM (G+G+C)& Tri Standby
  • 2.0" TFT Screen & 65k Colours
  • Java and GPRS
  • Wireless FM radio & Bluetooth
  • Audio and Video Player
  • 1.3 MP camera
  • Webcam option
  • WAP support
  • Talk Time Upto 4 Hrs.
  • Mobile Tracker
  • Modem
  • PC Suite,Mass storage
  • MMS
  • Internal memory expanded upto 4 GB.
Sunday, March 7, 2010



OS IMPORTANT QUESTIONS

Saturday, March 6, 2010
1)PROCESS
2)PROCESS STATES
3)SEMAPHORES(binary,bounded)
4)PRIMITIVE AND NON PRIMITIVE SCHEDULING
5)PAGING
6)TLB

IS INTERNAL QUESTIONS

PGP
MIME
DES
IDEA
SHA
MD 5
RSA
SECURITY SERVICES
SECURITY MODEL
Security attacks
key management
MIME,S/MIME
Kerberos X.509 algorithm

OOAD INTERNAL QUESTIONS

Wednesday, March 3, 2010
Things,
Relations,
Extensibilty mechanisms,
Principles of modeling,
Importance of modeling,
UML definitions,
Class diagrams,
Modeling techniques,
Sequence diagram contents... modeling techniques,
Advanced dependancy relationship , stereotypes,
Classifier attribute and operations

AI IMPORTANT QUESTIONS

1)Explain the following
a)defination of ai
b)agent
c)rational agent
d)structure of agent
2)define task environment and provide some examples?
3)explain bfs with A* algorithm.write down the differences between A* an AO* algorithm?
4)explain min-max search procedure?
5)explain alpha-beta pruning?
6)define syntax&semantics ofpropositional logic.describe the relation concept of propositional logic?
7)what is first order logic.what is the difference between first order logic and propositional logic.describe the cnf grammar for fol?
8)cat and curiosity example?

CN PROBABLE QUESTIONS FOR INTERNAL

1)FUNCTIONS OF DATA LINK LAYER
2)ISDN
3)ATM
4)HDLC FORMAT
5)ALOHA
6)MAC ADDRESS
7)ETHERNET STANDARDS
8)TOKEN RING
9)OSI
10)BRIDGES
11)TOKEN BUS
12)COLLISION FREE PROTOCOLS
13)TYPES OF PHYSICAL MEDIUM

INTERNAL QUESTIONS FOR COMPILER DESIGN

Monday, March 1, 2010
1) a) Explain the different phases of a compiler ?
showing the output of each phase using the example of following statement
position:=initial+rate*60
b) compare the compiler and interpreter with suitable diagrams?
2)a) consider the grammar given below
E->E+E/E-E/E*E/E by E/A/B obtain leftmost and rightmost derivations for the string a+b*a-b
b) explain backtracking with example?
3)a) what is recursive descent parser? construct recursive parsing for the following grammar
E->E+T/T
T->TF/F
F->F*/A/B
b) what is an ambiguous grammar? eliminate ambiguities for the grammar
E->E+E/E*E/(E)/id
4)a) construct LA,LR parsing table for the given grammar
S->cC
C->cC/d
5)a) construct a predictive parse table for the given grammar
E->E+T/T
T->T*F/F
F->F*A/B
b) what are the limitations of Recursive Descent parser ?
6)a) what is LEX?
Explain in detail different sections of LEX program ?
b) write regular expression for the following pattern using auxiliary definitions wherever convenient
1)the set of words having A,E,I,O,U appearing in that order although not necessary consecutive
2)comments in "c"
7)a) explain various forms of three address code?
b) what is an operator grammar give example?
write an operator precedence parsing algorithm?
8) write s-attributed definitions and L-attributed definitions ?