Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what is the output of the below code? void f ( int pv 1 , int * pv 2 , int * pv 3 ,

what is the output of the below code? void f(int pv1, int *pv2, int *pv3, int pv4[]){
int lv = pv1+*pv2+*pv3+ pv4[0];
pv1=11;
*pv2=22;
*pv3=33;
pv4[0]= lv;
pv4[1]=44;
}
int main(void){
int lv1=1, lv2=2;
int *lv3;
int lv4[]={4,5,6};
lv3= lv4+2;
f(lv1, &lv2, lv3, lv4);
printf("%i,%i,%i
",lv1,lv2,*lv3);
printf("%i,%i,%i
",lv4[0],lv4[1],lv4[2]);
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started