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))
A: A class which is used to traverse through the objects maintained through a container class. There are _ve categories of iterators: output iterators, input iterators, forward ite
Introduction to C++ C++ was developed by Bjarne Stroustrup at Bell Laboratories in 1983. Originally, it was known as " C with class". C+ as an enhancement to the C language was
P o i n t e r d e c l a r a t i o n f o r d a t a m e m b e r : M e t h o d 1 : i n t M : : * p x ; / / T h i s
What is a newline escape sequence? - A newline escape sequence is signified by the \n character. - It is used to insert a new line whereas displaying the output data. - T
A: In C++ there is a main difference among a template and a macro. Merely a macro is a string which the compiler replaces along with the value that was defined. For example #define
L is a text and can be composed of any of the characters {, }, (, ) , and P, where P will represent the instruction. L will contain single spaced characters where each character
program that convert take decimal digit and convert it to binart digit
1. Basic Heap: Each memory location in our model of the RAM will be an instance of type Memory: 2. typedef union Memory_u Memory; 3. union Memory_u{ 4. char character;
Create a Document that show information about albums. First create a paragraph or two about the purpose of the page and your interests in music: genres, styles, etc. Next have a
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
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