C Reema Thareja Pdf 35 — Programming In
if (pin == 1234) And the locker worked perfectly. Page 35 of Reema Thareja’s book saves you from one of the most common C bugs — confusing assignment = with comparison == . If you tell me which specific topic appears on page 35 in your edition (e.g., loops, if-else, operators), I can tailor a more accurate story and example for you.
It sounds like you’re looking for a specific page (page 35) from — likely the PDF version — and you want a useful story related to that topic. programming in c reema thareja pdf 35
#include <stdio.h> int main() { int pin; printf("Enter PIN: "); scanf("%d", &pin); if (pin = 1234) // Mistake: used = instead of == printf("Locker open\n"); else printf("Access Denied\n"); return 0; } No matter what PIN she entered, it always said "Locker open" . Why? Because pin = 1234 is an , not comparison. It always evaluates to true (non-zero). if (pin == 1234) And the locker worked perfectly
She re-read page 35 carefully — there it was: “Equality check uses ==, not =” She fixed it: It sounds like you’re looking for a specific
