Differentiate between the function of '+' operator when used with integers and string values.
Answers
Answered by
59
'+' operators used with integers to add the two integer, but it is used to concatenate or merge the two string.
Explanation:
- '+' operator is used with the integer: It is used to add the two integers value. for example '4+5' will give 9. This '+' operator is used in various programming languages for the addition of the integer value.
- '+' operator with string: It is used to concatenate or merge the two string when this operator is used with the two string. For example "Hellow"+"world", becomes "Hellowworld". This operator is used in various programming for the concatenation or merging the two or more string.
Learn more:
- operator: https://brainly.in/question/8492581
Answered by
7
Answer:
'+' operater when used with numbers it gives the sum as output, when '+'operater is used with string values it concatenates two string together
Similar questions
Computer Science,
6 months ago
Social Sciences,
6 months ago
Math,
1 year ago
History,
1 year ago
Science,
1 year ago