Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Language : i got the fragment 1 answer !! 20 430 20 20,20,430 please help me to do the fragment 2 and 3 and

C Language :
i got the fragment 1 answer !!
20
430
20
20,20,430
please help me to do the fragment 2 and 3 and please explain it will be so helpful to understand .. thanks in Advance ..
image text in transcribed
Question 7: Review the following code. Notice at Line 10, there is a comment where some code will go. 5 int main( int arge, char *argv[] ) 6 { int alpha = 10; int beta = 20; int gamma = 30; 20 /* code fragment goes here */ 13 printf("%d td td ", alpha, beta, gamma ); 14) 15 16 int doMagicl( int a, int b, int *c ) 17 { int temp = b; a = temp; *c = c + a *b; return temp; 22) 26 24 int doMagic2( int *a, int b, int c) 25 *a = b; 27 b = c; c = 15; 29 return b; 30) 32 int doMagic3( int a, int b, int c) 33 { doMagic2( &a, b, c); 35 return a; 36} 34 What is the output of the code if the following code fragments were inserted at Line 11? /* code fragment 1 */ printf("%d ", doMagicl( alpha, beta, &gamma ) ); printf("%d ", doMagic2 ( &alpha, beta, gamma ) ); printf("%d ", do Magic3( alpha, beta, gamma ) ); /* code fragment 2 */ printf("%d ", doMagic3( alpha, beta, gamma ) ); printf("%d ", doMagic2( Ebeta, gamma, alpha ) ); printf("%d ", doMagicl( gamma, beta, &alpha ) ); /* code fragment 3 */ printf("%d ", doMagic3( alpha, beta, gamma ) ); printf("%d ", doMagic2 ( &alpha, beta, gamma ) ); printf("%d ", do Magicl( alpha, beta, &gamma ) )

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

Students also viewed these Databases questions

Question

8. How can an interpreter influence the message?

Answered: 1 week ago

Question

identify current issues relating to equal pay in organisations

Answered: 1 week ago