0
Use of global function in c
Tell adding two no using global function in c language
2 Risposte
+ 1
https://www.sololearn.com/learn/o-C/2929/?ref=app
#include <stdio.h>
int sum_up (int x, int y);
int main() {
int a, b, result;
a = 3;
b = 12;
result = sum_up(a,b);
printf("%d + %d = %d\n", a, b, result);
return 0;
}
int sum_up (int x, int y) {
x += y;
return(x);
}
0
pimoli Rohit
A global function in C language is simply a function that is declared outside of any other function (like main()) and can be called from any other function in the program. You don't need any special keyword like "global" to define it; its placement makes it global by default within that file.



