:CPP: Übung zu Boolschen AusdrückenAufgaben ("geborgt" von Leopold-Franzens-Universität Innsbruck Institut für Informatik)
|
int a = 3; int b = 45; int c = 1; bool d = c == 1; bool e = false == false == 1; Lösung: d= true (1) e= true (1) |
bool x = true; bool y = false; bool z = ((x == y) == y); Lösung: z= true (1) |
|
bool x = false; bool y = true; bool z = false == true == false == x; Lösung: z= false (0) |
bool t = true, f = false, r = true;
|
|
int n=0, m=0; n = ++m; cout << n << m; Lösung: 11 |
int n=0, m=0; n = m++; cout << n << m; Lösung: 01 |