Are parentheses considered operands?

Posted on 2011-04-23
Last Modified: 2012-05-11
I'm just going over some notes for my data structures and algorithms class and I would like to know if parentheses are considered operands? If not, what are they called?


Also, are ABCDEF operands while +*-/^ are operators?
Question by:Eindoofus
    LVL 31

    Accepted Solution

    In the way you used them, the parenthesis are not operands. They are used here just to define the top-level order of operations. Usually they are used to change the default order of operations that you happen to be using.

    ABCDEF are operands, and +*-/^ are binary operators as used here. However, +- can also be unary operators, as in +3/9. Here the + is a unary operator since it takes on only one operand.
    LVL 31

    Expert Comment

    As you may already know, in some computer languages, for example, C++, the parenthesis not only serves as a way to change the default order of operations, but also can serve as a calling operator on a function pointer or can be defined overloaded in a class so that the the unary operator, () can be applied to a class object.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Prime numbers are natural numbers greater than 1 that have only two divisors (the number itself and 1). By “divisible” we mean dividend % divisor = 0 (% indicates MODULAR. It gives the reminder of a division operation). We’ll follow multiple approac…
    This video discusses moving either the default database or any database to a new volume.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now