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 this pointer in oop?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is the diamond problem in inheritance?
What do you mean by abstraction?
What is interface in oop?
What is the example of polymorphism?
What makes a language oop?
What is the types of inheritance?
What is polymorphism what is it for and how is it used?
What is encapsulation selenium?
Can abstract class have normal methods?
which feature are not hold visual basic of oop?
What is polymorphism and example?
What are the data types in oop?
What is abstraction in oop with example?