What does == mean in c

In C programming == is a relational operator. It returns true or false. It is used to compare the value of two variables.
If the two variables are euqual then it returns true but if it is false then it returns false.

Let’s take a look at a simple C program.

#include <stdio.h>

int main() {
  int a = 4;
  int b = 4;
  if (a == b) {
    printf("The numbers are equal.\n");
  } else {
    printf("The numbers are not equal.\n");
  }
  return 0;
}
// outut will be 
// The  numbers are equal
Facebook
Twitter
LinkedIn
Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

ABOUT ME !!
Johan William

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

RECENT POSTS

TEST