how to define length of an array after taking an input from the user


4/2/2020 7:42:59 AM

Addaganti Naga Sai Rajeev

4 Answers

New Answer


(1) Declare an int n (2) Input value and store it in n (3) Declare array int arr[n];



Is user input a number that defines the array length? if not, can you please describe what you want to do clearly.


https://www.sololearn.com/learn/C/2947/?ref=app https://www.sololearn.com/learn/C/2950/?ref=app