sizeof
#2

It's working on how many cells are in the array.

Each character in a string is assigned a cell.

A string with the name Hello in it, would only need a string 5 long, and if it were str[5] and if we checked what str[2] was we'd end up with l (Or e... unsure on what it will return, but the 'address' is to the one character sitting in 2).


Sizeof isn't returning the string, it's simply returning the actual size of the array.
Reply


Messages In This Thread
sizeof - by wallen - 06.03.2018, 14:58
Re: sizeof - by Sew_Sumi - 06.03.2018, 16:18
Re: sizeof - by wallen - 06.03.2018, 16:24
Re: sizeof - by NaS - 06.03.2018, 18:35

Forum Jump:


Users browsing this thread: 1 Guest(s)