Hello, I was trying to run this code :
But why it is giving me error ?
Hello, I was trying to run this code :
But why it is giving me error ?
hello @yashsharma4304 there was problem in the condition which you have made in the while loop.
becuase this β\0β is not considered as the single character thatβs why it was giving the error .
if you still have any doubt you can ask here .
Happy LEarning !!
Yeah, I also think about that. But it is a null character so it should be considered as a single character ?
character considers a letter at time .
yes but I am saying that \0 is also a single character ? It is a null character
please read the line carefully here it is clearly mentioned that it is used in string .but you are applying on character .
for better understanding see this code of null also on string .
https://ide.codingblocks.com/s/334764.
character is considered or used to take singe character only at a time .
so thatβs why it is treating ββ and β0β in β\0β as individual characters .
please read the line carefully here it is clearly mentioned that it is used in string
Ok