pa-04
This commit is contained in:
15
pa-04/a5/main.c
Normal file
15
pa-04/a5/main.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
void funk(int *a) {
|
||||
a[0] = 1;
|
||||
a[1] = 2;
|
||||
a[2] = 3;
|
||||
}
|
||||
int main() {
|
||||
/* Vektor c deklarieren und Speicherplatz fuer 3 Elemente auf dem Stack
|
||||
* reservieren */
|
||||
int c[3];
|
||||
/* Funktion funk aufrufen, funk speichert 3 Werte im Vektor c */
|
||||
funk(c);
|
||||
printf("c[0] = %d, c[1] = %d, c[2] = %d\n", c[0], c[1], c[2]);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user