Getting bus error

hey i am getting bus error and dont know how to resolve it.
#include
using namespace std;

int main()
{
char arr[100000000000000000];
cin>>arr;
cout<<arr;
int i=0;
if(arr[i]==‘9’)
i++;
for(;arr[i]!=’\0’;i++)
{
int digit=arr[i]-‘0’;
if(digit>=5)
{
digit=9-digit;
}
arr[i]=digit+‘0’;
}
cout<<arr;
return 0;
}

hello @nikunjj44

the size of array is creating issue.
20 size array will also work fine. so change the array size and then try

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.