+ 1
Can we compare two array values, ex: a[1]==b[5]
5 Respuestas
+ 5
Yes.. Absolutely right..
+ 2
If they the same datatype, of Course.
+ 1
#include <iostream>
using namespace std;
int main() {
string arr[]={"a"};
int ar[]={1}; /* wright here string ar[]={"a"}; u will see error soo u cant compare different data types variables */
if(arr[0]!=ar[0]){
cout<<"hey" ;
}
return 0;
}
0
any program
0
yep you can do anything with an array which you can do with two different variable