Q: Which operator is having the right to left associativity in the following?
Solution: There are many rights to left associativity operators in C++, which means they are evaluation is done from right to left. Type Cast is one of them. Here is a link of the associativity of operators: https://github.com/MicrosoftDocs/cpp-docs/blob/master/docs/cpp/cpp-built-in-operators-precedence-and-associativity.md
Q: Which operator is having the highest precedence?
Solution: The operator which is having the highest precedence is postfix and lowest is equality.
Q: What is this operator called ?:?
Solution: In this operator, if the condition is true means, it will return the first operator, otherwise second operator.
Q: What is the use of dynamic_cast operator?
Solution: Because the dynamic_cast operator is used to convert from base class to derived class.
Q: How are many sequences of statements present in c++?
Solution: There are five sequences of statements. They are Preprocessor directives, Comments, Declarations, Function Declarations, Executable statements.
Q: The if..else statement can be replaced by which operator?
Solution: In the conditional operator, it will predicate the output using the given condition.
Q: The switch statement is also called as?
Solution: The switch statement is used to choose the certain code to execute, So it is also called as selective structure.
Q: The destination statement for the goto label is identified by what label?
Solution: colon is used at the end of labels of goto statements.
Q: How many types of loops are there in C++?
Solution: There are four types of loop. They are the while, do while, nested, for the loop.
Q: Which looping process is best used when the number of iterations is known?
Solution: Because in for loop we are allowed to provide starting and ending conditions of loops, hence fixing the number of iterations of loops, whereas no such things are provided by other loops.
You Have Score    | /10 |