What is a pointer on a pointer in c programming language?
590
What is makefile in unix?
514
What is difference between @factory and @dataprovider annotation?
515
what about electrical pannel.?
What is meant by plc pannel.?
1851
What is the difference between map and flatmap in java?
449
Is there another way to check whether Namenode is working?
226
What is ctrl alt z function?
309
Explain can you implement data mining in ssrs?
102
What is base html in django?
226
What is the common source of leak in stern tube
1466
#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.
3211
I WRITE GROUP-4 EXAMINATION.I STADIYING INTERMEDET
HOW MANY PARSANTEGE OF GROUP-4 EXAMINETIN
2518
Define pair?
562
any body who gone thru recent iocl
interview.INSTRUMENTATION questions. I need.
1923
What are the differences between inviscid and viscous flow?
647