+ 2

problem in understanding source code

hey!I have recently read the program about converting binary numbers in 2's complement where i found a thing which says binary[i]! ='\0'. can anyone out there tell me please, what does it mean??

6th Aug 2021, 3:05 PM
Brat__
Brat__ - avatar
7 Respuestas
+ 2
Calvin Thomas 😁tysm
6th Aug 2021, 7:41 PM
Brat__
Brat__ - avatar
+ 1
'\0' represents null character, So it's checking whether the character is null or not.
6th Aug 2021, 4:04 PM
Krishna Dhulipalla
+ 1
6th Aug 2021, 4:08 PM
Brat__
Brat__ - avatar
0
Iffat Well, here's a better alternative for your code: !!binary[i] # Hope this helps
6th Aug 2021, 7:31 PM
Calvin Thomas
Calvin Thomas - avatar
0
Martin Taylor hey sorry for ur inconvenience! and presumably u have given proper guidance tysm 😁
6th Aug 2021, 7:40 PM
Brat__
Brat__ - avatar