Relational Operators in C - C Programming Tutorial 24

preview_player
Показать описание
Notes for You:: Relational Operators in C - C Programming Tutorial 24
- are also known as comparison operators.
- are used to compare the relationship between two values.
- on comparison they yield the result either 0 or 1.

Note:
- In C 0 indicates FALSE and any non zero value indicates TRUE.

There are 6 Relational Operators in C; they are:
< : less than
> : greater than
<= : less than or equal to
>= : greater than or equal to
== : equal to
!= : not equal to

Example Code:
#include <stdio.h>
int main()
{
printf("%d\n",3<4); // 1
printf("%d\n",5<4); // 0

printf("%d\n",5>4); // 1
printf("%d\n",5>6); // 0

printf("%d\n",5<=6); // 1
printf("%d\n",6<=6); // 1
printf("%d\n",7<=6); // 0

printf("%d\n",7>=6); // 1
printf("%d\n",7>=7); // 1
printf("%d\n",7>=8); // 0

printf("%d\n",7==8); // 0
printf("%d\n",7!=8); // 1

return 0;
}

Note:
- replace < less-than symbol.
- replace > greater-than symbol.

=========================================

Follow the link for next video:
C Programming Tutorial 25 - Logical Operators in C Programming Language

Follow the link for previous video:
C Programming Tutorial 23 - Arithmetic Operators in C Programming Language

=========================================

C Programming Tutorials Playlist:

=========================================
Watch My Other Useful Tutorials:-

Computer Programming Fundamentals Playlist:-

C Practical LAB Exercises Playlist:-

C++ Tutorials Playlist:

=========================================

► Subscribe to our YouTube channel:

► Visit our Website:

=========================================
Hash Tags:-
#ChidresTechTutorials #CProgramming #CProgrammingTutorial
Рекомендации по теме
Комментарии
Автор

Answer the following questions: Let's see who gives the best answer
1. Explain relational operators in C

ChidresTechTutorials
Автор

sir me aapkisaari videos dekhta hu pta nhi ku aapka pdhaya hua hi smajh me aata h sir thank u soo muchu sir 👌👌

aarifrahman
Автор

Not even learning C but I've been watching your C# Unity videos. Your tutorials are so detailed and incredibly helpful, just wanted to stop by and let you know! :D
Keep up the amazing tutorials!

haku
Автор

Relational operator is used to compare the values

hellohii