Discussion :: Strings - Find Output of Program (Q.No.3)
|Milind Walekar said: (Oct 8, 2013)|
|Will it not count the NULL in the string ?|
|Sneha said: (Jul 10, 2014)|
|I perceive that strlen() function is defined in c library in such a way that null is not counted unless it is mentioned specifically as '\0' at the end during the string declaration.|
|Sharanu said: (Feb 13, 2015)|
|What about NULL?|
|Sikandar said: (Feb 12, 2016)|
|It's not null. It's nul character '\0'-Ascii value is 0 (1 byte) it excluding in string length as well nul character including in string size.
NULL is related to pointer its 4 byte.
|Ashutosh said: (Sep 26, 2016)|
|Will it not count the null in the string?|
|Devi Achsah said: (Jul 25, 2017)|
|What about the null character. Why 7 is not the ans?|
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.