0

Use of global function in c

Tell adding two no using global function in c language

28th Oct 2025, 3:01 PM
pimoli Rohit
pimoli Rohit - avatar
2 Answers
+ 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); }
28th Oct 2025, 4:37 PM
Abdul Haseeb
Abdul Haseeb - avatar
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.
28th Oct 2025, 5:03 PM
BroFar
BroFar - avatar