About operator >

why should we have to parenthesis “<” in cout example…
string a =“man”;
string b=“mann”;
cout<b; //not working
//cout<<(a>b) is working
//printf("%d",a>b) is working

cout<b// does not work coz, incorrect syntax

in which we should apply bracket? not able to understand the question

sorry
cout<b; not working…why we have to parenthesizes
cout<<(a>b); it works

because of operator precedence << has higher precedence than < or >.
Hence we have to specify brackets to specify the operator order.

Hit like if you get it!
Cheers :slight_smile:

Hi
@Keval-Kishan-1996374880459452 if your doubt is resolved please mark it resolved in your course, else you can post your doubt further in the same thread.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.