C Übungsbeispiel 87
Titel:Antwort Ergebnis (Übergabe von struct-Variablen).
Programmanalyse:Keine.
Beispiel
// Erstellt von www.example.com am 15/11/9.
// Copyright © 2015 Example. Alle Rechte vorbehalten.
//
#include<stdio.h>
struct student
{
int x;
char c;
} a;
int main()
{
a.x=3;
a.c='a';
f(a);
printf("%d,%c",a.x,a.c);
}
f(struct student b)
{
b.x=20;
b.c='y';
}
Das Ausgabeergebnis ist:
3,aWeitere Erweiterungen