Answered step by step
Verified Expert Solution
Question
1 Approved Answer
B=4 C programming 1 - void print(int a[],int b){ for(int i=0;i printf(%d ,a[i]); } printf( b=%d ,b); } 2 - void function1(int a[],int b){ a[b]=a[b]+b;
B=4
C programming
1 - void print(int a[],int b){
for(int i=0;i
printf("%d ",a[i]);
}
printf(" b=%d ",b);
}
2 - void function1(int a[],int b){
a[b]=a[b]+b;
b=b+2;
}
void function2(int a[],int *b){
a[*b]=a[*b]-*b;
*b=a[*b];
}
3 - void print(int a[],int b){
for(int i=0;i
2) Let array a be (5,4,9,8,7,3,1,2,0.6) and b be the last digit of your student number. Accordingly, if we run the given functions in the following order, what will be the output? Explain step by step. function(a,b); print (a,b); function2 (a, & b); print (a,b); void printint a[].int b){ for(int i-0;printf("%d ",a[i]);
}
printf(" b=%d ",b);
}
void function1(int a[],int b){
a[b]=a[b]+b;
b=b+2;
}
void function2(int a[],int *b){
a[*b]=a[*b]-*b;
*b=a[*b];
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started