Find the Output of following C Program: #include<stdio.h> int function(int x[],int i){ int s=x[i]; if(i>0){ s+=function(x,i-1); } printf("%d",s)…
Find the Output of following C Program:
#include<stdio.h>
int function(int x[],int i){
int s=x[i];
if(i>0){
s+=function(x,i-1);
}
printf("%d",s);
return s;
}
int main(){
int y[]={1,3,2,8};
function(y,2);
return 0;
}From the BCC Assistant Programmer (CSE) February 2021 – Written (BUET) exam, question 13 of 20.
More from this paper
- Previous: Answer the following: (i) 192.168.10.2/28, Find subnet mask. (ii) 192.168.10.2/28, Find Network Address. (iii) 192.168.10.2/28, Find IP…
- Next: Both the algorithm the Divide and Conquer and Dynamic Programming solve a problem by breaking it into smaller problem instances and by…
- All questions in BCC Assistant Programmer (CSE) February 2021 – Written (BUET)