0
How to scan array 10 11 12 13 of unknown size in c language
5 ответов
+ 1
Mohan Raj Murugan What are 10,11,12,13 first?
In which language do u want to scan?
+ 1
Including string.h header allows access to the strlen() function that tells you length of given array, or you could write your own function to count elements in array, unfortunately you still need to have a predefined array with a specified size to fill and then hope the input is less. Other than that though if you want a truly dynamic array, you will have to follow Coder Kitten's answer.
edit: link providing more info on memory allocation
https://www.geeksforgeeks.org/dynamic-memory-allocation-in-c-using-malloc-calloc-free-and-realloc/
0
In c
0
Using a for loop u can do it!
0
I don't it size how can we use for loop