Notes for You:: Arithmetic Operators in C.
+: Addition Operator : sum of two numbers.
-: Subtraction Operator : difference between two numbers.
*: Multiplication Operator : product of two numbers.
/: Division Operator : quotient of a division operation.
%: Modulus Operator : remainder of a first division operation.
Example Code:
#include <stdio.h>
int main()
{
printf("%d\n",2+2); // 4
printf("%d\n",5+2); // 7
printf("%d\n",5-2); // 3
printf("%d\n",10-2); // 8
printf("%d\n",5*2); // 10
printf("%d\n",10*2); // 20
printf("%d\n",10/2); // 5
printf("%d\n",10%2); // 0
printf("%.1f\n",11/(float)2); // 5.5
printf("%d\n",11%2); // 1
return 0;
}
Notes:
- replace < with less-than symbol.
- replace > with greater-than symbol.
=========================================
Follow the link for next video:
C Programming Tutorial 24 - Relational Operators in C Programming Language
[ Ссылка ]
Follow the link for previous video:
C Programming Tutorial 22 - Operators in C Programming Language | C Operators Tutorial
[ Ссылка ]
=========================================
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
![](https://s2.save4k.ru/pic/nKRn2o4q2Sw/maxresdefault.jpg)