C++ Programming
OPERATORS MCQs
Total Questions : 10
In this program, we are casting the operator to integer, So it is printing as 21 and 10
Output:
$ g++ op5.cpp
$ a.out
21 10
Here the condition is false on conditional operator, so the b value is assigned to c.
Output:
$ g++ op1.cpp
$ a.out
6
Because of the precedence the pre-increment and post increment operator, we got the output
as 749736.
Output:
$ g++ op.cpp
$ a.out
749736
:j starts with the value 10. j is then incremented to 11. Next, j is added to 100. Finally, j
(still containing 11) is added to 999 which yields the result 1010.
Output:
$ g++ op2.cpp
$ a.out
1010
It is a separtor here.In c,the value a is stored in c and in d the value b is stored in d because of
the bracket.
Output:
$ g++ op3.cpp
$ a.out
5 6
Because the dynamic_cast operator is used to convert from base class to derived class.
Because the * operator is having highest precedence, So it is executed first and then the + operator
will be executed.
Output:
$ g++ op1.cpp
$ a.out
20
None
In this operator, if the condition is true means, it will return the first operator, otherwise second operator.
The operator which is having highest precedence is postfix and lowest is equality.
Recent Questions
Q. The Mortar In Which Both Cement And Lime Are Used As Binding....
Q. In....
Q. High Temperature In Gasification Of Coal Favours
Q. The __________ Engines Can Work On Very Lean Mixture Of Fuel....
Q. Ch....
Q. Purification Of Blood Takes Place In
Q. What Is The Minimum Vapour Pressure (in KPa) Of The Working ....
Q. The Kaposi’s Sarcoma Is Caused By ____________________
Q. Neutral Atmosphere Is Maintained In A/an __________ Furnace.....
Q. Raju Has 14 Currency Notes In His Pocket Consisting Of Only....
Q. " You Are Thinking Very Highly About Ravi But He Is Not....
Q. The Range Of Electromagnetic Spectrum Important In Heat Tran....
Q. Th....
Q. January : November : : Sunday : ?
Q. Consider The Following Statements.There Are 25 High Courts I....
Q. T....
Q. In Which Type Of Sedimentation, The Flocculent Suspension Of....
Q. Hardening Of Metal Is Due To Heating To A Particular Temper....
Q. Which Of The Following Materials Has The Highest Electrical ....
Q. ....