i wanted to ask like in some codes i see like char !='0'
that means or ='0' whats that null character all about ? srry for my stupid question i m still a begineer.
i wanted to ask like in some codes i see like char !='0'
that means or ='0' whats that null character all about ? srry for my stupid question i m still a begineer.
'0' is the literal zero character which has the value of 48 in ASCII, not the null character ('\0').
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
yah srry i mean the ('\0') not 0 typing error srry i wanted to ask like u got an array of like 50 element and u do a!='\0' that wont end on 49 ? on the 48 array ?and if u do a='\0' that mean it will end on the 49 element ?srry coz its not very clear for me thanks for ur help in advanced
Yes, if you have a char array of 50 characters then the maximum number of characters in the null terminated string is 49. Of course, the first null character can occur anywhere, not just as the last element.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
thanks for help