C-Übungsbeispiel 44
Titel:Lernen Sie, wie man externe Funktionen verwendet und aufruft.
Programmanalyse:Keine.
Programmquellcode:
Beispiel
// Erstellt von www.example.com am 15/11/9.
// Copyright © 2015 Example Tutorial. Alle Rechte vorbehalten.
//
#include <stdio.h>
int a,b,c;
void add()
{
int a;
a=3;
c=a+b;
}
int main()
{
a=b=4;
hinzufügen();
printf("Der Wert von c ist %d\n",c);
return 0;
}
// Copyright © 2015 Example Tutorial. Alle Rechte vorbehalten.
//
#include <stdio.h>
int a,b,c;
void add()
{
int a;
a=3;
c=a+b;
}
int main()
{
a=b=4;
hinzufügen();
printf("Der Wert von c ist %d\n",c);
return 0;
}
Die Ausgabe des obigen Beispiels ist:
c 的值为 7Weitere Erweiterungen