+ 4

what is the difference between an array and a function argument?

14th Nov 2016, 8:27 PM
Cody Arthur
Cody Arthur - avatar
4 Antworten
+ 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
16th Nov 2016, 7:41 AM
Towfique Kabir
Towfique Kabir - avatar
+ 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
14th Nov 2016, 9:28 PM
Flo
0
array is used to store large amount of similar data & function arguments are used to pass the arguments in function
27th Dec 2016, 3:45 PM
Santosh Dussa
Santosh Dussa - avatar
- 1
Ah-Ray. Funch+tion. they have problems because array heartbroken his,funtion, little sister.
15th Nov 2016, 8:27 AM
Michael Gutierrez
Michael Gutierrez - avatar