Tuesday, July 28, 2009

Plus signs?

Which of the following meanings of the plus sign, +, are built-in to the language (and/or standard libraries or classes that we have been using with the language)?


A. Numeric addition


B. The logical "or" operation


C. Numeric exponentiation


D. Character string concatenation

Plus signs?
A and D.





The OR operator is a double-pipe ||


The exponentiation operator is a caret ^
Reply:here's an idea....what language are you talking about. Ok I'm actually not going to help you cheat on a test. STUDY YOU CHEATER!
Reply:Please define "the language".


Most programming languages use the + symbol as a binary operator for numeric addition. Additionally, some loosely typed languages (usually scripting languages) support string concatenation with the + symbol.


No comments:

Post a Comment