 i don t know how one can expect better and more secure code from the community when this being a security list some post like this shows clearly no knowledge of c on fri nov NUMBER NUMBER at NUMBER NUMBER NUMBERpm NUMBER ali saifullah khan wrote here is a test done on the return of sizes by sizeof using pointers include iostream h int main void char testbuff NUMBER read it like this new array with NUMBER elements of type pointer to char as a pointer occupies the natural word size NUMBER bits or NUMBERbits no wonder you get NUMBER NUMBER sizeof char numer_of_elements int len sizeof testbuff cout len n return NUMBER using int len sizeof char testbuff sizeof returns the size of types you can use it with vars and then the normal form is sizeof var not sizeof var but if you re changing the type with the var with a cast of course you ll get the size of that new type regards luciano rocha consciousness that annoying time between naps 