# 1.5 Operatörler (Operators)

1. **Aritmetik Operatörler**

   Aritmetik operatörler, sayılar üzerinde matematiksel işlemler yapmak için kullanılır:

   * `+` Toplama
   * `-` Çıkarma
   * `*` Çarpma
   * `/` Bölme
   * `%` Modülüs (bölümden kalan)

```cpp
int a = 10; 
int b = 3; 
    
std::cout << (a + b) << std::endl; // 13
std::cout << (a - b) << std::endl; // 7
std::cout << (a * b) << std::endl; // 30
std::cout << (a / b) << std::endl; // 3
std::cout << (a % b) << std::endl; // 1
```

2. **Atama Operatörler**

Atama operatörleri, bir değişkene değer atamak için kullanılır:

* `=` Değer atama
* `+=` Toplama ve atama
* `-=` Çıkarma ve atama
* `*=` Çarpma ve atama
* `/=` Bölme ve atama

```cpp
int x = 5; 
x += 3; // x = x + 3; -> 8
std::cout << x << std::endl; // 8

int y = 10; 
y -= 5; // y = y - 5; -> 5
std::cout << y << std::endl; // 5
```

3. **Karşılaştırma Operatörleri**

Karşılaştırma operatörleri, iki değeri karşılaştırmak için kullanılır:

* `==` Eşitse
* `!=` Eşit değilse
* `>` Büyüktür
* `<` Küçüktür
* `>=` Büyük eşittir
* `<=` Küçük eşittir

```
int a = 10; 
int b = 5; 
    
std::cout << (a == b) << std::endl; // 0 (false)
std::cout << (a != b) << std::endl; // 1 (true)
std::cout << (a > b) << std::endl; // 1 (true)
std::cout << (a <= b) << std::endl; // 0 (false)
```

4. **Mantıksal Operatörler**

Mantıksal operatörler, boolean değerleri üzerinde mantıksal işlemler yapmak için kullanılır:

* `&&` veya `and` Mantıksal VE
* `||` veya `or` Mantıksal VEYA
* `!` Mantıksal DEĞİL

```
bool x = true; 
bool y = false; 
    
std::cout << (x && y) << std::endl; // 0 (false)
std::cout << (x || y) << std::endl; // 1 (true)
std::cout << (!x) << std::endl; // 0 (false)
```

5. **Dizi Operatörleri**

Dizi operatörleri, diziler üzerinde işlemler yapmak için kullanılır:

* `+` Dizi birleştirme (C++ dilinde standart dizi birleştirme operatörü yoktur; bu işlemi gerçekleştirmek için özel yöntemler kullanmanız gerekir.)
* `==` Eşitse
* `===` Aynı türde ve eşitse

> C++'da dizileri birleştirmek için genellikle STL (Standart Şablon Kütüphanesi) kullanılır.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yavuzlar.org/egitim/c-plus-plus/2.0-fonksiyonlar/1.5-operatorler-operators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
