C++ Flashcards

(40 cards)

1
Q

Was muss im Template stehen

A

include

Using namespace std;

int main () {
Programm
Retourn 0;
}

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

Bool

A

True/false

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

Int

A

Integer (ganze , positive Zahl)

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

Long

A

Ganze Zahl

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

Double

A

Kommazahl

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

Char

A

Ein Zeichen

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

String

A

Text

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

+

A

Addition

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

-

A

Subtrahiert

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

*

A

Multipliziert

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

/

A

Division

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

%

A

Modulo (macht die Division und gibt den Rest an)

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

++

A

Increment 1

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

Decrement 1

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

=

A

Gleichsetzung

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

+=

A

Erhöhung um einen Wert

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

-=

A

Reduktion um einen Wert

18
Q

*=

A

Multiplikation um einen Wert

19
Q

/=

A

Division um einen Wert

20
Q

==

21
Q

!=

22
Q

>

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.