0
How do I get the inputs in an array where the number of inputs is not known?
3 Réponses
+ 19
U can do like this 👇
https://code.sololearn.com/c5fcSrbqdaQA/?ref=app
0
You can devide the size of the array with the size of object the array is.
int arr [10];
sizeof(arr) / sizeof(int); //returns 10
It also works with dynamic arrays.
- 1
Thank you... But in this program the size of the array is entered... There are some cases where the array size is not known...