logo

Crowdly

Browser

Add to Chrome

Consider the following three C functions: [PI] int * g (void) { int x= 10...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Consider the following three C functions:

[PI] int * g (void)

{

int x= 10;

return (&x);

}

[P2] int * g (void)

{

int * px;

*px= 10;

return px;

}

[P3] int *g (void)

{

int *px;

px = (int *) malloc (sizeof(int));

*px= 10;

return px;

}

Which of the above functions are likely to cause problems with pointers?

More questions like this

Want instant access to all verified answers on lms.aub.edu.lb?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome