+1 vote
in Data Structures & Algorithms I by (110k points)
Which of these operators have the highest order of precedence?

(a) ‘(‘ and ‘)’

(b) ‘*’ and ‘/’

(c) ‘~’ and ‘^’

(d) ‘+’ and ‘-‘

Asked question is from Application of Stacks in section Application of Stacks of Data Structures & Algorithms I

I have been asked this question during a job interview.

1 Answer

+1 vote
by (408k points)
selected by
Best answer
The correct answer is (c) ‘~’ and ‘^’

To explain: The highest order of precedence is ~ and ^ followed by ‘*’ ,’ /’, ‘+’ ,’-‘ and  then braces ‘(‘ ‘)’.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.