|
Hi! Welcome to the Great One's home Page.My Name is Narayanan.I am presently studying at the University of Bridgeport.On the left you can see some of my friends in UB.My life in the University of Bridgeport is wonderful.If you want to check out my University then click here 
I'm 18 years old, from Connecticut, USA.I am originally from The Beautiful city of Madras, where I did my schooling at St.John's English School .After my schooling I was admitted into The Indian Institute of Technology, but I chose not at attend for certain reasons and hence I am here at the University of Bridgeport.
My Country of Origin is India, but right now I am studying in the...
My Family
|
|
The People you see in the photo on your left are my Grand Parents.They are the real reason why I am what I am.I do not have a picture of my parents but I will be getting one soon, so that you can see the other reasons for my success.By nature I am not a very hard working type but when I do have to get something done there is no stopping me( I am proud to make this statement since I know this true).My Grandparents are presently in California, and my parents are in Hyderabad.I have one brother too who is 6 yrs younger than me.I don't have his photo either but will soon have it.I like watching movies,playing cricket,WWF and lots of other things.....
|
The Great One's likes and dislikes......
|
I love playing Cricket.I may be one among millions but is my favourite batsman.I love.I am also a big Fan of Boris Becker.Oh You did'nt know, your *** gonna call somebody!! I am a BIG fan of the As you can see, picture to your left is one of my favourite wrestlers-- If you too like the
then click on the above link to update urself on the latest happenings in the Federation.
For all my friends: This is the C++ program Assignment #4, converting infix to postfix:
//Thirupathi K Narayanan
//St ID 406848
//Assignment #4 Section 9C
//Convert infix to postfix operation
#include
#include
#include
struct op { // structure to store op. data
char op_name;
int priority;
};
op oplist[6]={'*',2,
'/',2,
'+',1,
'-',1,
'(',3,
')',0
};
int match(char ch);
void push(char stack[], int& top,char ch,int size);
char pop(char stack[],int& top);
main()
{
char stack[30];//stack declaration
int top;//top of stack
char ch,ch1;//value to be pushed or popped
int size=30;
int pty1,pty2;//variables to keep priorities)
char res[50];
int i=-1,j;
ch=' ';
fflush(stdin);
pty2=-1;
top=-1;//indicates stack is empty
cout<<"\nEnter the infix expression char by char";
cout<<"\nTerminate the expression by a '#'";
while (ch!='#')
{
pty1=match(ch);
switch(pty1)//check for type of term in the expression
{
case -1:res[++i]=ch;
break;
case 0: ch1=pop(stack,top);
while (ch1!='(')
{
res[++i]=ch1;
ch1=pop(stack,top);
}
if(top>=0) pty2 = match(stack[top]);
break;
default:if(stack[top]=='(') pty2=-1;
while(pty1 <= pty2)
{
ch1=pop(stack,top);
res[++i]=ch1;
pty2=match(stack[top]);
}
push(stack,top,ch,size);
pty2=match(stack[top]);
break;
}
cout<<"\nEnter the next element of infix expression : ";
cin>>ch;
fflush(stdin);
}
//Empty the stack
while(top>-1)
{
ch1=pop(stack,top);
res[++i]=ch1;
}
//Print the postfix expression
cout<<"\n\n\n\nThe Postfix expression is\n\n\n\n:-";
for(j=0;j<=i;j++)
cout<=0)
{
v=stack[top];
top--;
return v;
}
else
{
cout<<"\nThe stack is empty";
return (' ');
}
}
int match(char ch)
{
int i;
for(i=0;i<6;i++)
{
if(ch==oplist[i].op_name)
return oplist[i].priority;
}
return -1;
}
|
| | |