+ 4
what is the difference between an array and a function argument?
4 ответов
+ 6
think of it like this....you are going to school and you need to carry books with you....so you can either carry them in a bag or carry them separately using your hands....if you have a very few books you can carry them so sweat in your hands but what if there are alot of book? so the books are the arguments and the bag is the array
+ 4
An array is a data type that allows for multiple elements of same type(e.g all of type int, string etc) to be stored in it. Function argument(also called parameter sometimes) is the value you pass to a function when you it. e.g if you have function called "lagerOfTwo", to call it you'll have something like, largerOfTwo(34, 56), then 34 and 56 are called arguments
0
array is used to store large amount of similar data & function arguments are used to pass the arguments in function
- 1
Ah-Ray. Funch+tion. they have problems because array heartbroken his,funtion, little sister.