sizeof() on char array of size 100 returns 200

Raz A.
Haifa,

Jan 13, 2020
82 Posts

0  |  0  

Re: sizeof() on char array of size 100 returns 200

i have a char array,
i defined it to be 1 dimension of size 100
sizeof() on that array, returns 200
why?

Solution Available
Tero S.
Irvine, CA

Jan 13, 2020
16 Posts

1  |  0  

Re: sizeof() on char array of size 100 returns 200

Hi Raz,

If you create a variable by name:
acTest : Char[100]

and for example invoke sizeof(acTest) in the Debug window, what output do you see in the Debug Log?

I see:
100

Meaning, size of acTest is 100 bytes as expected.

Regards,
Tero



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]