retagged by
329 views
1 votes
1 votes

DOUBT:

suppose a memory space of 16B is given and it is asked that  what is the maximum length of string it can store.

then do we have to consider the space taken by the “\0” also? 

OR just the string length?

retagged by

1 Answer

0 votes
0 votes

I think yes because it differentiate the two strings like iitbiitd here is two string so we have to take extra space to differentiate between them that is called null “\0” 

 iitb\0iitd\0

…………..

yes it differentiate two strings but null terminating character does not take any space. and null terminating character also take space.

edited by