What is c++ in english?
998
How can you link a c program with a c function?
1005
#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.
3700
How can a C function be called in a C++ program?
693
Advantage and disadvantage of routing in telecom sector
1248
What are the advantages of prototyping?
1005
Is c++ double?
978
Do you know about Agilent PRECOMPILERS. ?
976
What are static type checking?
1009
Following are the class specifications:
class {int a};
class {int b};
Using friend funtion,calculate the max of two objects and
display it.
2408
Define pointers?
1006
What are the advantages/disadvantages of using #define?
1054
What is stl containers in c++?
989
How long will it take to learn programming?
989
Draw a flow chart and write a program for the difference
between the sum of elements with odd and even numbers.
Two dimensional array.
6341