Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are register variables? What are the advantage of using register variables?

1122


What is wild pointer in c with example?

1016


what is use of malloc and calloc?

1843


Do pointers need to be initialized?

1015


What is difference between Structure and Unions?

1182


Explain about the functions strcat() and strcmp()?

986


What are multibyte characters?

1054


What are the benefits of organizational structure?

971


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

1779


Can we replace the struct function in tree syntax with a union?

1234


Explain why c is faster than c++?

998


Explain what are linked list?

987


What is output redirection?

1160


What happens if a header file is included twice?

980


What does the characters “r” and “w” mean when writing programs that will make use of files?

1419