+ 5
🎓C++ series >>> 2nd output question
what is the output of int arr[3]={1,2,3}; cout<<arr[2];
6 ответов
+ 10
3.
The index's of the array go like this:
arr: {1, 2, 3}
Index: 0 1 2
The element at the index of 2 has a value of 3.
So, when you write myArr[x], you are getting the value of the element at the index of x.
+ 8
3
+ 7
array starts from 0
+ 3
explain it Shamna ...
+ 3
quite easy question this time .....
well done you both ....
next time i will come with new question ....
btw thanks a lot ...
+ 3
next ques ...
https://www.sololearn.com/discuss/473432/?ref=app