Question 24
Answer saved
Marked out of 1.00
What is the output of the following code?
int sum(int n);
int main()
{
printf("s=%d",sum(5));
return 0;
}
int sum(int n)
{
int s,i;
s=0;
for(i=1;i<=n;i++)
s+=i;
return(s);
}
O a. 14
Ob. 15
c. 13
O d. 16
Clear my choice