What is a premium?
678
what all the services that salesforce supports?
568
What does the term localization refer to?
1182
How do I change the background color in excel 2010?
639
Write a factorial program using recursion in java?
1088
What do you know about Schedule 6?
1166
What is the purpose of self join?
1035
What is the use of FIELDWIDTHS?
1423
Why we have to present first and second draft(Bill of
Exchange) for bank negotiation.Why cant we present only One
draft?
4077
How do you replace multiple characters in word?
651
What is the use of @inject annotation?
464
How do I check my android os version?
1101
#include
#include
#include
#include
void insert(struct btreenode **, int);
void inorder(struct btreenode *);
struct btreenode
{
struct btreenode *leftchild;
struct btreenode *rightchild;
int data;
};
main()
{
struct btreenode *bt;
bt=(struct btreenode *)NULL;
int req,i=1,num;
clrscr();
printf("Enter number of nodes");
scanf("%d",&req);
while(i<=req)
{
printf("Enter element");
scanf("%d",&num);
insert(&bt,num);
i++;
}
inorder(bt);
}
void insert(struct btreenode **sr, int num)
{
if(*sr==NULL)
{
*sr=(struct btreenode *)malloc (sizeof(struct btreenode));
(*sr)->leftchild=(struct btreenode *)NULL;
(*sr)->rightchild=(struct btreenode *)NULL;
(*sr)->data=num;
return;
}
else
{
if(num < (*sr)->data)
insert(&(*sr)->leftchild,num);
else
insert(&(*sr)->rightchild,num);
}
return;
}
void inorder(struct btreenode *sr)
{
if(sr!=(struct btreenode *)NULL)
{
inorder(sr->leftchild);
printf("\n %d",sr->data);
inorder(sr->rightchild);
}
else
return;
}
please Modify the given program and add two methods for post
order and pre order traversals.
3830
What is sandbox and explain different types of sandboxes?
512
How do I access outlook email?
3