1,633 views

3 Answers

Best answer
1 1 vote
Output: 102030

Explanation: Since "==" is a relational operator and not an assignment operator, value of none is changed.

                     It's just evaluating whether they are equal or not without performing any assignment.

NOTE: This code isnt properly formatted so might not produce output.
• selected by
0 0 votes

a == b is checked if they are equal .... they are not equal

 therefore returns 0 which is assigned to c

therefore a=10 b =20 c =0

ANS - 10 20 0

Position:
Show:

Related questions

1 1 vote
1 1 answer
193
193 views
khanshahima4 asked Sep 24
193 views
1. If precedence tells me which operator has priority, and associativity tells me how to handle operators at the same level, then why do I need a separate concept called ...
14 14 votes
1 1 answer
1.3k
1.3k views
GO Classes asked Jul 2
1,286 views
Assume:$\texttt{short = 2 bytes}$, $\texttt{int = 4 bytes}$, $\texttt{char = 1 byte}$$\texttt{int}$ needs $4$-byte alignment and the final structure size is rounded to a ...
17 17 votes
2 2 answers
695
695 views
GO Classes asked Jul 2
695 views
Assume:struct Student { double gpa; }; struct Student alice; struct Student *sptr = &alice;Which of the following correctly assigns $\texttt{4.0}$ to $\texttt{alice.gpa}$...
10 10 votes
1 1 answer
522
522 views
GO Classes asked Jul 2
522 views
Consider the following code idea from the source:typedef struct { double x, y; } Point; void reset(Point p) { p.x = p.y = 0; } int main() { Point a = {12.0, 42.0}; Point ...