Operators
- What is the use of dynamic_cast operator?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Because the dynamic_cast operator is used to convert from base class to derived class.
- What is the output of this program?
#include
using namespace std;
int main()
{
int p;
p = 15 + 13 * 6;
cout << p;
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Because the * operator is having highest precedence, So it is executed first and then the + operator will be executed.
- What is this operator called ?:?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In this operator, if the condition is true means, it will return the first operator, otherwise second operator.
- Which operator is having the highest precedence?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The operator which is having highest precedence is postfix and lowest is equality.
- Which operator is having the right to left associativity in the following?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Type cast