1.

What is the output of the following program segment?sum(n){if ( n < 1 ) return n;else return (n + sum(n–1));}main(){printf(“%d”, sum(5));}

A. 10
B. 16
C. 15
D. 14
Answer» D. 14


Discussion

No Comment Found