Write output: #include <stdio.h> int sum(int i){ static int total=0; total+=i; return total; } int main(){ int i; for(i=1; i<10; i++){ printf("%d "…
Write output:
#include <stdio.h>
int sum(int i){
static int total=0;
total+=i;
return total;
}
int main(){
int i;
for(i=1; i<10; i++){
printf("%d ", sum(i));
}
}From the DESCO Assistant Engineer (CSE) 2016 – Written exam, question 10 of 11.
More from this paper
- Previous: Draw a high level use case diagram: Use case diagram for a visitor who wants to log in to a page using a username and password.
- Next: In java language: write a class named Bicycle having 3 integer variables (speed, gear, cost) and a constructor to initialize the…
- All questions in DESCO Assistant Engineer (CSE) 2016 – Written