Answers for "which of the following is not an operator in c?"

C
0

Relational Operator in C language

#include<stdio.h>
int main(){

int a = 20;
int b = 10;
int c;

// == operator
if(a == b){
 printf(“a is equal to bn”);
}else{
 printf(“a is not equal to bn”);
}

// > operator
if(a > b){
 printf(“a is greater than bn”);
}else{
 printf(“a is not greater than bn”);
}

// < operator
if(a < b){
 printf(“a is less than bn”);
}else{
 printf(“a is not less than bn”);
}

// != Opertor
if(a != b){
 printf(“a is not equal to bn”);
}else{
 printf(“a is equal to bn”);
}

// >= orperator
if(a >= b){
 printf(“a is greater than or equal to bn”);
}else{
 printf(“a is not greater than or equal to bn”);
}

// <= operator
if(a <= b){
 printf(“a is less than or equal to bn”);
}else{
 printf(“a is not less than or equal to bn”);
}

}
Posted by: Guest on January-08-2022
0

logical operators in c

Logical Operators: 
They are used to combine two or more conditions/constraints or to complement 
the evaluation of the original condition under consideration. They are 
described below: 
 

Logical AND operator: The ‘&&’ operator returns true when both the conditions 
under consideration are satisfied. Otherwise it returns false. For example, a
&& b returns true when both a and b are true (i.e. non-zero).

Logical OR operator: The ‘||’ operator returns true even if one (or both) of
the conditions under consideration is satisfied. Otherwise it returns false. 
For example, a || b returns true if one of a or b or both are true 
(i.e. non-zero). Of course, it returns true when both a and b are true.

Logical NOT operator: The ‘!’ operator returns true the condition in 
consideration is not satisfied. Otherwise it returns false. For example, 
!a returns true if a is false, i.e. when a=0.
Posted by: Guest on February-06-2022

Code answers related to "which of the following is not an operator in c?"

Code answers related to "C"

Browse Popular Code Answers by Language