C Programming - Expressions - Discussion

Discussion Forum : Expressions - General Questions (Q.No. 1)
1.
Which of the following is the correct order of evaluation for the below expression?
z = x + y * z / 4 % 2 - 1
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
Answer: Option
Explanation:
C uses left associativity for evaluating expressions to break a tie between two operators having same precedence.
Discussion:
92 comments Page 8 of 10.

Bagavathi said:   8 years ago
Answer of c+=(a>0&&a<=10)?++a:a/b;a=50;b=10;c=20;

Vansh said:   9 years ago
What is value of c if a = 4, b = 7?

c = ++a/10*a--%--b/++a.

Anjaneyagouda said:   8 years ago
If a=i*(j/=k/i) if a=5, i=2, j=3, k=4, how to solve this?

Rajoo said:   8 years ago
Anybody, explain me the answer of this question. please.

Rajeev said:   7 years ago
Hi, I am not getting this, Please anyone explain me.
(1)

Sumath said:   4 years ago
I didn't get it properly, please explain me anyone.
(2)

Shishir said:   8 years ago
How y=a++differs from y=++a if value of a is 5?

Akil Prakash said:   7 years ago
I am not getting this. Please anyone explain me.

Gaurav said:   7 years ago
int a=10;
b=--a + ++a;.

Output of b is 20 how?

Raksha said:   1 decade ago
Plus and minus is taken frist preference right.


Post your comments here:

Your comments will be displayed after verification.