C Program for Equality Operator - Equality Operator in C



 C Program for Equality Operator

Learn c - c tutorial - C Program for Equality Operator - c examples - c programs

C Program for Equality Operator

  • Binary equality operators compare to operands for strict equality or difference.
  • The equal to (==) and not equal to (! =) operator have lower precedence than the relational operators are known as Equality operators.

Sample Code

#include <stdio.h>
int main()
{
    int a=10;
    int b=10;
    int result;
    result = (a==b);
    printf("result: %d\n",result);
    result = (a!=b);
    printf("result: %d\n",result);
    return 0;
}

Output

result: 1
result: 0


View More Quick Examples


Related Searches to C Program for Equality Operator - Equality Operator in C