C++ Flashcards

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

!=

A

Ungleich ?

22
Q

>

23
Q

> =

A

Größer gleich?

24
Q

&&

A

Logisches UND, ist true wenn beide Werte True sind

25
Q

||

A

Logischer oder, ist True wenn einer der beiden True ist

26
Q

!

A

Logisches Not, kehrt den Wahrheitswert um

27
Q

&

A

Regerence Operator, gibt die Adresse einer Variable zurück

28
Q

?:

29
Q

If/Else Schreibweise

A
if (Kondition) { 
    Mach irgendwas; 
} 
Else { 
    Mach irgendwas; 
}
30
Q

While

A

Wiederholt einen Code bis es false wird
While (Kondition) {
Mach irgendwas;
}

31
Q

Declatation Funktion

A
Art Name (Art retourn name variable) { 
Bsp. Double Funk (Double x) {
     Mach irgendwas;
Return etwas 
}
32
Q

Arrays

A

Man kann mehrere variablen gleicher Art zusammen definieren

Da capire meglio

33
Q

Syntaktischer Fehler

A

Sind Fehler welche den Computer daran hindert ein funktionierendes Executable zu generieren. Kompilier gibt den Fehler an
Bsp. Fehlende Klammern, declaration variable etc.

34
Q

Semantischer Fehler

A

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
Q

Logischer Fehler

A

Fehler die von der Code Perspektive keine Fehlern sind

Bsp. Falsche Einheiten, falsche Berechnungen etc.

36
Q

Declaring a variable definition (English)

A

That the appropriate number of bytes in memory is allocated for storing a variable of given type e.g. int x

37
Q

Initialising a variable definition (English)

A

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
Q

Variable passed by value definition

A

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
Q

Value passed by reference

A

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
Q

Sentinel element

A

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.