write a 'c' program to sum the number of integer values
Answer Posted / arunkumar
#include<stdio.h>
#include<conio.h>
fun(int n);
int main()
{
int n=10;
printf("%d",fun(10));
}
fun(int n)
{
if(n<1)
return n;
else
return (n+fun(n-1));
}
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
What are register variables? What are the advantage of using register variables?
What is wild pointer in c with example?
what is use of malloc and calloc?
Do pointers need to be initialized?
What is difference between Structure and Unions?
Explain about the functions strcat() and strcmp()?
What are multibyte characters?
What are the benefits of organizational structure?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
Can we replace the struct function in tree syntax with a union?
Explain why c is faster than c++?
Explain what are linked list?
What is output redirection?
What happens if a header file is included twice?
What does the characters “r” and “w” mean when writing programs that will make use of files?