0 0 votes #include <stdio.h> int counter = 0; int g(int n) { counter++; return (n + 10); } int f(int n) { return g(n * 2); } int main() { int sum = 0, n; for (n = 1; n < 3; n++) sum += g(f(n)); printf("sum = %d, calls = %d\n", sum, counter); return 0; } Programming in C programming-in-c functions + – Gopi_Tirumala 650 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote sum = 46, counter = 4 Mankala_Akhil answered Jul 31, 2025 Mankala_Akhil comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Sum = 46 , Calls = 4 Kr1shnakant answered Jul 31, 2025 Kr1shnakant comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes 👇 justanotherguy answered Nov 8, 2025 • edited Nov 8, 2025 by justanotherguy justanotherguy comment Share Follow 0 reply Please log in or register to add a comment.