Computer Science, asked by nakulkothari30, 23 days ago

What is the difference between a=0 and a==0 ?

Answers

Answered by Anonymous
0

There are really only two things at play here:First is readability, which is self explanitory.The second is to prevent possible bugs, in your example, it prevents accidentally doingif (a = 0)Some compilers will warn you that you are using the implicit truthiness of the return value of an assignment, but much of the time this is a typo. If you reverse thisif (0 = a)

Similar questions