Operatorlər: Riyazi və Müqayisə Operatorları

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Operatordan istifadə edərkən hansı əməliyyatlar icra edilir?

  • Məlumatları düzəltmək və onu saxlamaq
  • Proqramın dayandırılması və yenidən başlaması
  • Verilənlərin idarə edilməsi və ona əməliyyatlar aparmaq (correct)
  • Ədədi dəyərlərin mövcudluğu

Hansı operator aşağıdakı əməliyyatı icra edir: a % b?

  • Qalıq əməliyyatı (correct)
  • Çoxalma əməliyyatı
  • Toplama əməliyyatı
  • Çıxma əməliyyatı

Müqayisə operatorları hansı nəticəni verir?

  • Yanlış dəyəri
  • Boolean dəyəri (hə və ya yox) (correct)
  • Rəqəm dəyəri
  • Sıfır dəyəri

Aşağıdakı operator hansı əməliyyatı icra edir: a > b?

<p>Çox olma əməliyyatı (A)</p> Signup and view all the answers

Aşağıdakı operatorlardan hansı biri ədədi dəyərləri müqayisə edir?

<p>Müqayisə operatorları (C)</p> Signup and view all the answers

Flashcards are hidden until you start studying

Study Notes

Overview

  • An operator is a symbol or a keyword that performs a specific operation on one or more values or variables.
  • Operators are used to manipulate data, perform arithmetic, comparison, logical, and assignment operations.

Types of Operators

Arithmetic Operators

  • Perform mathematical operations on numbers
  • Examples:
    • Addition: a + b
    • Subtraction: a - b
    • Multiplication: a * b
    • Division: a / b
    • Modulus (remainder): a % b

Comparison Operators

  • Compare values and return a boolean result (true or false)
  • Examples:
    • Equal: a == b
    • Not equal: a != b
    • Greater than: a &gt; b
    • Less than: a &lt; b
    • Greater than or equal: a &gt;= b
    • Less than or equal: a &lt;= b

Logical Operators

  • Combine boolean values using logical operations
  • Examples:
    • AND: a &amp;&amp; b
    • OR: a || b
    • NOT: !a

Assignment Operators

  • Assign a value to a variable
  • Examples:
    • Simple assignment: a = b
    • Addition assignment: a += b
    • Subtraction assignment: a -= b
    • Multiplication assignment: a *= b
    • Division assignment: a /= b

Bitwise Operators

  • Perform operations on binary numbers (bits)
  • Examples:
    • AND: a &amp; b
    • OR: a | b
    • XOR: a ^ b
    • NOT: ~a

Other Operators

  • Ternary operator (conditional operator): a ? b : c
  • Comma operator: a, b (evaluates expressions and returns the last value)
  • Member access operator: a.b (accesses a property or method of an object)
  • Index operator: a[b] (accesses an element of an array or object)

Operator Precedence

  • Operators have different precedence levels, which determine the order of operations when multiple operators are used in an expression
  • Parentheses can be used to override operator precedence and ensure the correct order of operations

Operatorlar

  • Operator, bir dəyər və ya dəyişənin üzərində müəyyən əməliyyatı yerinə yetirən simvol veya açardır.
  • Operatorlar, məlumatı idarə etmək, riyazi, müqayisə, məntiqi və təyinat əməliyyatlarını yerinə yetirərlər.

Operatorların Növləri

Riyazi Operatorlar

  • Rəqəmlər üzərində riyazi əməliyyatlar yerinə yetirərlər.
  • Nümunələr:
    • Əlavə: a + b
    • Çıxma: a - b
    • Vurma: a * b
    • Bölünmə: a / b
    • Qalıqlar: a % b

Müqayisə Operatorları

  • Dəyərləri müqayisə edərək, boolean nəticəsini (həqiqət/doğru) qaytarırlar.
  • Nümunələr:
    • Bərabər: a == b
    • Bərabər deyil: a != b
    • Böyük: a &gt; b
    • Kiçik: a &lt; b
    • Böyük və ya bərabər: a &gt;= b
    • Kiçik və ya bərabər: a &lt;= b

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Operators in Programming
6 questions

Operators in Programming

CooperativeAltoSaxophone avatar
CooperativeAltoSaxophone
Operators in Programming
18 questions

Operators in Programming

HeartwarmingDystopia avatar
HeartwarmingDystopia
Use Quizgecko on...
Browser
Browser