Are these both declarations r same?? int fun(int arr[2]) and int fun(int arr[]) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Are these both declarations r same?? int fun(int arr[2]) and int fun(int arr[])

i think they r not same coz 1st fun can accept only 2 integers but second one can take any number of integers as it depends on no. of inputs.

1st Jul 2019, 5:01 PM
Parth Lashkari
Parth Lashkari - avatar
3 Answers
+ 2
The 2 declarations are not same and you gave the description for that and I think you no need to ask it as a question
1st Jul 2019, 5:37 PM
tejaswi kanneganti
tejaswi kanneganti - avatar
+ 1
i asked coz answer was "same" and i thought it was wrong so i asked it for confirmation.
1st Jul 2019, 5:39 PM
Parth Lashkari
Parth Lashkari - avatar
+ 1
thanks for the explanation ~ swim ~
2nd Jul 2019, 3:32 AM
Parth Lashkari
Parth Lashkari - avatar