+ 2
How can I find adrress of array members
c++
5 Answers
+ 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;
}
+ 2
use pointers to display array elements and their addresses...
check it.
https://code.sololearn.com/c5PAF7pXD54A/?ref=app
+ 1
simply type name of member and write following code.
Array-Name.find(member-name);
0
Which language ?
In js :
arrayname.indexOf(elem)
0
Dear mr.Jamali and Antoine
I want to write in c++ language