C Flashcards

1
Q

Was ist ein Compiler

A

Compiler übersetzt das C-Programm in Maschinenprogramm

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

Elemente einer Programmiersprache

A

Input/Output
Variables
Conditionals
Loops

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

Was ist ein Linker

A

Verbindung einzelner Programmmodule
Ausführbare Datei

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

Wie benutzt du den Compiler in Linux

A

Du hast eine main.c datei

$home: gcc main.c -o Programm

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

Deklariere eine Konstante Zahl “a = 4”

A

const int a = 4;

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

Deklariere einen Char “Zeichen” mit dem Buchstaben B

A

char zeichen = ‘B’;

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

Initialisiere den int i mit dem Wert 8.

A

int i = 8;

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

Setze eine Konstante PI unter dem #include. (Also ausserhalb vom main branch)

A

include<stdio.h></stdio.h>

#define PI 3.141592 <—- Das ist wichtig.

int main() {
bla bla
}

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

int B = 100;
int C = 200;

int main() {
B = C;
C = B;
}

Was kommt raus bei B und C ?

A

B = 200
C = 200

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

int B = 100;
int C = 200;
int temp;

int main() {
temp = B;
B = C
C = temp
}

Was kommt raus bei B und C ?

A

B = 200
C = 100

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

int a = 0, b = 0;

a = b++;

Was kommt bei a und b raus?

A

a = 0
b = 1

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

int a = 0, b = 0;

a = ++b;

Was kommt bei a und b raus?

A

a = 1
b = 1

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

Commite ein c programm zu git
schaue den status an, und guck dir die history an

A

$ git init
$ git add datei.c
$ git commit -m ‘Hier Nachricht’
$ git status
$ git log

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

Wie werden Header Dateien in main.c implementiert

A

include “extra.h”

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