[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Are parentheses considered operands?

Posted on 2011-04-23
2
Medium Priority
?
539 Views
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?

(A+B)*(C-D)/E^F

Also, are ABCDEF operands while +*-/^ are operators?
0
Comment
Question by:Eindoofus
  • 2
2 Comments
 
LVL 32

Accepted Solution

by:
phoffric earned 1000 total points
ID: 35453934
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.
0
 
LVL 32

Expert Comment

by:phoffric
ID: 35454007
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.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Software development teams often use in-memory caches to improve performance. They want to speed up access to, or reduce load on, a backing store (database, file system, etc.) by keeping some or all of the data in memory.   You should implement a…
Introduction Many of the most common information processing tasks require sorting data sets.  For example, you may want to find the largest or smallest value in a collection.  Or you may want to order the data set in numeric or alphabetical order. …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month20 days, 5 hours left to enroll

873 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