+ 2

How can I find adrress of array members

c++

14th Mar 2018, 5:42 AM
a.balagar
a.balagar - avatar
5 ответов
+ 1
In C++ : #include <iostream> using namespace std; int main() { int intarr[] {9,7,5,3,1}; cout << "Value Address\n"; for(int i = 0; i < 5; i++) { cout.width(6); cout << left << intarr[i] << &intarr[i] << "\n"; } return 0; }
14th Mar 2018, 9:58 AM
Ipang
+ 2
use pointers to display array elements and their addresses... check it. https://code.sololearn.com/c5PAF7pXD54A/?ref=app
14th Mar 2018, 6:32 AM
Manorama
Manorama - avatar
+ 1
simply type name of member and write following code. Array-Name.find(member-name);
14th Mar 2018, 6:14 AM
mubashir jamali
mubashir jamali - avatar
0
Which language ? In js : arrayname.indexOf(elem)
14th Mar 2018, 7:16 AM
Αητοιπe
Αητοιπe - avatar
0
Dear mr.Jamali and Antoine I want to write in c++ language
14th Mar 2018, 9:06 AM
a.balagar
a.balagar - avatar