Answer Posted / sujatha
unary operator is an type of operator which have only one
operand.
ex : 1)unary plus or minus (to change the sign of variable)
2)increment or decrement ( increase or decrease the
value of variable)
unary plus or minus :
ex :
#inclucde<iostream.h>
void main()
{
int a=-10;
cout<<"a="<<(-a);
int b=20;
cout<<"b="<<++b;
}
out put :
a=10
b=21
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is super in oop?
Write a program to reverse a string using recursive function?
What is advantage of inheritance?
can inline function declare in private part of class?
How do you define social class?
What is abstract class in oop?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is the real time example of encapsulation?
What is inheritance in oop?
program for insertion ,deletion,sorting in double link list
Why is polymorphism needed?
What is class and object with example?
Why multiple inheritance is not possible?
How to improve object oriented design skills?
What is a superclass in oop?