#include<iostream>
using namespace std;
void comparison(char arr2[], char arr3[],int& i,int j)
{
int abc=1;
for(j=0;j<5;j++)
{
if((arr2[j]==arr3[j])||(arr2[0]!=arr3[0]))
{
j++;
}
i=i+1;
j=5;
}
}
int main()
{
char arr[5]={'a','b','c','d','e'};
char arr1[5]={'a','b','c','d','e'};
int refr=0, iteratorr=0;
comparison(arr,arr1,refr,iteratorr);
for(iteratorr=0;(iteratorr<5&&refr==1) ;iteratorr++)
{
cout<<arr1[iteratorr]<<endl;
}
return 0;
}
//Can anyone help me figure out what's happening to the values of i and j in the comparison function? Why the values of i and j are not being incremented in the comparison function? Or if they are being incremented, how many times and what values do i and j reach within comparsion function scope?