null terminator and strlen
#1

hi i want know when I create un new string :

new str[26];

i have 25 character to use and 1 for null terminator ; when i use strlen() , its return 26 ou 25 characters??
Reply
#2

strlen returns the number of characters used

sizeof returns the number of characters declared
Reply
#3

ah ok thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)