Form Biggest Number

Hello!

I have a doubt in one the challenges under Arrays. The name of the challenge is “Form Biggest Number”. I have managed to write the correct code, but I’m not able to return the array from the function. I have attached my code snippet.

hello @meer
ur array (that u declared inside) function will be erased from memory when the control will return to ur main function because it is statically allocated.

declare ur array dynamically(using new operator) and then u will be able to return ur array.

1 Like