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))
pl i need this before 24 march pl send it
Structures A structure is a user-defined data type, which may have different data types as its members. Creating a structure is a two-part process. First, a structure template
Define the Bitwise-Exclusive-OR Operator: ^: The bitwise-exclusive-OR operator (^) compares every bit of its first operand to the corresponding bit of its second operand. If on
Program is to reverse the names stored in an array pointer: Program is to reverse the 6 names stored in an array pointer as name[] void main() { clrscr(); char
http://www.expertsmind.com/questions/decodethecode-30110560.aspx
how many values we can return from pointer to function?
Control Flow The control flow statements are used when it is needed that the flow of the program is to be changed after taking some decision. This control flow statement theref
assume that the first integer read with cin specifies the number of values remaining to be entered. that program should read only one value each time cin is executed .a typical inp
#program code
Derived Data Type: Array is derived data type to store large collection of data of only one data type. int mark[100]; char names[25]; Function: will be discussed early
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