I've written the following C function but it is not working correctly. What did I do wrong?   int *double5(void) {     int i = 5;     i = i *2;     return &i;}

icon
Related questions
Question
  1. I've written the following C function but it is not working correctly. What did I do wrong?

 

int *double5(void) {
     int i = 5;
     i = i *2;
     return &i;
}

AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution