ตัวดำเนินการ | ความหมาย | ตัวอย่าง |
- | การลบ | X - Y |
+ | การบวก | X + Y |
* | การคูณ | X * Y |
/ | การหาร | X / Y |
% | การหารจะเอาเฉพาะเศษไว้ | 8 % 5 = เศษ 3เป็นผลลัพธ์ |
-- | การลดค่าครั้งละ 1 | X-- หรือ --X |
++ | การเพิ่มค่าครั้งละ 1 | X++ หรือ ++X |
ตัวดำเนินการ | ความหมาย |
() | Function call |
[] | array element |
. | structure member |
-> | pointer to a structure member |
! | Logical |
~ |
one's complement |
- | Minus |
++ | increment |
-- | Derement |
& | address of |
= | contents of |
* | Multiply |
/ | divide |
% | Modulus |
+ | Add |
<< | Left Shift |
>> | Right Shift |
< | less than |
<= | less than or equal to |
> | greater than |
>= | greater than or equal to |
== | (equality) |
!= | (not equal) |
& | bit-by-bit AND |
ll | logical OR |
?: | Coditional |
= | Assignment |
*=/=%=+= | compound assignment |
-=<<=>>= | compound assignment |
&=^=!= | compound assignment |
, | comma operrator |
// | comment |
หน้าที่เข้าชม | 1,311,395 ครั้ง |
ผู้ชมทั้งหมด | 696,279 ครั้ง |
ร้านค้าอัพเดท | 5 ก.ย. 2568 |