search
Log In

Recent questions tagged operator-precedence

1 vote
3 answers
1
Which operator has higher priority between *and / in any expression how to evaluate them
asked Dec 18, 2018 in Programming Ram Swaroop 76 views
0 votes
1 answer
2
1 vote
1 answer
3
Let "if x then y else z" denote the expression and this expression can be represented ad "?xyz" using ternary prefix operator the prefix operator for the following expression is If a then if c-d then a+c else a*c else a+b A) ?-acd+ac?+ab+ac B) ?a?-cd+ac*ac+ab C)?a-cd?+ac*ac+ab D )none
asked Jul 27, 2018 in Programming Kalpataru Bose 84 views
0 votes
0 answers
4
Can someone explain why this is happening. I have found post increment has higher precedence than pre-increment . And Post increment is left associative and pre-increment is right associative. For the 1st printf it it is 5,6 but the 2nd printf it is 6,7 Why in post increment both statemet has differenet value. https://www.geeksforgeeks.org/c-operator-precedence-associativity/
asked May 7, 2018 in Programming Abhijit Sen 4 164 views
1 vote
0 answers
5
There is a loop when we will make tree and we wont be able to decide whether + or * has higher precedence.... HOW TO SOLVE IT?
asked Dec 29, 2017 in Compiler Design dark.hacker.beyhadh 53 views
0 votes
1 answer
6
the associativity of which of the following operators is Left to Right, in C++? 1) Unary Operator 2) Logical not 3) Array element access 4) addressof
asked Nov 9, 2017 in Others Devwritt 369 views
0 votes
3 answers
7
What is the value of the arithmetic expression (Written in C) 2*3/423/4* 2 (A) 0 (B) 1 (C) 1.5 (D) None of the above
asked Apr 2, 2017 in Programming rohini 808 views
0 votes
0 answers
8
Consider the following left associative operators in decreasing order of precedence : - subtraction (highest precedence) * multiplication $ exponentiation (lowest precedence) What is the result of the following expression ? 3 – 2 * 4 $ | * 2** 3 $-61$ $64$ $512$ $4096$
asked Sep 16, 2016 in Programming makhdoom ghaya 793 views
0 votes
1 answer
9
The value of the following expression $(13 / 4 * 3) % 5 + 1$ is $5.75$ $2.95$ $1.4875$ $5$
asked Sep 6, 2016 in Programming and DS makhdoom ghaya 1.3k views
0 votes
1 answer
10
$X - = Y + 1$ means $X = X – Y + 1$ $X = -X - Y - 1$ $X = -X + Y + 1$ $X= X - Y - 1$
asked Aug 21, 2016 in Programming and DS makhdoom ghaya 247 views
2 votes
2 answers
11
#include<stdio.h> int main(void) { int p=3,q=4,y,z; (p>q?y=5:z=10); printf(" %d %d ",y,z); return 0; } Compile Info prog.c: In function 'main': prog.c:5:15: error: lvalue required as left operand of assignment (p>q?y=5:z=10); ^ z is already a variable ,then why it is saying lvalue required ??
asked Jul 21, 2016 in Programming indrajeet 164 views
2 votes
2 answers
12
Consider the following grammar E → E+T/T T → T*F/F F → id/(E) Calculate Lead and Last for every Non terminal.
asked Jun 27, 2016 in Compiler Design LavTheRawkstar 1.7k views
0 votes
2 answers
13
what is the order of evaluation (by precedence and associativity) int x=7,y=6,z; z=++x + y++ - ++y + x++ - --y + --x + x-- + y--; sorry i give much lengthy expression but my intension is to clear my doubt about the fact: pre/post which one evaluate 1st. scan expression from right to left or left to right. inc/dec which one evaluate first.
asked May 20, 2016 in Programming Sourabh Kumar 139 views
To see more, click for the full list of questions or popular tags.
...