Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is a unary operator?

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


Please Help Members By Posting Answers For Below Questions

What is the significance of classes in oop?

1163


What is oops in simple words?

1110


What is overloading in oop?

1016


What are the benefits of oop?

1266


What is object in oop with example?

1251


What is static in oop?

1089


What are the benefits of interface?

1067


Plese get me a perfect C++ program for railway/airway reservation with all details.

3909


write knight tour problem which is present in datastructure

2662


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

2289


How long to learn object oriented programming?

1102


program for insertion ,deletion,sorting in double link list

2696


What is class and object in oops?

1153


What is difference between abstraction and encapsulation?

1091


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6685