Consider the following C program:
The output of the given C program is ________. (Answer in integer)
c
Programming in CFunctions, Parameter Passing, Scope Rules, RecursionNAT2 marksMedium
1#include <stdio.h>
2int g(int n) {
3 return (n+10);
4}
5int f(int n) {
6 return g(n*2);
7}
8int main( ) {
9 int sum, n;
10 sum=0;
11 for (n=1; n<3; n++)
12 sum += g(f(n));
13 printf("%d", sum);
14 return 0;
15}
16A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.