+ 1
out of array index?
https://code.sololearn.com/cq4xACSzkEId/?ref=app whay this happened?(whay arr[2] is anonymous Integer?) and other question is: is there runtime error in c++?
19 Respuestas
+ 2
Martin Taylor thanks it was useful for me.
+ 1
David Dolejší Can pointers access to any place of memory?
+ 1
David Dolejší wich apps stored that Integer on this index?
+ 1
David Dolejší i I realized that one index after array length is always zero. (test code) why?
+ 1
Martin Taylor are you see my code? i know character array end by null.
my code:
int arr[]={2,1};
cout<<arr[2]<<endl;//Same as *(a+2). result is anonymous Integer and arr[3] is 0 or 1 depends on compiler that i check. why?
+ 1
Martin Taylor answer another my question about c++ (see my activity)
+ 1
Martin Taylor
it is my another question :
using c++ language?
i love c/c++ because it is very self-description(concepts describe themselves with computer architecture) and powerful. But it no longer has much use in the world, in Windows c#(Microsoft offers c#) is used on Android java, and on the web the client uses JavaScripit and etc, If I learn it, I will forget it because I have no use. What your offer? when I mention you, are you get notification?
+ 1
ok it is beautiful. second variable use memory cell after array because that declared after it.
+ 1
Martin Taylor change code with it
int arr[] ={1,2};
int a=3
int b=4;
cout <<arr[2]<<endl ;
cout <<arr[3]<<endl ;
//result is 4, 3
why?
are data transfer in memory?
+ 1
these tests depend on compiler.