C++ Flashcards
(40 cards)
1
Q
Was muss im Template stehen
A
include
Using namespace std;
int main () {
Programm
Retourn 0;
}
2
Q
Bool
A
True/false
3
Q
Int
A
Integer (ganze , positive Zahl)
4
Q
Long
A
Ganze Zahl
5
Q
Double
A
Kommazahl
6
Q
Char
A
Ein Zeichen
7
Q
String
A
Text
8
Q
+
A
Addition
9
Q
-
A
Subtrahiert
10
Q
*
A
Multipliziert
11
Q
/
A
Division
12
Q
%
A
Modulo (macht die Division und gibt den Rest an)
13
Q
++
A
Increment 1
14
Q
- -
A
Decrement 1
15
Q
=
A
Gleichsetzung
16
Q
+=
A
Erhöhung um einen Wert
17
Q
-=
A
Reduktion um einen Wert
18
Q
*=
A
Multiplikation um einen Wert
19
Q
/=
A
Division um einen Wert
20
Q
==
A
Gleich ?
21
Q
!=
A
Ungleich ?
22
Q
>
A
Größer?
23
Q
> =
A
Größer gleich?
24
Q
&&
A
Logisches UND, ist true wenn beide Werte True sind
25
||
Logischer oder, ist True wenn einer der beiden True ist
26
!
Logisches Not, kehrt den Wahrheitswert um
27
&
Regerence Operator, gibt die Adresse einer Variable zurück
28
?:
Da capire
29
If/Else Schreibweise
```
if (Kondition) {
Mach irgendwas;
}
Else {
Mach irgendwas;
}
```
30
While
Wiederholt einen Code bis es false wird
While (Kondition) {
Mach irgendwas;
}
31
Declatation Funktion
```
Art Name (Art retourn name variable) {
Bsp. Double Funk (Double x) {
Mach irgendwas;
Return etwas
}
```
32
Arrays
Man kann mehrere variablen gleicher Art zusammen definieren
| Da capire meglio
33
Syntaktischer Fehler
Sind Fehler welche den Computer daran hindert ein funktionierendes Executable zu generieren. Kompilier gibt den Fehler an
Bsp. Fehlende Klammern, declaration variable etc.
34
Semantischer Fehler
Sind Dinge, die für den Compiler nicht falsch angesehen werden und erst beim ausführen des Programms Fehler bereiten.
Bsp. Unendlicher Loop, teilen durch 0
35
Logischer Fehler
Fehler die von der Code Perspektive keine Fehlern sind
| Bsp. Falsche Einheiten, falsche Berechnungen etc.
36
Declaring a variable definition (English)
That the appropriate number of bytes in memory is allocated for storing a variable of given type e.g. int x
37
Initialising a variable definition (English)
Means that a variable that was already been declared is given a value for the first time in a single statement e. g. Int x=5
38
Variable passed by value definition
The called function uses a local variable that is initialised to the value of the variable in the calling function and dicarted upon exit. As result, the variable in the calling function remains unchanged even if the corresponding local variable is modified in called function.
39
Value passed by reference
the called function receives a pointer to the memory location of the variable in the calling function, and works directly with this memory piece. As a result, any change made to the variable within the called function also affects the variable in the calling function
40
Sentinel element
In an array is an additional element with a value that serves as flag to force a termination when it is encountered in a loop.