Please can anyone tell me why my this submission for problem A of Educational Codeforces Round 95 was giving differnet o/p for the same testcase in different language. My Submission
In this I'm using pointer to copy first array's base address to other pointer i.e int *arr; int a[n];
arr=a; Is this causing different o/p ??
When i replaced this with for each i arr[i]=a[i] this caused runtime error on testcase 2 and passes testcase 1 My submission 2
I know i've initialized a pointer but not assigned any memory in heap but why it is passing test case 1 then ? Please help me to understand this situation. Thank you