2021年3月12日星期五

Why this if Else program executes The Else part?

#include <stdio.h>  #include <conio.h>  int main()  {      int a=0;      if(a=0)      {          printf("No is wrong");      }            else printf("No is right");      return 0;  }  

i know it was given (a=0) inside if condition not (a==0) so why it is printing the Else part "No is right" ?

https://stackoverflow.com/questions/66609659/why-this-if-else-program-executes-the-else-part March 13, 2021 at 10:46AM

没有评论:

发表评论