arrays | Sololearn: Learn to code for FREE!



what will be the output? arr []={1,2,3} cout <<arr [3]:

8/27/2016 4:42:08 PM

Piyush Yadav

5 Answers

New Answer


suppose this won't run


This will print the content of the memory near the array as an int, or in other words, garbage.


because array count index begin at 0 this should lead to a error or will show a garbage value


error coz u specified 3 elements and u wanted output for number 3 i.e number 4 in arrays which isnt thr so i think either it will show an error or just outputs nothing


no output.