Why the condition if ((a[0] == 'y') | (a[0] = 'Y')) is ALWAYS TRUE in the following code?
#include <iostream>
using namespace std;
int main()
{
cout << "Enter 10 integers seperated by spaces: ";
int array[10];
for (int i = 0; i<1; i++)
cin>>array[i];
cin.ignore();
cout << "Do you like to search an element in the array? ";
char a[4];
cin.getline(a,4,'\n');
if ((a[0] == 'y') | (a[0] = 'Y'))
{
cout << "TRUE";
}
else
cout << "FALSE";
cout << endl;
}