Explanation: In the given expressions 10 + 20 + “GeeksQuiz” and “GeeksQuiz” + 10 + 20 , there are two + operators, so associativity comes to the picture. The + operator is left to right. So the first expression is evaluated as (10 + 20) + “GeeksQuiz” and second expression is evaluated as (“GeeksQuiz” + 10) + 20 .
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.