Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Example of structure:
struct item
{
int element;
node_ptr next;
};
typedef node_ptr stack;
stack create(void)
stack s;
s=(stack)malloc(sizeof(struct item));
s->next=NULL;
return s;
}
void push(stack s,int a)
node_ptr temp;
temp=(node_ptr)malloc(sizeof(struct item));
temp->element=a;
temp->next=s->next;
s->next=temp;
int is_empty(stack s)
return(s->next==NULL);
void pop(stack s)
temp=s->next;
s->next=temp->next;
free(temp);
int top(stack s)
return(s->next->element);
void main()
char exp[100];
int i;
s=create();
clrscr();
printf("Enter an expression\n");
scanf("%s",exp);
for(i=0;exp[i];i++)
if(exp[i]=='('||exp[i]=='['||exp[i]=='{')
push(s,exp[i]);
else
if(exp[i]==')')
if(top(s)!='(')
printf("Invalid Expression");
return;
pop(s);
if(exp[i]=='}')
if(top(s)!='{')
if(exp[i]==']')
if(top(s)!='[')
if(!is_empty(s))
Recently social media has been flooded by fb posts, tweets, news articles about only thing demonetization.A great debate is ongoing over it. Most of the people discussing in social
Ask4. Write a query to display the columns listed below. The query should list each customer in which the video rental is overdue. The Days_Overdue column should calculate the numb
Looping Statements The statements usually used for looping are for, do-while, while. The goto statement can be used for looping, but its use is generally avoided as it leads to
My file pointer is going to the location which i specified and writing the value but it is in next line so,please help me iam developing in visual studio6
Define Internal static storage class - computer programming? The Internal static variables are those that declared inside a function. The scope of the internal static variables
Explain protected, public, private in C++? These are three access spaecifiers in C++. - Public - Here data members and functions are accessible outside the class. - Pr
i need amibroker afl to dll plugin
Input Output Most languages have "statements" to perform I/O . Though in C and C++ we use "functions" to perform I/O. C++ also has its own I/O mechanism - the cin and cout obje
Solve the Nine Queens problem recursively. The objective is to place nine queens on an empty chessboard so that no queen is “attacking” any other, i.e., no two queens are in the sa
A Network of routers have been configured for the purposes of handling data traffic within your company. You would like to have an application that does a network
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd