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 an array in c?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What do mean by network ?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What do you mean by dynamic memory allocation in c? What functions are used?
What type of function is main ()?
How can I find the modification date and time of a file?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
Can true be a variable name in c?
What is typeof in c?
Why doesnt that code work?
What is main return c?
Explain how do you determine whether to use a stream function or a low-level function?
What does struct node * mean?
What is structure pointer in c?