What is a unary operator?

Answer Posted / ajay yadav

Unary operators are those...which operate on only one
operand.
For eg. a++(only one operand is present) as we are
incrementing the value for a.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what type of question are asked in thoughtworks pair programming round ?

1758


Why is polymorphism needed?

591


What is abstraction in oops with example?

770


How many human genes are polymorphic?

570


write string class as your own class in java without using any built-in function

1976






How Do you Code Composition and Aggregation in C++ ?

24191


What is polymorphism and its types?

593


What is the diamond problem in inheritance?

577


What are the 3 principles of oop?

616


What is the renewal class?

2161


What is balance factor?

582


#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.

3246


What causes polymorphism?

569


What is a class in oop?

599


what are the realtime excercises in C++?

2333