find the output?
void r(int a[],int c, int n)
{
if(c>n)
{
a[c]=a[c]+c;
r(a,++c,n);
r(a,++c,n);
}
}
int main()
{
int i,a[5]={0};

r(a,0,5);
for(i=0;i<5;i++)
printf("\n %d",a[i]);

getch();
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

char ch="{'H','I',0};printf("%s",ch);what is output

9 Answers   Accenture,


#include<stdio.h> #include<conio.h> # define swap(a,b) temp=a; a=b; b=temp; void main( ) { int i, j, temp; i=5; j=10; temp=0; if( i > j) swap( i, j ); printf( "%d %d %d", i, j, temp); }

9 Answers   Burning Glass,


what is the role you expect in software industry?

0 Answers   HCL,


What is null in c?

0 Answers  


what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel

1 Answers   V2 Solutions,






What are the usage of pointer in c?

0 Answers  


Can variables be declared anywhere in c?

0 Answers  


What is the difference between abs() and fabs() functions?

0 Answers  


tell me the full form of c?

2 Answers  


List some basic data types in c?

0 Answers  


Write a c program to find, no of occurance of a given word in a file. The word is case sensitive.

2 Answers  


Do you know the purpose of 'register' keyword?

0 Answers  


Categories