Tell me when a conditional statement is ended with an endif?
477
What is the use of a summary index?
161
How many types of Transformation are there?
222
What is a record of data?
193
generally how much percentage is required to sit in exam of
PSU'S for mechanical engg. candidate (general category)
2400
How to select some specific rows from a table in ms sql server?
545
What is the role of cell reference in the calculation in excel?
288
Explain the account payables submodule? : fi- accounts payable
612
What are some standards supported by the Presentation layer?
702
#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.
3217
does the query needs a hint to access a materialized view?
1448
How to create a simple query in ms access 2013?
446
What is app pool and app domain? What is the difference between the two in iis?
479
What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?
563
What is internet of everything?
1