#include <iostream>using namespace std; const int MAX = 4; int main () { const char *names[MAX] = { "Zara Ali", "Hina Ali", "Nuha Ali", "Sara Ali" }; for (int i = 0; i < MAX; i++) { cout << "Value of names[" << i << "] = "; cout << (names + i) << ' ' << &names[i] << endl; } return 0;}
Standard input is empty
Value of names[0] = 0x7ffeb88ac420 0x7ffeb88ac420 Value of names[1] = 0x7ffeb88ac428 0x7ffeb88ac428 Value of names[2] = 0x7ffeb88ac430 0x7ffeb88ac430 Value of names[3] = 0x7ffeb88ac438 0x7ffeb88ac438
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!