#include<iostream> using namespace std; int main(){ int size =100; char *pointer = new char [size]; cout<<"enter the first array: "<<endl; for(int i=0;i<size && *pointer != '\0';i++){ cin>>*pointer; } char arr[size]; cout<<"enter the second array: "<<endl; cin.get(arr,size); for(int i=0;i<size && arr[i] != '\0';i++){ cout<<arr[i]; } return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter