Quesn 10 (string quiz)

Find the output of the following program.

void f(){

    string s=”abhuhba”     ;   
    bool flag=false;
    for(int i=0;i<s.length()/2;i++)
         if(s[i]!=s[s.length()-1-i])flag=false;          
         if(flag)cout<<”YES”;         

        else cout<<”NO”;

    }

what should be the output in this?
my output : NO

Yes , it would be NO. If this resolves your doubt mark it resolved.