For a)
From C# Specification, section 7.2.1:
When an operand occurs between two operators with the same precedence, the associativity of the operators controls the order in which the operations are performed:
- Except for the assignment operators, all binary operators are left-associative, meaning that operations are performed from left to right. For example, x + y + z is evaluated as (x + y) + z.
- The assignment operators and the conditional operator (?:) are right-associative, meaning that operations are performed from right to left. For example, x = y = z is evaluated as x = (y = z).
This means that the operators will get precedence, in this situation, from left to right.
b) Yes, this is correct. This is a Cast Expression, described in section 7.6.6, which is applied to a unary expression, and casts are categorized with the Unary operators (Section 7.6) and treated with the same precedence.