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 the significance of classes in oop?
What is oops in simple words?
What is overloading in oop?
What are the benefits of oop?
What is object in oop with example?
What is static in oop?
What are the benefits of interface?
Plese get me a perfect C++ program for railway/airway reservation with all details.
write knight tour problem which is present in datastructure
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
How long to learn object oriented programming?
program for insertion ,deletion,sorting in double link list
What is class and object in oops?
What is difference between abstraction and encapsulation?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)