Swift in Hindi Operators




Operators एक Symbol है जो कम्पाइलर को विशिष्ट Mathematical या Logical Manipulations करने के लिए कहता है.

Objective-C अंतर्निहित Operators में समृद्ध है और निम्न प्रकार के Operator प्रदान करता है.

  • Arithmetic Operators

  • Assignment Operators

  • Comparison Operators

  • Logical Operators

  • Bitwise Operators

  • Misc Operators

  • Range Operators

Arithmetic Operators

Swift सभी Standard Types के लिए चार मानक Standard Arithmetic Operators का समर्थन करता है.

Operators Description
+ Addition
Subtraction
* Multiplication
/ Division
% Modulus
++ Increment
−− Decrement

Assignment Operator

Assignment Operator Variables को Value प्रदान करने के लिए उपयोग किया जाता है.

Operators Description
= Assign
+= Increments, then assigns
-+ Decrements, then assigns
*= Multiplies, then assigns
/= Divides, then assigns
%= Modulus, then assigns

Comparison Operators

Swift भाषा सभी Comparison Operators को दिखाती है.

Operators Description
== Is equal to
!= Is not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to

Logical Operators

Swift भाषा Logical Operators को Support करती है.

Operators Description
&& And और Operators दो Expressions पर एक Logical Conjunction का निष्पादन करते है (यदि दोनों Expressions True का Evaluation करते हैं, तो परिणाम True है .अगर किसी भी अभिव्यक्ति का Evaluation False है, तो परिणाम False है).
|| Or Operators दो Expressions पर एक Logical Disjunction का निष्पादन करता है (यदि दोनों या Expressions दोनों True का Evaluation करते हैं, तो परिणाम True है).
! Not Operator एक Expression पर Logical Negation करता है.

Bitwise Operator

Bitwise Operators Bits पर काम करते हैं और Bits ऑपरेशन द्वारा Bits करते हैं.

Operators Description
& Binary AND Operator
| Binary OR Operator
^ Binary XOR Operator
<< Binary Left Shift Operator
>> Binary Right Shift Operator