Question: give a line by line explanation 4(30p) - What does the following program outpu and Explain the output comming from where? (Onl) Output even it
4(30p) - What does the following program outpu and Explain the output comming from where? (Onl) Output even it is correct) or (only explanatior even it is correct) or (wrong Explanation with correct answer) is zero point! / / Prototypes void sp1 (int a, int b ); void sp2( int a[], int b[]); void sp3 (int *a, int *b); int main() \{ int a[2]={1,2}; int b[2]={8,9}; sp1(a[0],a[1]); sp2(a,b); sp3(&b[],&b[1]); printf ("\%d, \%d, \%d, \%d ,a[],a[1],b[],b[1]); return 0;} / /functions void sp1(int a, int b) \{ int temp =a; a=b; b= temp; } void sp2( int a[], int b[]){ int temp =a[]; a[]=b[]; b[]= temp; } void sp3( int a, int b){ int temp =a; a=b; b= temp; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
