17 AnswersNew Answer
17 AnswersNew Answer
it works: https://code.sololearn.com/cmiwUisdRYYP/?ref=app
xor bitwise operator: A ^ B not bitwise operator: ~ C (not the 'dash', but the 'tilde') xnor => ~ (D ^ E) parenthesis are highly recommended as operator precedence are not always the same in each languages...
if you iterate over the char values of each character inside the string, yes it should work...
you could be more attentive to people giving help to you, and not too quickly blame them to not be polite as they are taking on their own time... and maybe you could thanks by upvoting at least, and mark the best answer ^^
do you ask me to coding for you? that's not how it works: we are here to help, not to do code for you ^^ you should try your own attempt first, and then if you stuck, you could request for help... one thread for one question/problem, if no similar threads found ;P
Use string.h bitwise is used for boolean...
Tried it and it doesn't work
Could you please show by writing a code , that would be helpful
Thanks, can the above code work for strings of alphabets
I didn't ask you to code for me the second time, I simply asked whether it works with strings, which has a simple reply Yes/No.
Thank you, see how simple it was.
You could have been a little polite
I've been polite... but your last question was unclear, all the more that you firstly reply "tried it and it doesn't work", never give upvote nor mark best answer: that would have let me guess you're asking to code for you ^^
Your first answer was my first try when I was working on project and it wasn't working as expected, and I have been trying to work on it for a long.
Secondly I would never ask anyone to code for me, because I don't like to take someones else's work as mine.
You mean I compare every bit of the string and produce the output accordingly.
I tried it like this int a = 'A'; It gives the decimal value for the letter 'A' as 65. And then performing NOT works,, but I don't know how to convert it back to string
SoloLearn Inc.4 Embarcadero Center, Suite 1455
Send us a message