Explain pipe() operation. How it writes the result to the standard output?
280
What does n a mean in excel?
670
Is truncate a dml command?
958
What is General Insurance policy? What does it cover?
621
Explain in detail about the advantages and features of json?
1
Tell about India's relation with Israel.
1145
How can you debug asp.net ajax applications?
873
#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.
3773
mention what is the difference between a single quote and double quote?
5
what are nullable types in c#
1050
What do you mean by command line argument?
1186
What are the tables in testplans
1080
How to make a chain of function decorators?
893
What is true about localstorage?
987
What is the meaning of 0:1 cardinality of context node in web dynpro application?
357