Expressions Flashcards

1
Q

Expression nedir

A

Bir hesaplamayı ifade etme yoludur.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Operand sayısına göre operator tipleri nelerdir

A

Unary (1), Binary, Ternany
Binaryler genelde infix ama prefix olanlar da var.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Conditional Expression örneği

A

A ? B: C (A doğruysa b, değilse c)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

C dilinde öncelik sıralaması

A

1) Postfix ++, –
2) Unary +,- ; Prefix ++, –
3) * / %
4) binary +, -
5) >, <, >=, <=
6) =, !=
7) &&
8) ||

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Operation overloading

A

Bir operatöre birden fazla görev yüklenmesi. Javada + operatörü concat da yapar mesela.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Type conversion

A

Narrowing -> darlaşma (float -> int)
Widening -> Genişleme (int -> float)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Mixed mode expression

A

int b, c; float a;
a = b+c;
b ile c float olmaya coercion edilir.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Short circuit nedir

A

İfadenin başında gerçekleşen bir durumun kalanını okumayı gereksiz kılması.
int a = 0;
int c,d,e,f,g;
int b = a*(a+2c+3d+4e+5f+6g);
a = 0, short circuit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Assignment statements nelerdir

A

Simple -> int a = b;
Combound -> int a +=b;
Assignment on expression -> if(ch = getChar() != EOF)
conditional -> ($flag ? $var1 : $var2)=0;
unary -> ++a; a++;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly