vendredi 12 mars 2021

Why this if Else program executes The Else part? [closed]

#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" ?

Aucun commentaire:

Enregistrer un commentaire