Chech permutation in string a-z;

#include
#include

using namespace std;

bool isPermutation(char *s1,char *s2){

int l1 = strlen(s1);
int l2 = strlen(s2);

if(l1!=l2){
	return false ;
}

int freq[26]={0};

for(int i=0; i<l1; i++){
	freq[s1[i]-'a']++;
}
for(int i=0; i<l2; i++){
	freq[s2[i]-'a']--;
}

for(int i=0; i<26; i++){
	if(freq!=0){
		return false ;
	}
}
return true;

}

int main(){
char s1[100],s2[100];
cin>>s1>>s2;

if(isPermutation(s1,s2)==true){
	cout <<" it is permutation";
}else{
	cout <<"not it is not permutation";
}

}

its always showing
no it is not permutation;

You have used freq!=0 instead of freq[i]!=0
So freq!=0 is always true, and thus false is returned in all cases.