PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Relational and Equality Operators in C: == vs = (रिलेशनल ऑपरेटर्स: तुलना और असाइनमेंट (= बनाम ==) में अंतर) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Relational (<, <=, >, >=) and equality (==, !=) operators compare expressions in C and always return an integer result of 1 (true) or 0 (false). Confusing equality (==) with assignment (=), chaining comparisons like a < b < c, or comparing signed and unsigned values are major C exam traps.
अध्याय सार: C में रिलेशनल (<, <=, >, >=) तथा इक्वैलिटी (==, !=) ऑपरेटर्स दो मानों की तुलना करके हमेशा पूर्णांक 1 (सत्य) या 0 (असत्य) लौटाते हैं। तुलना (==) के स्थान पर असाइनमेंट (=) लिखना, a < b < c जैसी चेन तुलना और साइन्ड-अनसाइन्ड मिश्रण परीक्षा के प्रमुख ट्रैप हैं।
Relational and Equality Operators in C: == vs =: Detailed Notes & Architecture (रिलेशनल ऑपरेटर्स: तुलना और असाइनमेंट (= बनाम ==) में अंतर)
1. Relational vs Equality Operators, Return Types & Precedence (रिलेशनल बनाम इक्वैलिटी ऑपरेटर्स, रिटर्न टाइप व प्राथमिकता)
[EN] C offers four relational operators (<, <=, >, >=) and two equality operators (==, !=). Unlike languages with a dedicated native boolean output type for comparisons, ISO C specifies that every relational and equality expression yields type int with value 1 if true and 0 if false (even when <stdbool.h> is included). Importantly, relational operators sit at precedence level 6, which binds tighter than equality operators at level 7; therefore 5 > 2 == 1 parses as (5 > 2) == 1 and evaluates to 1. Both groups associate from left to right.
[HI] C में चार रिलेशनल ऑपरेटर्स (<, <=, >, >=) और दो इक्वैलिटी ऑपरेटर्स (==, !=) होते हैं। तुलना करने के बाद ये सभी ऑपरेटर्स सदैव int प्रकार का मान 1 (सत्य) या 0 (असत्य) ही लौटाते हैं। ध्यान देने योग्य बात यह है कि रिलेशनल ऑपरेटर्स की प्राथमिकता इक्वैलिटी ऑपरेटर्स से अधिक होती है, अतः 5 > 2 == 1 को कंपाइलर (5 > 2) == 1 के रूप में हल करता है और उत्तर 1 आता है। दोनों ही समूहों का साहचर्य बाएँ से दाएँ होता है।
2. The == vs = Trap and Yoda Conditions (== बनाम = की त्रुटि व योडा कंडीशंस)
[EN] Because assignment (=) is a valid expression returning the assigned value rather than a void statement, writing `if (x = 0)` compiles without syntax error: it overwrites x with 0, evaluates the condition to 0 (false), and skips the if-block. Conversely, `if (x = 5)` sets x to 5 (non-zero, truthy) and always enters the if-block. To catch this bug at compile time, programmers often use 'Yoda conditions' such as `if (5 == x)`: if `=` is accidentally typed (`if (5 = x)`), the compiler immediately rejects it because literal 5 is not a modifiable lvalue.
[HI] C में असाइनमेंट (=) भी एक एक्सप्रेशन है जो असाइन किया गया मान लौटाता है, इसलिए `if (x = 0)` लिखने पर कोई सिंटैक्स एरर नहीं आता—यह x में 0 डालकर शर्त को असत्य बना देता है, जबकि `if (x = 5)` हमेशा सत्य होकर ब्लॉक को चला देता है। इस मानवीय भूल को कंपाइल-टाइम पर ही पकड़ने के लिए 'योडा कंडीशन' (`if (5 == x)`) अपनाई जाती है, क्योंकि यदि गलती से `5 = x` लिख दिया जाए तो 5 के मॉडिफाएबल एल-वैल्यू (Lvalue) न होने से कंपाइलर तुरंत एरर दे देता है।
3. Chained Comparisons Trap (a < b < c) (चेन्ड तुलनाओं (a < b < c) का भ्रम)
[EN] In mathematics and Python, `a < b < c` verifies whether b lies strictly between a and c, but C parses chained relational operators strictly left-to-right as `(a < b) < c`. First, `(a < b)` evaluates to either integer 0 or 1, and that integer 0 or 1 is then compared against c! For instance, `10 < 20 < 5` becomes `(10 < 20) < 5`, which becomes `1 < 5`, returning 1 (true) even though 20 is greater than 5. Always rewrite range checks explicitly with logical AND: `a < b && b < c`.
[HI] गणित या पायथन के विपरीत, C में `a < b < c` का अर्थ यह नहीं होता कि b, a और c के बीच है। चूंकि रिलेशनल ऑपरेटर्स बाएँ से दाएँ जुड़ते हैं, C इसे `(a < b) < c` के रूप में हल करता है। पहले `a < b` से 0 या 1 प्राप्त होता है, और फिर उस 0 या 1 की तुलना c से होती है—जैसे `10 < 20 < 5` पहले `1 < 5` बनकर गलत रूप से 1 (सत्य) दे देता है। सही रेंज जांच के लिए हमेशा `a < b && b < c` लिखना अनिवार्य है।
4. IEEE 754 Floating-Point Equality, Strings & Signed/Unsigned Pitfalls (फ्लोटिंग-पॉइंट तुलना, स्ट्रिंग्स और साइन्ड/अनसाइन्ड खतरे)
[EN] Exact equality (`==`) on IEEE 754 floating-point values frequently fails due to binary rounding errors: `0.1 + 0.2 == 0.3` evaluates to 0 (false) in double precision, requiring an epsilon tolerance check `fabs(a - b) < 1e-9`. Furthermore, IEEE 754 NaN compares unequal to everything, so `NaN == NaN` is 0. Comparing C strings via `str1 == str2` compares pointer addresses rather than characters; `strcmp(str1, str2) == 0` is required. Finally, comparing signed and unsigned values converts negative numbers to large unsigned numbers: `-1 < 1U` evaluates to 0 because `-1` becomes `UINT_MAX`.
[HI] IEEE 754 बाइनरी सन्निकटन के कारण फ्लोटिंग संख्याओं पर सीधा `==` जांचना असफल हो सकता है (जैसे `0.1 + 0.2 == 0.3` असत्य 0 देता है); इसके लिए एप्सिलॉन अंतर `fabs(a - b) < 1e-9` जांचा जाता है। इसी तरह दो C स्ट्रिंग्स पर `str1 == str2` उनके मेमोरी एड्रेस की तुलना करता है, न कि अक्षरों की—कंटेंट के लिए `strcmp(s1, s2) == 0` उपयोग होता है। इसके अतिरिक्त `-1 < 1U` में साइन्ड `-1` स्वतः अनसाइन्ड `UINT_MAX` में बदल जाता है, जिससे परिणाम 0 (असत्य) आता है।
Syntax, Formula & Technical Example (Relational and Equality Operators in C: == vs =)
#include <stdio.h>
int main() {
int x = 5;
printf("eq=%d chain=%d ", x == 5, 10 < 20 < 5);
printf("uns=%d ", -1 < 1U);
if (x = 0) printf("YES"); else printf("NO\n");
return 0;
}
// Output: eq=1 chain=1 uns=0 NO
Relational and Equality Operators in C: == vs = Quick Reference & Comparison Table
| Expression / Operator | Evaluated Behavior in C | Exam Pitfall / Rule |
|---|---|---|
| Equality Operator (==) | Compares two values and returns int 1 or 0 | Never overwrites operands; tests value equality |
| Assignment Operator (=) | Stores RHS into LHS lvalue and returns stored value | if(x=0) evaluates false while mutating x |
| Chained Comparison (a<b<c) | Parses left-to-right as (a < b) < c returning 0/1 | 10 < 20 < 5 returns 1; use && instead |
| Relational vs Equality (< vs ==) | Relational operators bind tighter than == and != | 10 > 5 == 1 evaluates as (10 > 5) == 1 |
Relational and Equality Operators in C: == vs = Top 20 Bilingual MCQs with Answers
Q1. What is the data type and value returned by `(15 > 9)` in standard C?
(मानक C में `(15 > 9)` एक्सप्रेशन किस डेटा टाइप का क्या मान लौटाता है?)
(A) unsigned int with value 1
(B) bool with value true
(C) char with value '1'
(D) int with value 1
Correct Answer: (D)
[EN] ISO C defines all relational and equality operators to yield type int equal to 1 (if true) or 0 (if false).
[HI] ISO C मानक के अनुसार सभी रिलेशनल व इक्वैलिटी ऑपरेटर्स int डेटा टाइप में 1 (सत्य) या 0 (असत्य) मान ही लौटाते हैं।
Q2. What is the output of `int x = 10; if (x = 0) printf("A"); else printf("B"); printf("%d", x);`?
(`int x = 10; if (x = 0) printf("A"); else printf("B"); printf("%d", x);` का आउटपुट क्या होगा?)
(A) Compile error
(B) B10
(C) B0
(D) A10
Correct Answer: (C)
[EN] x = 0 assigns 0 to x and returns 0 (false), taking the else branch to print B, then prints updated x (0).
[HI] x = 0 लिखने से x में 0 स्टोर होता है और शर्त 0 (असत्य) होकर else भाग में B प्रिंट होता है; बाद में x का नया मान 0 प्रिंट होता है।
Q3. What does `printf("%d", 30 > 20 > 10);` print in C?
(C में `printf("%d", 30 > 20 > 10);` क्या प्रिंट करेगा?)
(A) 1
(B) Compile error
(C) 10
(D) 0
Correct Answer: (D)
[EN] Associativity is left-to-right: (30 > 20) yields 1, then 1 > 10 evaluates to 0 (false).
[HI] बाएँ से दाएँ मूल्यांकन होने पर पहले (30 > 20) से 1 बनता है, फिर 1 > 10 जांचने पर परिणाम 0 (असत्य) आता है।
Q4. Why do C programmers sometimes write `if (10 == count)` instead of `if (count == 10)`?
(C प्रोग्रामर कभी-कभी `if (count == 10)` के बजाय `if (10 == count)` (योडा कंडीशन) क्यों लिखते हैं?)
(A) Because it converts count to const automatically
(B) Because == does not work when a variable is on the left
(C) Because constants execute faster on the left side
(D) So accidentally typing `=` instead of `==` triggers a compile-time lvalue error
Correct Answer: (D)
[EN] Writing `if (10 = count)` is rejected by the compiler because 10 is a non-modifiable rvalue, preventing silent assignment bugs.
[HI] यदि गलती से `10 = count` लिख दिया जाए, तो 10 के Lvalue न होने से कंपाइलर तुरंत त्रुटि पकड़ लेता है और बग बच जाता है।
Q5. What does `-1 < 1U` evaluate to on a standard 32-bit C compiler?
(मानक 32-बिट C कंपाइलर पर `-1 < 1U` का मान क्या होता है?)
(A) 0 (false)
(B) Compile-time error
(C) -1
(D) 1 (true)
Correct Answer: (A)
[EN] Comparing signed int (-1) with unsigned int (1U) converts -1 to UINT_MAX (4294967295U), and 4294967295U < 1U is false (0).
[HI] signed int (-1) की तुलना unsigned int (1U) से होने पर -1 अनसाइन्ड UINT_MAX (4294967295) में बदल जाता है, जो 1U से छोटा नहीं है, अतः 0 आता है।
Q6. What is the result of `printf("%d", 8 > 3 == 1);` in C?
(C में `printf("%d", 8 > 3 == 1);` का परिणाम क्या होगा?)
(A) 1
(B) Syntax error
(C) 8
(D) 0
Correct Answer: (A)
[EN] Relational operator > has higher precedence than equality operator ==, so it parses as (8 > 3) == 1 -> 1 == 1 -> 1.
[HI] > ऑपरेटर की प्राथमिकता == से अधिक है, इसलिए (8 > 3) == 1 -> 1 == 1 हल होकर 1 प्रिंट होता है।
Q7. What does `printf("%d", 1 == 2 != 0);` print in C?
(C में `printf("%d", 1 == 2 != 0);` क्या प्रिंट करेगा?)
(A) 1
(B) 2
(C) 0
(D) Compile error
Correct Answer: (C)
[EN] == and != have the same precedence and left-to-right associativity: (1 == 2) is 0, then 0 != 0 is 0.
[HI] == और != की प्राथमिकता बराबर (बाएँ से दाएँ) है: पहले 1 == 2 से 0 बनता है, फिर 0 != 0 भी 0 (असत्य) देता है।
Q8. Given `char s1[] = "cat"; char s2[] = "cat";`, why does `s1 == s2` evaluate to `0`?
(`char s1[] = "cat"; char s2[] = "cat";` होने पर `s1 == s2` का मान `0` क्यों आता है?)
(A) s1 includes the null byte while s2 does not
(B) == compares the base memory addresses of arrays s1 and s2, not their characters
(C) Strings cannot be compared inside main()
(D) C strings are case-sensitive during == comparisons
Correct Answer: (B)
[EN] Array names decay to distinct pointers to their first elements; comparing string contents requires strcmp(s1, s2) == 0.
[HI] एरे के नाम अलग-अलग मेमोरी एड्रेस (पॉइंटर) में बदलते हैं; अक्षरों की तुलना के लिए strcmp(s1, s2) == 0 का प्रयोग किया जाता है।
Q9. According to IEEE 754 floating-point rules in C, if `double x = 0.0 / 0.0;` (NaN), what does `x == x` evaluate to?
(C में IEEE 754 नियमानुसार यदि `double x = 0.0 / 0.0;` (NaN) हो, तो `x == x` का मान क्या होगा?)
(A) 1 (true)
(B) Compile-time error
(C) NaN
(D) 0 (false)
Correct Answer: (D)
[EN] By IEEE 754 standard, NaN is unordered and never compares equal to anything, not even itself (so x != x is actually 1).
[HI] IEEE 754 के अनुसार NaN किसी के भी बराबर नहीं होता, यहाँ तक कि स्वयं के भी नहीं, इसलिए x == x असत्य (0) देता है।
Q10. What is the correct C expression to check whether integer `n` lies strictly inside the open interval (10, 50)?
(पूर्णांक `n` के खुले अंतराल (10, 50) के भीतर होने की सही C शर्त कौन सी है?)
(A) 10 < n < 50
(B) 10 < n == n < 50
(C) n > 10 || n < 50
(D) n > 10 && n < 50
Correct Answer: (D)
[EN] C does not support chained range comparisons; two separate relational tests must be combined using &&.
[HI] C में चेन्ड रेंज तुलना काम नहीं करती, इसलिए दो अलग तुलनाओं को लॉजिकल && से जोड़कर n > 10 && n < 50 लिखना आवश्यक है।
Q11. Which error occurs when compiling `int a = 5; if (a + 1 = 6) {}`?
(`int a = 5; if (a + 1 = 6) {}` को कंपाइल करने पर कौन सी त्रुटि आती है?)
(A) Divide by zero warning
(B) Lvalue required as left operand of assignment
(C) Undefined Behavior at runtime
(D) Relational precedence mismatch
Correct Answer: (B)
[EN] The expression (a + 1) yields a temporary rvalue, which cannot appear on the left side of the assignment operator =.
[HI] (a + 1) एक अस्थायी आर-वैल्यू (rvalue) है, जिस पर असाइनमेंट (=) लागू नहीं किया जा सकता, अतः Lvalue त्रुटि आती है।
Q12. What does `printf("%d", 'A' < 'B');` print in ASCII-based C environments?
(ASCII आधारित C परिवेश में `printf("%d", 'A' < 'B');` क्या प्रिंट करेगा?)
(A) 1
(B) 0
(C) 65
(D) Compile error
Correct Answer: (A)
[EN] Character constants in C have type int; ASCII 'A' (65) < 'B' (66) evaluates to 1.
[HI] C में कैरेक्टर कॉन्स्टेंट int प्रकार के होते हैं और ASCII कोड 65 ('A') < 66 ('B') सत्य होने से 1 प्रिंट होता है।
Q13. When checking if two `double` variables `a` and `b` are equal within precision `1e-9`, which pattern is standard?
(दो `double` वेरिएबल `a` और `b` की `1e-9` सटीकता तक बराबरी जांचने का मानक तरीका कौन सा है?)
(A) a == b
(B) abs(a - b) < 1e-9
(C) fabs(a - b) < 1e-9
(D) (int)a == (int)b
Correct Answer: (C)
[EN] fabs() from <math.h> handles floating-point differences, whereas integer abs() truncates fractional differences to 0.
[HI] <math.h> का fabs() दशमलव अंतर निकालता है (जबकि abs() पूर्णांकों पर काम करके दशमलव अंतर को 0 कर देता है)।
Q14. In pointer arithmetic, relational comparisons (`p < q`) are strictly well-defined in ISO C ONLY when:
(ISO C में पॉइंटर्स की रिलेशनल तुलना (`p < q`) तभी पूर्णतः वैध मानी जाती है जब:)
(A) p and q point to any two stack variables
(B) p and q point to elements of the same array (or one past its end)
(C) p is NULL and q is a valid address
(D) p and q are both void* pointers to unrelated malloc blocks
Correct Answer: (B)
[EN] Comparing pointers from unrelated objects via <, <=, >, >= is Undefined Behavior in ISO C (though == and != are allowed).
[HI] ISO C के अनुसार <, >, <=, >= केवल एक ही एरे के तत्वों (या एरे के ठीक अंत के बाद) को इंगित करने वाले पॉइंटर्स पर ही वैध हैं; अलग ऑब्जेक्ट्स पर यह UB है।
Q15. Which statement is NOT true about relational and equality operators in C?
(C में रिलेशनल और इक्वैलिटी ऑपरेटर्स के विषय में कौन सा कथन सत्य नहीं है?)
(A) Using = instead of == inside if() assigns a value instead of comparing
(B) Equality operators (==, !=) have higher precedence than relational operators (<, >, <=, >=)
(C) Relational operators associate from left to right
(D) Both operator groups return integer 1 for true and 0 for false
Correct Answer: (B)
[EN] Relational operators (<, <=, >, >=) actually have HIGHER precedence than equality operators (==, !=).
[HI] वास्तव में रिलेशनल ऑपरेटर्स (<, <=, >, >=) की प्राथमिकता इक्वैलिटी ऑपरेटर्स (==, !=) से अधिक होती है, कम नहीं।
Q16. What does `int a = 3, b = 4, c = 5; printf("%d", a < b != b > c);` output?
(`int a = 3, b = 4, c = 5; printf("%d", a < b != b > c);` का आउटपुट क्या होगा?)
(A) Compile error
(B) 4
(C) 0
(D) 1
Correct Answer: (D)
[EN] Relational operators run first: (3 < 4) is 1 and (4 > 5) is 0; then equality check 1 != 0 evaluates to 1.
[HI] पहले रिलेशनल तुलनाएँ हल होती हैं: (3 < 4) = 1 तथा (4 > 5) = 0; फिर 1 != 0 से परिणाम 1 आता है।
Q17. Within Relational and Equality Operators in C: == vs =, which expression / operator directly maps to: "Compares two values and returns int 1 or 0"?
(Relational and Equality Operators in C: == vs = में कौन सा Expression / Operator सीधे "Compares two values and returns int 1 or 0" से संबंधित है?)
(A) Equality Operator (==)
(B) Relational vs Equality (< vs ==)
(C) Assignment Operator (=)
(D) Chained Comparison (a<b<c)
Correct Answer: (A)
[EN] In Relational and Equality Operators in C: == vs =, 'Equality Operator (==)' handles 'Compares two values and returns int 1 or 0' (Never overwrites operands; tests value equality).
[HI] Relational and Equality Operators in C: == vs = में 'Equality Operator (==)' का कार्य/विवरण 'Compares two values and returns int 1 or 0' (Never overwrites operands; tests value equality) है।
Q18. Which option accurately describes 'Assignment Operator (=)' in Relational and Equality Operators in C: == vs =?
(Relational and Equality Operators in C: == vs = के संदर्भ में 'Assignment Operator (=)' की सही विशेषता कौन सी है?)
(A) Stores RHS into LHS lvalue and returns stored value
(B) Parses left-to-right as (a < b) < c returning 0/1
(C) Compares two values and returns int 1 or 0
(D) Relational operators bind tighter than == and !=
Correct Answer: (A)
[EN] 'Assignment Operator (=)' provides 'Stores RHS into LHS lvalue and returns stored value' — key point: if(x=0) evaluates false while mutating x.
[HI] 'Assignment Operator (=)' का मुख्य विवरण 'Stores RHS into LHS lvalue and returns stored value' है (if(x=0) evaluates false while mutating x)।
Q19. In Relational and Equality Operators in C: == vs =, identify the correct parameter for the specification: "Parses left-to-right as (a < b) < c returning 0/1".
(Relational and Equality Operators in C: == vs = में "Parses left-to-right as (a < b) < c returning 0/1" विवरण किस विकल्प के लिए सही है?)
(A) Equality Operator (==)
(B) Chained Comparison (a<b<c)
(C) Relational vs Equality (< vs ==)
(D) Assignment Operator (=)
Correct Answer: (B)
[EN] 'Chained Comparison (a<b<c)' corresponds to 'Parses left-to-right as (a < b) < c returning 0/1' (10 < 20 < 5 returns 1; use && instead).
[HI] 'Chained Comparison (a<b<c)' का संबंध 'Parses left-to-right as (a < b) < c returning 0/1' (10 < 20 < 5 returns 1; use && instead) से है।
Q20. Considering Relational and Equality Operators in C: == vs =, what key behavior defines 'Relational vs Equality (< vs ==)'?
(Relational and Equality Operators in C: == vs = में 'Relational vs Equality (< vs ==)' की मुख्य भूमिका या मान क्या है?)
(A) Relational operators bind tighter than == and !=
(B) Stores RHS into LHS lvalue and returns stored value
(C) Parses left-to-right as (a < b) < c returning 0/1
(D) Compares two values and returns int 1 or 0
Correct Answer: (A)
[EN] 'Relational vs Equality (< vs ==)' represents 'Relational operators bind tighter than == and !=' (10 > 5 == 1 evaluates as (10 > 5) == 1).
[HI] 'Relational vs Equality (< vs ==)' का अर्थ/मान 'Relational operators bind tighter than == and !=' है (10 > 5 == 1 evaluates as (10 > 5) == 1)।
Relational and Equality Operators in C: == vs = — Exam FAQs
Q1: Why does `if (x = 5)` compile cleanly in C instead of raising an error?
`if (x = 5)` लिखने पर C में एरर क्यों नहीं आता और यह कैसे काम करता है?
[EN] In C, `=` is an expression operator that evaluates to the assigned value (`5`). Since any non-zero value is truthy in an `if` condition, `if (x = 5)` sets `x` to 5 and executes the `if` body. Enable `-Wall` in GCC/Clang to get a compiler warning for unparenthesized assignments in conditions.
[HI] C में `=` एक एक्सप्रेशन ऑपरेटर है जो असाइन किया गया मान लौटाता है। चूंकि 5 शून्य नहीं है, इसलिए `if (x = 5)` हमेशा सत्य होकर चलता है; कंपाइलर चेतावनी पाने के लिए `-Wall` फ्लैग उपयोग करें।
Q2: Why shouldn't we compare two `double` numbers using `==` in C?
C में दो `double` या `float` संख्याओं की तुलना सीधे `==` से क्यों नहीं करनी चाहिए?
[EN] Decimal fractions like `0.1` and `0.2` have infinite repeating binary representations in IEEE 754, causing tiny rounding discrepancies (`0.1 + 0.2 != 0.3`). Always compare the absolute difference against a small threshold: `fabs(a - b) < 1e-9`.
[HI] IEEE 754 बाइनरी फॉर्मेट में 0.1 या 0.2 जैसी दशमलव संख्याएँ बिल्कुल सटीक स्टोर नहीं हो पातीं, जिससे `0.1 + 0.2 == 0.3` असत्य हो सकता है; अतः `fabs(a - b) < 1e-9` जांचना सुरक्षित है।
Q3: What happens if you accidentally write `a < b < c` in C?
यदि C प्रोग्राम में गलती से `a < b < c` लिख दिया जाए तो कंपाइलर इसे कैसे हल करता है?
[EN] Because `<` associates left-to-right, C groups it as `(a < b) < c`. The first comparison yields `0` or `1`, and that boolean-like integer is then compared with `c`—almost always producing wrong logic.
[HI] बाएँ से दाएँ साहचर्य होने के कारण C इसे `(a < b) < c` मानता है; पहले भाग से 0 या 1 मिलता है जिसकी तुलना c से की जाती है, जो गलत तर्क देता है।
Post a Comment
Post a Comment