12345678910111213141516171819202122232425262728
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(){ char *ar; cout << "Enter size of the array" << endl; int size; cin >> size; ar = new char[size]; srand(time(NULL)); for( int i = 0; i < size; i++){ ar[i] = (char)rand() % 40; } for( int i = 0; i < size; i ++){ cout << &ar[i] << " \n"; cout << *(&ar[i]) << endl; } }