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
Can main method override?
What is polymorphism oop?
How oops is better than procedural?
What is meant by oops concept?
What is interface in oop?
What is methods in oop?
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
What is interface? When and where is it used?
Why oops is important?
What is encapsulation in oops?
Why do we use polymorphism in oops?
Can abstract class have normal methods?
What is overriding in oops?
what are the realtime excercises in C++?
• What are the desirable attributes for memory managment?