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 is file in c preprocessor?
Is there any data type in c with variable size?
int i=10; printf("%d %d %d", i, i=20, i);
What is the significance of c program algorithms?
Is there any possibility to create customized header file with c programming language?
Can we compile a program without main() function?
write a program to create a sparse matrix using dynamic memory allocation.
What is the difference between variable declaration and variable definition in c?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
Difference between Shallow copy and Deep copy?
Should I learn data structures in c or python?
What is the difference between int main and void main in c?
Is c language still used?
how can f be used for both float and double arguments in printf? Are not they different types?
What's a good way to check for "close enough" floating-point equality?